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

Side by Side Diff: chrome/browser/resources/options/chromeos/change_picture_options.js

Issue 1533123002: Fix visibility of flip icon for camera images (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years 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
« no previous file with comments | « chrome/browser/resources/options/chromeos/change_picture_options.css ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 cr.define('options', function() { 5 cr.define('options', function() {
6 var Page = cr.ui.pageManager.Page; 6 var Page = cr.ui.pageManager.Page;
7 var PageManager = cr.ui.pageManager.PageManager; 7 var PageManager = cr.ui.pageManager.PageManager;
8 var UserImagesGrid = options.UserImagesGrid; 8 var UserImagesGrid = options.UserImagesGrid;
9 var ButtonImages = UserImagesGrid.ButtonImages; 9 var ButtonImages = UserImagesGrid.ButtonImages;
10 10
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 /** 197 /**
198 * Handles image selection change. 198 * Handles image selection change.
199 * @param {Event} e Selection change Event. 199 * @param {Event} e Selection change Event.
200 * @private 200 * @private
201 */ 201 */
202 handleImageSelected_: function(e) { 202 handleImageSelected_: function(e) {
203 var imageGrid = $('user-image-grid'); 203 var imageGrid = $('user-image-grid');
204 var url = imageGrid.selectedItemUrl; 204 var url = imageGrid.selectedItemUrl;
205 205
206 // Flip button available only for camera picture. 206 // Flip button available only for camera picture.
207 imageGrid.flipPhotoElement.tabIndex = 207 imageGrid.flipPhotoElement.hidden =
208 imageGrid.selectionType == 'camera' ? 1 : -1; 208 imageGrid.selectionType != 'camera';
209 // Ignore selection change caused by program itself and selection of one 209 // Ignore selection change caused by program itself and selection of one
210 // of the action buttons. 210 // of the action buttons.
211 if (!imageGrid.inProgramSelection && 211 if (!imageGrid.inProgramSelection &&
212 url != ButtonImages.TAKE_PHOTO && url != ButtonImages.CHOOSE_FILE) { 212 url != ButtonImages.TAKE_PHOTO && url != ButtonImages.CHOOSE_FILE) {
213 chrome.send('selectImage', [url, imageGrid.selectionType]); 213 chrome.send('selectImage', [url, imageGrid.selectionType]);
214 } 214 }
215 // Start/stop camera on (de)selection. 215 // Start/stop camera on (de)selection.
216 if (!imageGrid.inProgramSelection && 216 if (!imageGrid.inProgramSelection &&
217 imageGrid.selectionType != e.oldSelectionType) { 217 imageGrid.selectionType != e.oldSelectionType) {
218 if (imageGrid.selectionType == 'camera') { 218 if (imageGrid.selectionType == 'camera') {
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 'setProfileImage', 322 'setProfileImage',
323 'setSelectedImage', 323 'setSelectedImage',
324 ]); 324 ]);
325 325
326 // Export 326 // Export
327 return { 327 return {
328 ChangePictureOptions: ChangePictureOptions 328 ChangePictureOptions: ChangePictureOptions
329 }; 329 };
330 330
331 }); 331 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/chromeos/change_picture_options.css ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698