| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 }; |
| OLD | NEW |