Chromium Code Reviews| 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 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 382 fileManager.copyManager_.zipSelection(dirEntry, fileManager.isOnDrive(), | 382 fileManager.copyManager_.zipSelection(dirEntry, fileManager.isOnDrive(), |
| 383 selectionEntries); | 383 selectionEntries); |
| 384 }, | 384 }, |
| 385 canExecute: function(event, fileManager) { | 385 canExecute: function(event, fileManager) { |
| 386 var selection = fileManager.getSelection(); | 386 var selection = fileManager.getSelection(); |
| 387 event.canExecute = !fileManager.isOnReadonlyDirectory() && | 387 event.canExecute = !fileManager.isOnReadonlyDirectory() && |
| 388 !fileManager.isOnDrive() && | 388 !fileManager.isOnDrive() && |
| 389 selection && selection.totalCount > 0; | 389 selection && selection.totalCount > 0; |
| 390 } | 390 } |
| 391 }; | 391 }; |
| 392 | |
| 393 /** | |
| 394 * Opens Files App help. | |
| 395 */ | |
| 396 Commands.filesAppHelpCommand = { | |
| 397 execute: function() { | |
| 398 window.open(FileManager.FILES_APP_HELP, 'help'); | |
|
Haruki Sato
2013/02/08 08:56:00
Are we going to reuse FileManager.FILES_APP_HELP ?
mtomasz
2013/02/08 10:08:02
Yep, we will use it in the Gear button menu for no
| |
| 399 }, | |
| 400 canExecute: function(event, fileManager) { | |
| 401 event.canExecute = true; | |
| 402 } | |
| 403 }; | |
| OLD | NEW |