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 'use strict'; | 5 'use strict'; |
6 | 6 |
7 /** | 7 /** |
8 * This variable is checked in SelectFileDialogExtensionBrowserTest. | 8 * This variable is checked in SelectFileDialogExtensionBrowserTest. |
9 * @type {number} | 9 * @type {number} |
10 */ | 10 */ |
(...skipping 1132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1143 | 1143 |
1144 this.navigationList_ = this.dialogDom_.querySelector('#navigation-list'); | 1144 this.navigationList_ = this.dialogDom_.querySelector('#navigation-list'); |
1145 NavigationList.decorate(this.navigationList_, | 1145 NavigationList.decorate(this.navigationList_, |
1146 this.volumeManager_, | 1146 this.volumeManager_, |
1147 this.directoryModel_); | 1147 this.directoryModel_); |
1148 this.navigationList_.fileManager = this; | 1148 this.navigationList_.fileManager = this; |
1149 this.navigationList_.dataModel = | 1149 this.navigationList_.dataModel = |
1150 new NavigationListModel(this.filesystem_, | 1150 new NavigationListModel(this.filesystem_, |
1151 this.directoryModel_.getRootsList(), | 1151 this.directoryModel_.getRootsList(), |
1152 this.folderShortcutsModel_); | 1152 this.folderShortcutsModel_); |
1153 | |
1154 this.navigationList_.addEventListener( | |
1155 'shortcut-target-not-found', | |
1156 function(e) { | |
1157 var path = e.path; | |
1158 var label = e.label; | |
1159 this.confirm.showWithTitle( | |
1160 label, | |
1161 str('SHORTCUT_TARGET_UNAVAILABLE'), | |
1162 // 'Yes' is clicked. | |
1163 function() { | |
1164 this.removeFolderShortcut(path); | |
1165 }.bind(this)); | |
1166 }.bind(this)); | |
1167 }; | 1153 }; |
1168 | 1154 |
1169 /** | 1155 /** |
1170 * @private | 1156 * @private |
1171 */ | 1157 */ |
1172 FileManager.prototype.updateMiddleBarVisibility_ = function() { | 1158 FileManager.prototype.updateMiddleBarVisibility_ = function() { |
1173 var currentPath = this.directoryModel_.getCurrentDirPath(); | 1159 var currentPath = this.directoryModel_.getCurrentDirPath(); |
1174 var driveStatus = this.volumeManager_.getDriveStatus(); | 1160 var driveStatus = this.volumeManager_.getDriveStatus(); |
1175 var visible = | 1161 var visible = |
1176 DirectoryTreeUtil.isEligiblePathForDirectoryTree(currentPath) && | 1162 DirectoryTreeUtil.isEligiblePathForDirectoryTree(currentPath) && |
(...skipping 2747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3924 */ | 3910 */ |
3925 FileManager.prototype.setCtrlKeyPressed_ = function(flag) { | 3911 FileManager.prototype.setCtrlKeyPressed_ = function(flag) { |
3926 this.ctrlKeyPressed_ = flag; | 3912 this.ctrlKeyPressed_ = flag; |
3927 // Before the DOM is constructed, the key event can be handled. | 3913 // Before the DOM is constructed, the key event can be handled. |
3928 var cacheClearCommand = | 3914 var cacheClearCommand = |
3929 this.document_.querySelector('#drive-clear-local-cache'); | 3915 this.document_.querySelector('#drive-clear-local-cache'); |
3930 if (cacheClearCommand) | 3916 if (cacheClearCommand) |
3931 cacheClearCommand.canExecuteChange(); | 3917 cacheClearCommand.canExecuteChange(); |
3932 }; | 3918 }; |
3933 })(); | 3919 })(); |
OLD | NEW |