| Index: chrome/browser/resources/file_manager/js/file_manager.js
|
| ===================================================================
|
| --- chrome/browser/resources/file_manager/js/file_manager.js (revision 88552)
|
| +++ chrome/browser/resources/file_manager/js/file_manager.js (working copy)
|
| @@ -54,9 +54,6 @@
|
|
|
| this.defaultPath_ = this.params_.defaultPath || '/';
|
|
|
| - // Optional list of file types.
|
| - this.fileTypes_ = this.params_.typeList;
|
| -
|
| // This is set to just the directory portion of defaultPath in initDialogType.
|
| this.defaultFolder_ = '/';
|
|
|
| @@ -558,29 +555,6 @@
|
| };
|
|
|
| /**
|
| - * "Save a file" dialog is supposed to have a combo box with available
|
| - * file types. Selecting an item filters files by extension and specifies how
|
| - * file should be saved.
|
| - * @return {intener} Index of selected type from this.fileTypes_ + 1. 0
|
| - * means value is not specified.
|
| - */
|
| - FileManager.prototype.getSelectedFilterIndex_= function(fileName) {
|
| - // TODO(serya): Implement the combo box
|
| - // For now try to guess choice by file extension.
|
| - if (!this.fileTypes_ || this.fileTypes_.length == 0) return 0;
|
| -
|
| - var extension = /\.[^\.]+$/.exec(fileName);
|
| - extension = extension ? extension[0].substring(1).toLowerCase() : "";
|
| - var result = 0; // Use first type by default.
|
| - for (var i = 0; i < this.fileTypes_.length; i++) {
|
| - if (this.fileTypes_[i].extensions.indexOf(extension)) {
|
| - result = i;
|
| - }
|
| - }
|
| - return result + 1; // 1-based index.
|
| - };
|
| -
|
| - /**
|
| * Force the canExecute events to be dispatched.
|
| */
|
| FileManager.prototype.updateCommands_ = function() {
|
| @@ -2104,9 +2078,8 @@
|
| if (!filename)
|
| throw new Error('Missing filename!');
|
|
|
| - chrome.fileBrowserPrivate.selectFile(
|
| - currentDirUrl + encodeURIComponent(filename),
|
| - this.getSelectedFilterIndex_(filename));
|
| + chrome.fileBrowserPrivate.selectFile(currentDirUrl + encodeURI(filename),
|
| + 0);
|
| window.close();
|
| return;
|
| }
|
| @@ -2127,7 +2100,7 @@
|
| continue;
|
| }
|
|
|
| - ary.push(currentDirUrl + encodeURIComponent(entry.name));
|
| + ary.push(currentDirUrl + encodeURI(entry.name));
|
| }
|
|
|
| // Multi-file selection has no other restrictions.
|
| @@ -2156,8 +2129,7 @@
|
| throw new Error('Selected entry is not a file!');
|
| }
|
|
|
| - chrome.fileBrowserPrivate.selectFile(
|
| - ary[0], this.getSelectedFilterIndex_(ary[0]));
|
| + chrome.fileBrowserPrivate.selectFile(ary[0], 0);
|
| window.close();
|
| };
|
|
|
|
|
| Property changes on: chrome/browser/resources/file_manager/js/file_manager.js
|
| ___________________________________________________________________
|
| Added: svn:mergeinfo
|
|
|
|
|