Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(224)

Side by Side Diff: chrome/browser/resources/chromeos/wallpaper_manager/js/wallpaper_manager.js

Issue 10919253: Fix img misalign and hide "by" when nothing selected in new wallpaepr picker ui (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to trunk Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * WallpaperManager constructor. 6 * WallpaperManager constructor.
7 * 7 *
8 * WallpaperManager objects encapsulate the functionality of the wallpaper 8 * WallpaperManager objects encapsulate the functionality of the wallpaper
9 * manager extension. 9 * manager extension.
10 * 10 *
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 * @param {{baseURL: string, dynamicURL: string, layout: string, 203 * @param {{baseURL: string, dynamicURL: string, layout: string,
204 * author: string, authorWebsite: string}} 204 * author: string, authorWebsite: string}}
205 * selectedItem selected wallpaper item in grid. 205 * selectedItem selected wallpaper item in grid.
206 * @private 206 * @private
207 */ 207 */
208 WallpaperManager.prototype.setWallpaperAttribution_ = function(selectedItem) { 208 WallpaperManager.prototype.setWallpaperAttribution_ = function(selectedItem) {
209 if (selectedItem) { 209 if (selectedItem) {
210 $('author-name').textContent = selectedItem.author; 210 $('author-name').textContent = selectedItem.author;
211 $('author-website').textContent = $('author-website').href = 211 $('author-website').textContent = $('author-website').href =
212 selectedItem.authorWebsite; 212 selectedItem.authorWebsite;
213 $('wallpaper-attribute').hidden = false;
213 return; 214 return;
214 } 215 }
216 $('wallpaper-attribute').hidden = true;
215 $('author-name').textContent = ''; 217 $('author-name').textContent = '';
216 $('author-website').textContent = $('author-website').href = ''; 218 $('author-website').textContent = $('author-website').href = '';
217 }; 219 };
218 220
219 /** 221 /**
220 * Resize thumbnails grid and categories list to fit the new window size. 222 * Resize thumbnails grid and categories list to fit the new window size.
221 */ 223 */
222 WallpaperManager.prototype.onResize_ = function() { 224 WallpaperManager.prototype.onResize_ = function() {
223 this.wallpaperGrid_.redraw(); 225 this.wallpaperGrid_.redraw();
224 this.categoriesList_.redraw(); 226 this.categoriesList_.redraw();
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 authorWebsite: this.manifest_.wallpaper_list[key].author_website 356 authorWebsite: this.manifest_.wallpaper_list[key].author_website
355 }; 357 };
356 wallpapersDataModel.push(wallpaperInfo); 358 wallpapersDataModel.push(wallpaperInfo);
357 } 359 }
358 } 360 }
359 this.wallpaperGrid_.dataModel = wallpapersDataModel; 361 this.wallpaperGrid_.dataModel = wallpapersDataModel;
360 } 362 }
361 }; 363 };
362 364
363 })(); 365 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698