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

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

Issue 11309014: File manager: support for zipping selected files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Define zip::ZipFileList method to internalize details with handling file lists. Created 8 years, 1 month 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 /** 5 /**
6 * FileManager constructor. 6 * FileManager constructor.
7 * 7 *
8 * FileManager objects encapsulate the functionality of the file selector 8 * FileManager objects encapsulate the functionality of the file selector
9 * dialogs, as well as the full screen file manager application (though the 9 * dialogs, as well as the full screen file manager application (though the
10 * latter is not yet implemented). 10 * latter is not yet implemented).
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 CommandUtil.registerCommand(doc, 'gdata-clear-local-cache', 566 CommandUtil.registerCommand(doc, 'gdata-clear-local-cache',
567 Commands.gdataClearCacheCommand, this); 567 Commands.gdataClearCacheCommand, this);
568 568
569 CommandUtil.registerCommand(doc, 'gdata-go-to-drive', 569 CommandUtil.registerCommand(doc, 'gdata-go-to-drive',
570 Commands.gdataGoToDriveCommand, this); 570 Commands.gdataGoToDriveCommand, this);
571 571
572 CommandUtil.registerCommand(doc, 'paste', 572 CommandUtil.registerCommand(doc, 'paste',
573 Commands.pasteFileCommand, doc, this.fileTransferController_); 573 Commands.pasteFileCommand, doc, this.fileTransferController_);
574 574
575 CommandUtil.registerCommand(doc, 'open-with', 575 CommandUtil.registerCommand(doc, 'open-with',
576 Commands.openWithCommand, this); 576 Commands.openWithCommand, this);
577
578 CommandUtil.registerCommand(doc, 'zip-selection',
579 Commands.zipSelectionCommand, this);
577 580
578 CommandUtil.registerCommand(doc, 'cut', Commands.defaultCommand, doc); 581 CommandUtil.registerCommand(doc, 'cut', Commands.defaultCommand, doc);
579 CommandUtil.registerCommand(doc, 'copy', Commands.defaultCommand, doc); 582 CommandUtil.registerCommand(doc, 'copy', Commands.defaultCommand, doc);
580 583
581 var inputs = this.dialogDom_.querySelectorAll( 584 var inputs = this.dialogDom_.querySelectorAll(
582 'input[type=text], input[type=search], textarea'); 585 'input[type=text], input[type=search], textarea');
583 586
584 for (i = 0; i < inputs.length; i++) { 587 for (i = 0; i < inputs.length; i++) {
585 cr.ui.contextMenuHandler.setContextMenu(inputs[i], this.textContextMenu_); 588 cr.ui.contextMenuHandler.setContextMenu(inputs[i], this.textContextMenu_);
586 this.registerInputCommands_(inputs[i]); 589 this.registerInputCommands_(inputs[i]);
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
723 726
724 this.filePopup_ = null; 727 this.filePopup_ = null;
725 728
726 this.dialogDom_.querySelector('#search-box').addEventListener( 729 this.dialogDom_.querySelector('#search-box').addEventListener(
727 'input', this.onSearchBoxUpdate_.bind(this)); 730 'input', this.onSearchBoxUpdate_.bind(this));
728 731
729 this.defaultActionMenuItem_ = 732 this.defaultActionMenuItem_ =
730 this.dialogDom_.querySelector('#default-action'); 733 this.dialogDom_.querySelector('#default-action');
731 734
732 this.openWithCommand_ = 735 this.openWithCommand_ =
733 this.dialogDom_.querySelector('#open-with'); 736 this.dialogDom_.querySelector('#open-with');
734 737
735 this.defaultActionMenuItem_.addEventListener('activate', 738 this.defaultActionMenuItem_.addEventListener('activate',
736 this.dispatchSelectionAction_.bind(this)); 739 this.dispatchSelectionAction_.bind(this));
737 740
738 this.fileTypeSelector_ = this.dialogDom_.querySelector('#file-type'); 741 this.fileTypeSelector_ = this.dialogDom_.querySelector('#file-type');
739 this.initFileTypeFilter_(); 742 this.initFileTypeFilter_();
740 743
741 this.updateWindowState_(); 744 this.updateWindowState_();
742 // Populate the static localized strings. 745 // Populate the static localized strings.
743 i18nTemplate.process(this.document_, loadTimeData); 746 i18nTemplate.process(this.document_, loadTimeData);
(...skipping 2589 matching lines...) Expand 10 before | Expand all | Expand 10 after
3333 return this.directoryModel_.getFileList(); 3336 return this.directoryModel_.getFileList();
3334 }; 3337 };
3335 3338
3336 /** 3339 /**
3337 * @return {cr.ui.List} Current list object. 3340 * @return {cr.ui.List} Current list object.
3338 */ 3341 */
3339 FileManager.prototype.getCurrentList = function() { 3342 FileManager.prototype.getCurrentList = function() {
3340 return this.currentList_; 3343 return this.currentList_;
3341 }; 3344 };
3342 })(); 3345 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698