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

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

Issue 7983002: [filebrowser] Fix copying selected file name to input field. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 3 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 2500 matching lines...) Expand 10 before | Expand all | Expand 10 after
2511 FileManager.prototype.onSelectionChanged_ = function(event) { 2511 FileManager.prototype.onSelectionChanged_ = function(event) {
2512 this.summarizeSelection_(); 2512 this.summarizeSelection_();
2513 2513
2514 if (this.dialogType_ == FileManager.DialogType.SELECT_SAVEAS_FILE) { 2514 if (this.dialogType_ == FileManager.DialogType.SELECT_SAVEAS_FILE) {
2515 // If this is a save-as dialog, copy the selected file into the filename 2515 // If this is a save-as dialog, copy the selected file into the filename
2516 // input text box. 2516 // input text box.
2517 2517
2518 if (this.selection && 2518 if (this.selection &&
2519 this.selection.totalCount == 1 && 2519 this.selection.totalCount == 1 &&
2520 this.selection.entries[0].isFile) 2520 this.selection.entries[0].isFile)
2521 this.filenameInput_.value = leadEntry.name; 2521 this.filenameInput_.value = this.getLeadEntry().name;
2522 } 2522 }
2523 2523
2524 this.updateOkButton_(); 2524 this.updateOkButton_();
2525 2525
2526 var self = this; 2526 var self = this;
2527 setTimeout(function() { self.onSelectionChangeComplete_(event) }, 0); 2527 setTimeout(function() { self.onSelectionChangeComplete_(event) }, 0);
2528 }; 2528 };
2529 2529
2530 /** 2530 /**
2531 * Handle selection change related tasks that won't run properly during 2531 * Handle selection change related tasks that won't run properly during
(...skipping 858 matching lines...) Expand 10 before | Expand all | Expand 10 after
3390 3390
3391 if (msg) { 3391 if (msg) {
3392 console.log('no no no'); 3392 console.log('no no no');
3393 this.alert.show(msg, onAccept); 3393 this.alert.show(msg, onAccept);
3394 return false; 3394 return false;
3395 } 3395 }
3396 3396
3397 return true; 3397 return true;
3398 }; 3398 };
3399 })(); 3399 })();
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