| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 var CommandUtil = {}; | 5 var CommandUtil = {}; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * Extracts root on which command event was dispatched. | 8 * Extracts root on which command event was dispatched. |
| 9 * | 9 * |
| 10 * @param {Event} event Command event for which to retrieve root to operate on. | 10 * @param {Event} event Command event for which to retrieve root to operate on. |
| (...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 fileManager.copyManager_.zipSelection(dirEntry, fileManager.isOnDrive(), | 397 fileManager.copyManager_.zipSelection(dirEntry, fileManager.isOnDrive(), |
| 398 selectionEntries); | 398 selectionEntries); |
| 399 }, | 399 }, |
| 400 canExecute: function(event, fileManager) { | 400 canExecute: function(event, fileManager) { |
| 401 var selection = fileManager.getSelection(); | 401 var selection = fileManager.getSelection(); |
| 402 event.canExecute = !fileManager.isOnReadonlyDirectory() && | 402 event.canExecute = !fileManager.isOnReadonlyDirectory() && |
| 403 !fileManager.isOnDrive() && | 403 !fileManager.isOnDrive() && |
| 404 selection && selection.totalCount > 0; | 404 selection && selection.totalCount > 0; |
| 405 } | 405 } |
| 406 }; | 406 }; |
| 407 | |
| 408 /** | |
| 409 * Opens Files App help. | |
| 410 */ | |
| 411 Commands.filesAppHelpCommand = { | |
| 412 execute: function() { | |
| 413 window.open(FileManager.FILES_APP_HELP, 'help'); | |
| 414 }, | |
| 415 canExecute: function(event, fileManager) { | |
| 416 event.canExecute = true; | |
| 417 } | |
| 418 }; | |
| OLD | NEW |