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 /** | 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 3134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3145 this.closeOnUnmount_ = false; | 3145 this.closeOnUnmount_ = false; |
3146 } | 3146 } |
3147 | 3147 |
3148 this.updateTitle_(); | 3148 this.updateTitle_(); |
3149 this.updateGDataUnmountedPanel_(); | 3149 this.updateGDataUnmountedPanel_(); |
3150 if (this.isOnGData()) | 3150 if (this.isOnGData()) |
3151 this.unmountedPanel_.classList.remove('retry-enabled'); | 3151 this.unmountedPanel_.classList.remove('retry-enabled'); |
3152 }; | 3152 }; |
3153 | 3153 |
3154 FileManager.prototype.findListItemForEvent_ = function(event) { | 3154 FileManager.prototype.findListItemForEvent_ = function(event) { |
3155 return this.findListItemForNode_(event.srcElement); | 3155 return this.findListItemForNode_(event.touchedElement || event.srcElement); |
3156 }; | 3156 }; |
3157 | 3157 |
3158 FileManager.prototype.findListItemForNode_ = function(node) { | 3158 FileManager.prototype.findListItemForNode_ = function(node) { |
3159 var item = this.currentList_.getListItemAncestor(node); | 3159 var item = this.currentList_.getListItemAncestor(node); |
3160 // TODO(serya): list should check that. | 3160 // TODO(serya): list should check that. |
3161 return item && this.currentList_.isItem(item) ? item : null; | 3161 return item && this.currentList_.isItem(item) ? item : null; |
3162 }; | 3162 }; |
3163 | 3163 |
3164 /** | 3164 /** |
3165 * Unload handler for the page. May be called manually for the file picker | 3165 * Unload handler for the page. May be called manually for the file picker |
(...skipping 1058 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4224 } | 4224 } |
4225 | 4225 |
4226 var defaultActionSeparator = | 4226 var defaultActionSeparator = |
4227 this.dialogDom_.querySelector('#default-action-separator'); | 4227 this.dialogDom_.querySelector('#default-action-separator'); |
4228 | 4228 |
4229 this.defaultActionMenuItem_.hidden = !taskItem; | 4229 this.defaultActionMenuItem_.hidden = !taskItem; |
4230 defaultActionSeparator.hidden = !taskItem; | 4230 defaultActionSeparator.hidden = !taskItem; |
4231 } | 4231 } |
4232 })(); | 4232 })(); |
4233 | 4233 |
OLD | NEW |