Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(121)

Side by Side Diff: chrome/browser/resources/file_manager/js/file_manager.js

Issue 10205011: [filemanager] Set default sort to Date. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 this.directoryModel_.addEventListener('directory-changed', 496 this.directoryModel_.addEventListener('directory-changed',
497 this.setupCurrentDirectoryPostponed_); 497 this.setupCurrentDirectoryPostponed_);
498 } else { 498 } else {
499 this.setupCurrentDirectory_( 499 this.setupCurrentDirectory_(
500 invokeHandler, true /* blankWhileOpeningAFile */); 500 invokeHandler, true /* blankWhileOpeningAFile */);
501 } 501 }
502 502
503 this.summarizeSelection_(); 503 this.summarizeSelection_();
504 504
505 var sortField = 505 var sortField =
506 window.localStorage['sort-field-' + this.dialogType_] || 'cachedMtime_'; 506 window.localStorage['sort-field-' + this.dialogType_] ||
507 'modificationTime';
507 var sortDirection = 508 var sortDirection =
508 window.localStorage['sort-direction-' + this.dialogType_] || 'desc'; 509 window.localStorage['sort-direction-' + this.dialogType_] || 'desc';
509 this.directoryModel_.fileList.sort(sortField, sortDirection); 510 this.directoryModel_.fileList.sort(sortField, sortDirection);
510 511
511 this.refocus(); 512 this.refocus();
512 513
513 this.metadataProvider_ = 514 this.metadataProvider_ =
514 new MetadataProvider(this.filesystem_.root.toURL()); 515 new MetadataProvider(this.filesystem_.root.toURL());
515 516
516 // PyAuto tests monitor this state by polling this variable 517 // PyAuto tests monitor this state by polling this variable
(...skipping 3813 matching lines...) Expand 10 before | Expand all | Expand 10 after
4330 4331
4331 handleSplitterDragEnd: function(e) { 4332 handleSplitterDragEnd: function(e) {
4332 Splitter.prototype.handleSplitterDragEnd.apply(this, arguments); 4333 Splitter.prototype.handleSplitterDragEnd.apply(this, arguments);
4333 this.ownerDocument.documentElement.classList.remove('col-resize'); 4334 this.ownerDocument.documentElement.classList.remove('col-resize');
4334 } 4335 }
4335 }; 4336 };
4336 4337
4337 customSplitter.decorate(splitterElement); 4338 customSplitter.decorate(splitterElement);
4338 }; 4339 };
4339 })(); 4340 })();
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698