| Index: chrome/browser/resources/file_manager/js/file_manager.js
|
| diff --git a/chrome/browser/resources/file_manager/js/file_manager.js b/chrome/browser/resources/file_manager/js/file_manager.js
|
| index 05df67323553426f66414ce04e1f68b7a461359c..e753bdd2efa75a67c35a1614d4fa47a5ff15fe39 100644
|
| --- a/chrome/browser/resources/file_manager/js/file_manager.js
|
| +++ b/chrome/browser/resources/file_manager/js/file_manager.js
|
| @@ -769,7 +769,10 @@ DialogType.isModal = function(type) {
|
| dom.querySelector('#search-breadcrumbs'), this.metadataCache_);
|
| this.searchBreadcrumbs_.addEventListener(
|
| 'pathclick', this.onBreadcrumbClick_.bind(this));
|
| - this.searchBreadcrumbs_.setHideLast(true);
|
| + if (!util.platform.newUI())
|
| + this.searchBreadcrumbs_.setHideLast(true);
|
| + else
|
| + this.searchBreadcrumbs_.setHideLast(false);
|
|
|
| var fullPage = this.dialogType == DialogType.FULL_PAGE;
|
| FileTable.decorate(this.table_, this.metadataCache_, fullPage);
|
| @@ -1062,10 +1065,11 @@ DialogType.isModal = function(type) {
|
| FileManager.prototype.initSidebar_ = function() {
|
| this.directoryTree_ = this.dialogDom_.querySelector('#directory-tree');
|
| DirectoryTree.decorate(this.directoryTree_, this.directoryModel_);
|
| - this.directoryTree_.addEventListener('content-updated', function() {
|
| - this.updateMiddleBarVisibility_(true);
|
| - }.bind(this));
|
| if (util.platform.newUI()) {
|
| + this.directoryTree_.addEventListener('content-updated', function() {
|
| + this.updateMiddleBarVisibility_(true);
|
| + }.bind(this));
|
| +
|
| this.volumeList_ = this.dialogDom_.querySelector('#volume-list');
|
| VolumeList.decorate(this.volumeList_, this.directoryModel_);
|
| }
|
| @@ -1428,11 +1432,12 @@ DialogType.isModal = function(type) {
|
| this.table_.normalizeColumns();
|
| }
|
| this.table_.redraw();
|
| - this.volumeList_.redraw();
|
| }
|
|
|
| if (!util.platform.newUI())
|
| this.breadcrumbs_.truncate();
|
| + else
|
| + this.volumeList_.redraw();
|
|
|
| // Hide the search box if there is not enough space.
|
| if (util.platform.newUI())
|
| @@ -2045,6 +2050,17 @@ DialogType.isModal = function(type) {
|
| this.directoryModel_.getCurrentDirectoryURL();
|
| };
|
|
|
| + /**
|
| + * Return DirectoryEntry of the current directory or null.
|
| + * @return {DirectoryEntry} DirectoryEntry of the current directory. Returns
|
| + * null if the directory model is not ready or the current directory is
|
| + * not set.
|
| + */
|
| + FileManager.prototype.getCurrentDirectoryEntry = function() {
|
| + return this.directoryModel_ &&
|
| + this.directoryModel_.getCurrentDirEntry();
|
| + };
|
| +
|
| FileManager.prototype.deleteSelection = function() {
|
| // TODO(mtomasz): Remove this temporary dialog. crbug.com/167364
|
| var entries = this.getSelection().entries;
|
| @@ -2547,7 +2563,8 @@ DialogType.isModal = function(type) {
|
| }
|
| this.table_.list.endBatchUpdates();
|
| this.grid_.endBatchUpdates();
|
| - this.updateMiddleBarVisibility_();
|
| + if (util.platform.newUI())
|
| + this.updateMiddleBarVisibility_();
|
| this.scanCompletedTimer_ = null;
|
| }.bind(this), 50);
|
| };
|
| @@ -2580,7 +2597,8 @@ DialogType.isModal = function(type) {
|
| this.hideSpinnerLater_();
|
| this.table_.list.endBatchUpdates();
|
| this.grid_.endBatchUpdates();
|
| - this.updateMiddleBarVisibility_();
|
| + if (util.platform.newUI())
|
| + this.updateMiddleBarVisibility_();
|
| this.scanUpdatedTimer_ = null;
|
| }.bind(this), 200);
|
| };
|
| @@ -2609,7 +2627,8 @@ DialogType.isModal = function(type) {
|
| this.scanInProgress_ = false;
|
| this.table_.list.endBatchUpdates();
|
| this.grid_.endBatchUpdates();
|
| - this.updateMiddleBarVisibility_();
|
| + if (util.platform.newUI())
|
| + this.updateMiddleBarVisibility_();
|
| }
|
| };
|
|
|
|
|