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

Unified Diff: ui/file_manager/file_manager/foreground/js/file_manager_commands.js

Issue 2347063003: Add 'Get Info' to contextual menu to display QuickView. (Closed)
Patch Set: Add 'Get Info' to contextual menu to display QuickView. Created 4 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 side-by-side diff with in-line comments
Download patch
Index: ui/file_manager/file_manager/foreground/js/file_manager_commands.js
diff --git a/ui/file_manager/file_manager/foreground/js/file_manager_commands.js b/ui/file_manager/file_manager/foreground/js/file_manager_commands.js
index cf7c001377843cc9e2b163b6666d509e5c43cc37..4a75d36768c361f455307bc448726f1196e9a6e6 100644
--- a/ui/file_manager/file_manager/foreground/js/file_manager_commands.js
+++ b/ui/file_manager/file_manager/foreground/js/file_manager_commands.js
@@ -1058,6 +1058,36 @@ CommandHandler.COMMANDS_['open-with'] = /** @type {Command} */ ({
});
/**
+ * Displays QuickView for current selection.
+ * @type {Command}
+ */
+CommandHandler.COMMANDS_['get-info'] = /** @type {Command} */ ({
+ /**
+ * @param {!Event} event Command event.
+ * @param {!FileManager} fileManager fileManager to use.
+ */
+ execute: function(event, fileManager) {
+ // 'get-info' command is executed by 'command' event handler in
+ // QuickViewController.
+ },
+ /**
+ * @param {!Event} event Command event.
+ * @param {!FileManager} fileManager FileManager to use.
+ */
+ canExecute: function(event, fileManager) {
+ var entries = CommandUtil.getCommandEntries(event.target);
+ if (entries.length === 0) {
+ event.canExecute = false;
+ event.command.setHidden(true);
+ return;
+ }
+
+ event.canExecute = entries.length === 1;
+ event.command.setHidden(false);
+ }
+});
+
+/**
* Focuses search input box.
* @type {Command}
*/

Powered by Google App Engine
This is Rietveld 408576698