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

Unified Diff: chrome/browser/resources/file_manager/js/file_manager.js

Issue 7044052: file manager: enable context menus in all modes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/file_manager/js/file_manager.js
diff --git a/chrome/browser/resources/file_manager/js/file_manager.js b/chrome/browser/resources/file_manager/js/file_manager.js
index 553c2e84f764c9f766f0c80ccb720339b0dda88a..3a3f30997b54077e1a20db412ac4a3fff88f6de9 100644
--- a/chrome/browser/resources/file_manager/js/file_manager.js
+++ b/chrome/browser/resources/file_manager/js/file_manager.js
@@ -567,9 +567,7 @@ FileManager.prototype = {
*/
FileManager.prototype.onRenameCanExecute_ = function(event) {
event.canExecute =
- (// Full page mode.
- this.dialogType_ == FileManager.DialogType.FULL_PAGE &&
- // Rename not in progress.
+ (// Rename not in progress.
!this.renameInput_.currentEntry &&
// Not in root directory.
this.currentDirEntry_.fullPath != '/' &&
@@ -584,9 +582,7 @@ FileManager.prototype = {
*/
FileManager.prototype.onDeleteCanExecute_ = function(event) {
event.canExecute =
- (// Full page mode.
- this.dialogType_ == FileManager.DialogType.FULL_PAGE &&
- // Rename not in progress.
+ (// Rename not in progress.
!this.renameInput_.currentEntry &&
// Not in root directory.
this.currentDirEntry_.fullPath != '/' &&
@@ -641,11 +637,8 @@ FileManager.prototype = {
this.grid_.selectionModel.addEventListener(
'change', this.onSelectionChanged_.bind(this));
- if (this.dialogType_ == FileManager.DialogType.FULL_PAGE) {
- cr.ui.contextMenuHandler.addContextMenuProperty(this.grid_);
- this.grid_.contextMenu = this.fileContextMenu_;
- }
-
+ cr.ui.contextMenuHandler.addContextMenuProperty(this.grid_);
+ this.grid_.contextMenu = this.fileContextMenu_;
this.grid_.addEventListener('mousedown',
this.onGridMouseDown_.bind(this));
};
@@ -683,10 +676,8 @@ FileManager.prototype = {
this.table_.selectionModel.addEventListener(
'change', this.onSelectionChanged_.bind(this));
- if (this.dialogType_ == FileManager.DialogType.FULL_PAGE) {
- cr.ui.contextMenuHandler.addContextMenuProperty(this.table_);
- this.table_.contextMenu = this.fileContextMenu_;
- }
+ cr.ui.contextMenuHandler.addContextMenuProperty(this.table_);
+ this.table_.contextMenu = this.fileContextMenu_;
this.table_.addEventListener('mousedown',
this.onTableMouseDown_.bind(this));
« 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