OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // Setting the src of an img to an empty string can crash the browser, so we | 5 // Setting the src of an img to an empty string can crash the browser, so we |
6 // use an empty 1x1 gif instead. | 6 // use an empty 1x1 gif instead. |
7 const EMPTY_IMAGE_URI = 'data:image/gif;base64,' | 7 const EMPTY_IMAGE_URI = 'data:image/gif;base64,' |
8 + 'R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw%3D%3D'; | 8 + 'R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw%3D%3D'; |
9 | 9 |
10 var g_slideshow_data = null; | 10 var g_slideshow_data = null; |
(...skipping 2469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2480 FileManager.prototype.onSelectionChanged_ = function(event) { | 2480 FileManager.prototype.onSelectionChanged_ = function(event) { |
2481 this.summarizeSelection_(); | 2481 this.summarizeSelection_(); |
2482 | 2482 |
2483 if (this.dialogType_ == FileManager.DialogType.SELECT_SAVEAS_FILE) { | 2483 if (this.dialogType_ == FileManager.DialogType.SELECT_SAVEAS_FILE) { |
2484 // If this is a save-as dialog, copy the selected file into the filename | 2484 // If this is a save-as dialog, copy the selected file into the filename |
2485 // input text box. | 2485 // input text box. |
2486 | 2486 |
2487 if (this.selection && | 2487 if (this.selection && |
2488 this.selection.totalCount == 1 && | 2488 this.selection.totalCount == 1 && |
2489 this.selection.entries[0].isFile) | 2489 this.selection.entries[0].isFile) |
2490 this.filenameInput_.value = leadEntry.name; | 2490 this.filenameInput_.value = this.getLeadEntry().name; |
2491 } | 2491 } |
2492 | 2492 |
2493 this.updateOkButton_(); | 2493 this.updateOkButton_(); |
2494 | 2494 |
2495 var self = this; | 2495 var self = this; |
2496 setTimeout(function() { self.onSelectionChangeComplete_(event) }, 0); | 2496 setTimeout(function() { self.onSelectionChangeComplete_(event) }, 0); |
2497 }; | 2497 }; |
2498 | 2498 |
2499 /** | 2499 /** |
2500 * Handle selection change related tasks that won't run properly during | 2500 * Handle selection change related tasks that won't run properly during |
(...skipping 833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3334 | 3334 |
3335 if (msg) { | 3335 if (msg) { |
3336 console.log('no no no'); | 3336 console.log('no no no'); |
3337 this.alert.show(msg, onAccept); | 3337 this.alert.show(msg, onAccept); |
3338 return false; | 3338 return false; |
3339 } | 3339 } |
3340 | 3340 |
3341 return true; | 3341 return true; |
3342 }; | 3342 }; |
3343 })(); | 3343 })(); |
OLD | NEW |