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

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

Issue 7067020: Moving mediaplayer to the chrome filebrowser. Observable behaviour should not change. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed style errors and localized strings. Created 9 years, 7 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) 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 // WK Bug 55728 is fixed on the chrome 12 branch but not on the trunk. 5 // WK Bug 55728 is fixed on the chrome 12 branch but not on the trunk.
6 // TODO(rginda): Enable this everywhere once we have a trunk-worthy fix. 6 // TODO(rginda): Enable this everywhere once we have a trunk-worthy fix.
7 const ENABLE_EXIF_READER = navigator.userAgent.match(/chrome\/12\.0/i); 7 const ENABLE_EXIF_READER = navigator.userAgent.match(/chrome\/12\.0/i);
8 8
9 // Thumbnail view is painful without the exif reader. 9 // Thumbnail view is painful without the exif reader.
10 const ENABLE_THUMBNAIL_VIEW = ENABLE_EXIF_READER; 10 const ENABLE_THUMBNAIL_VIEW = ENABLE_EXIF_READER;
(...skipping 1491 matching lines...) Expand 10 before | Expand all | Expand 10 after
1502 * Handle a double-click event on an entry in the detail list. 1502 * Handle a double-click event on an entry in the detail list.
1503 * 1503 *
1504 * @param {Event} event The click event. 1504 * @param {Event} event The click event.
1505 */ 1505 */
1506 FileManager.prototype.onDetailDoubleClick_ = function(event) { 1506 FileManager.prototype.onDetailDoubleClick_ = function(event) {
1507 if (this.renameInput_.currentEntry) { 1507 if (this.renameInput_.currentEntry) {
1508 // Don't pay attention to double clicks during a rename. 1508 // Don't pay attention to double clicks during a rename.
1509 return; 1509 return;
1510 } 1510 }
1511 1511
1512 var i = this.currentList_.selectionModel.leadIndex; 1512 var entry = this.selection.leadEntry;
1513 var entry = this.dataModel_.item(i); 1513 if (!entry) {
1514 console.log('Invalid selection');
1515 return;
1516 }
1514 1517
1515 if (entry.isDirectory) 1518 if (entry.isDirectory)
1516 return this.changeDirectory(entry.fullPath); 1519 return this.changeDirectory(entry.fullPath);
1517 1520
1518 if (!this.okButton_.disabled) 1521 if (!this.okButton_.disabled)
1519 this.onOk_(); 1522 this.onOk_();
1520 1523
1521 }; 1524 };
1522 1525
1523 /** 1526 /**
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
1996 } else if (this.dialogType_ == FileManager.DialogType.SELECT_OPEN_FILE) { 1999 } else if (this.dialogType_ == FileManager.DialogType.SELECT_OPEN_FILE) {
1997 if (!this.selection.leadEntry.isFile) 2000 if (!this.selection.leadEntry.isFile)
1998 throw new Error('Selected entry is not a file!'); 2001 throw new Error('Selected entry is not a file!');
1999 } 2002 }
2000 2003
2001 chrome.fileBrowserPrivate.selectFile(ary[0], 0); 2004 chrome.fileBrowserPrivate.selectFile(ary[0], 0);
2002 window.close(); 2005 window.close();
2003 }; 2006 };
2004 2007
2005 })(); 2008 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698