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

Side by Side Diff: chrome/browser/resources/file_manager/foreground/js/file_manager_commands.js

Issue 108163005: [Files.app] Remove OK and Cancel buttons in task picker dialog (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 'use strict'; 5 'use strict';
6 6
7 /** 7 /**
8 * TODO(dzvorygin): Here we use this hack, since 'hidden' is standard 8 * TODO(dzvorygin): Here we use this hack, since 'hidden' is standard
9 * attribute and we can't use it's setter as usual. 9 * attribute and we can't use it's setter as usual.
10 * @param {boolean} value New value of hidden property. 10 * @param {boolean} value New value of hidden property.
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 /** 561 /**
562 * Displays open with dialog for current selection. 562 * Displays open with dialog for current selection.
563 * @type {Command} 563 * @type {Command}
564 */ 564 */
565 CommandHandler.COMMANDS_['open-with'] = { 565 CommandHandler.COMMANDS_['open-with'] = {
566 execute: function(event, fileManager) { 566 execute: function(event, fileManager) {
567 var tasks = fileManager.getSelection().tasks; 567 var tasks = fileManager.getSelection().tasks;
568 if (tasks) { 568 if (tasks) {
569 tasks.showTaskPicker(fileManager.defaultTaskPicker, 569 tasks.showTaskPicker(fileManager.defaultTaskPicker,
570 str('OPEN_WITH_BUTTON_LABEL'), 570 str('OPEN_WITH_BUTTON_LABEL'),
571 null, 571 '',
572 function(task) { 572 function(task) {
573 tasks.execute(task.taskId); 573 tasks.execute(task.taskId);
574 }); 574 });
575 } 575 }
576 }, 576 },
577 canExecute: function(event, fileManager) { 577 canExecute: function(event, fileManager) {
578 var tasks = fileManager.getSelection().tasks; 578 var tasks = fileManager.getSelection().tasks;
579 event.canExecute = tasks && tasks.size() > 1; 579 event.canExecute = tasks && tasks.size() > 1;
580 } 580 }
581 }; 581 };
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
829 /** 829 /**
830 * Reset the zoom factor. 830 * Reset the zoom factor.
831 * @type {Command} 831 * @type {Command}
832 */ 832 */
833 CommandHandler.COMMANDS_['zoom-reset'] = { 833 CommandHandler.COMMANDS_['zoom-reset'] = {
834 execute: function(event, fileManager) { 834 execute: function(event, fileManager) {
835 chrome.fileBrowserPrivate.zoom('reset'); 835 chrome.fileBrowserPrivate.zoom('reset');
836 }, 836 },
837 canExecute: CommandUtil.canExecuteAlways 837 canExecute: CommandUtil.canExecuteAlways
838 }; 838 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698