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

Side by Side Diff: chrome/browser/resources/file_manager/js/file_selection.js

Issue 18627002: Change dialog texts for folder upload to explicitly indicate it's for 'Uploading' (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: build fix Created 7 years, 4 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 'use strict'; 5 'use strict';
6 6
7 /** 7 /**
8 * The current selection object. 8 * The current selection object.
9 * 9 *
10 * @param {FileManager} fileManager FileManager instance. 10 * @param {FileManager} fileManager FileManager instance.
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 257
258 /** 258 /**
259 * Updates the Ok button enabled state. 259 * Updates the Ok button enabled state.
260 * 260 *
261 * @return {boolean} Whether button is enabled. 261 * @return {boolean} Whether button is enabled.
262 */ 262 */
263 FileSelectionHandler.prototype.updateOkButton = function() { 263 FileSelectionHandler.prototype.updateOkButton = function() {
264 var selectable; 264 var selectable;
265 var dialogType = this.fileManager_.dialogType; 265 var dialogType = this.fileManager_.dialogType;
266 266
267 if (dialogType == DialogType.SELECT_FOLDER) { 267 if (dialogType == DialogType.SELECT_FOLDER ||
268 dialogType == DialogType.SELECT_UPLOAD_FOLDER) {
268 // In SELECT_FOLDER mode, we allow to select current directory 269 // In SELECT_FOLDER mode, we allow to select current directory
269 // when nothing is selected. 270 // when nothing is selected.
270 selectable = this.selection.directoryCount <= 1 && 271 selectable = this.selection.directoryCount <= 1 &&
271 this.selection.fileCount == 0; 272 this.selection.fileCount == 0;
272 } else if (dialogType == DialogType.SELECT_OPEN_FILE) { 273 } else if (dialogType == DialogType.SELECT_OPEN_FILE) {
273 selectable = (this.isFileSelectionAvailable() && 274 selectable = (this.isFileSelectionAvailable() &&
274 this.selection.directoryCount == 0 && 275 this.selection.directoryCount == 0 &&
275 this.selection.fileCount == 1); 276 this.selection.fileCount == 1);
276 } else if (dialogType == DialogType.SELECT_OPEN_MULTI_FILE) { 277 } else if (dialogType == DialogType.SELECT_OPEN_MULTI_FILE) {
277 selectable = (this.isFileSelectionAvailable() && 278 selectable = (this.isFileSelectionAvailable() &&
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 style.left = (boxWidth - imageWidth) / 2 + 'px'; 755 style.left = (boxWidth - imageWidth) / 2 + 'px';
755 style.top = (boxHeight - imageHeight) / 2 + 'px'; 756 style.top = (boxHeight - imageHeight) / 2 + 'px';
756 style.position = 'relative'; 757 style.position = 'relative';
757 758
758 util.applyTransform(largeImage, transform); 759 util.applyTransform(largeImage, transform);
759 760
760 largeImageBox.appendChild(largeImage); 761 largeImageBox.appendChild(largeImage);
761 largeImageBox.style.zIndex = 1000; 762 largeImageBox.style.zIndex = 1000;
762 return true; 763 return true;
763 }; 764 };
OLDNEW
« no previous file with comments | « chrome/browser/resources/file_manager/js/file_manager.js ('k') | chrome/browser/ui/libgtk2ui/select_file_dialog_impl_gtk2.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698