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