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 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
735 this.compareType_.bind(this)); | 735 this.compareType_.bind(this)); |
736 | 736 |
737 dataModel.addEventListener('splice', | 737 dataModel.addEventListener('splice', |
738 this.onDataModelSplice_.bind(this)); | 738 this.onDataModelSplice_.bind(this)); |
739 dataModel.addEventListener('permuted', | 739 dataModel.addEventListener('permuted', |
740 this.onDataModelPermuted_.bind(this)); | 740 this.onDataModelPermuted_.bind(this)); |
741 | 741 |
742 this.directoryModel_.getFileListSelection().addEventListener( | 742 this.directoryModel_.getFileListSelection().addEventListener( |
743 'change', this.onSelectionChanged_.bind(this)); | 743 'change', this.onSelectionChanged_.bind(this)); |
744 | 744 |
745 this.directoryModel_.setAutoSelectIndex( | |
746 this.dialogType_ == FileManager.DialogType.SELECT_SAVEAS_FILE ? -1 : 0); | |
747 | |
748 this.initTable_(); | 745 this.initTable_(); |
749 this.initGrid_(); | 746 this.initGrid_(); |
750 this.initRootsList_(); | 747 this.initRootsList_(); |
751 | 748 |
752 var listType = FileManager.ListType.DETAIL; | 749 var listType = FileManager.ListType.DETAIL; |
753 if (FileManager.DialogType.isModal(this.dialogType_)) | 750 if (FileManager.DialogType.isModal(this.dialogType_)) |
754 listType = window.localStorage['listType-' + this.dialogType_] || | 751 listType = window.localStorage['listType-' + this.dialogType_] || |
755 FileManager.ListType.DETAIL; | 752 FileManager.ListType.DETAIL; |
756 this.setListType(listType); | 753 this.setListType(listType); |
757 | 754 |
(...skipping 3573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4331 | 4328 |
4332 handleSplitterDragEnd: function(e) { | 4329 handleSplitterDragEnd: function(e) { |
4333 Splitter.prototype.handleSplitterDragEnd.apply(this, arguments); | 4330 Splitter.prototype.handleSplitterDragEnd.apply(this, arguments); |
4334 this.ownerDocument.documentElement.classList.remove('col-resize'); | 4331 this.ownerDocument.documentElement.classList.remove('col-resize'); |
4335 } | 4332 } |
4336 }; | 4333 }; |
4337 | 4334 |
4338 customSplitter.decorate(splitterElement); | 4335 customSplitter.decorate(splitterElement); |
4339 }; | 4336 }; |
4340 })(); | 4337 })(); |
OLD | NEW |