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} |
*/ |