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

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

Issue 8114017: Merge 102098 - [filebrowser] Fix copying selected file name to input field. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/874/src/
Patch Set: Created 9 years, 2 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
« no previous file with comments | « no previous file | 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) 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
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
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 })();
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698