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

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: address reviews 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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 * @param {{baseURL: string, dynamicURL: string, layout: string, 197 * @param {{baseURL: string, dynamicURL: string, layout: string,
198 * author: string, authorWebsite: string}} 198 * author: string, authorWebsite: string}}
199 * selectedItem selected wallpaper item in grid. 199 * selectedItem selected wallpaper item in grid.
200 * @private 200 * @private
201 */ 201 */
202 WallpaperManager.prototype.setWallpaperAttribution_ = function(selectedItem) { 202 WallpaperManager.prototype.setWallpaperAttribution_ = function(selectedItem) {
203 if (selectedItem) { 203 if (selectedItem) {
204 $('author-name').textContent = selectedItem.author; 204 $('author-name').textContent = selectedItem.author;
205 $('author-website').textContent = $('author-website').href = 205 $('author-website').textContent = $('author-website').href =
206 selectedItem.authorWebsite; 206 selectedItem.authorWebsite;
207 $('wallpaper-attribute').hidden = false;
207 return; 208 return;
208 } 209 }
210 $('wallpaper-attribute').hidden = true;
209 $('author-name').textContent = ''; 211 $('author-name').textContent = '';
210 $('author-website').textContent = $('author-website').href = ''; 212 $('author-website').textContent = $('author-website').href = '';
211 }; 213 };
212 214
213 /** 215 /**
214 * Resize thumbnails grid and categories list to fit the new window size. 216 * Resize thumbnails grid and categories list to fit the new window size.
215 */ 217 */
216 WallpaperManager.prototype.onResize_ = function() { 218 WallpaperManager.prototype.onResize_ = function() {
217 this.wallpaperGrid_.redraw(); 219 this.wallpaperGrid_.redraw();
218 this.categoriesList_.redraw(); 220 this.categoriesList_.redraw();
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 authorWebsite: this.manifest_.wallpaper_list[key].author_website 350 authorWebsite: this.manifest_.wallpaper_list[key].author_website
349 }; 351 };
350 wallpapersDataModel.push(wallpaperInfo); 352 wallpapersDataModel.push(wallpaperInfo);
351 } 353 }
352 } 354 }
353 this.wallpaperGrid_.dataModel = wallpapersDataModel; 355 this.wallpaperGrid_.dataModel = wallpapersDataModel;
354 } 356 }
355 }; 357 };
356 358
357 })(); 359 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698