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

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

Issue 14096016: Restyled Files.app's file list, including scrollbars. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments. Created 7 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
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 '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 868 matching lines...) Expand 10 before | Expand all | Expand 10 after
879 879
880 util.disableBrowserShortcutKeys(this.document_); 880 util.disableBrowserShortcutKeys(this.document_);
881 if (!util.platform.v2()) 881 if (!util.platform.v2())
882 util.enableNewFullScreenHandler(this.document_); 882 util.enableNewFullScreenHandler(this.document_);
883 883
884 this.updateWindowState_(); 884 this.updateWindowState_();
885 885
886 // Populate the static localized strings. 886 // Populate the static localized strings.
887 i18nTemplate.process(this.document_, loadTimeData); 887 i18nTemplate.process(this.document_, loadTimeData);
888 888
889 // Initialize the new header. 889 // Initialize the new header and arrange the file list.
890 if (util.platform.newUI()) { 890 if (util.platform.newUI()) {
891 this.dialogDom_.querySelector('#app-name').innerText = 891 this.dialogDom_.querySelector('#app-name').innerText =
892 chrome.runtime.getManifest().name; 892 chrome.runtime.getManifest().name;
893 this.table_.normalizeColumns();
893 } 894 }
894 }; 895 };
895 896
896 /** 897 /**
897 * @private 898 * @private
898 */ 899 */
899 FileManager.prototype.onBreadcrumbClick_ = function(event) { 900 FileManager.prototype.onBreadcrumbClick_ = function(event) {
900 this.directoryModel_.changeDirectory(event.path); 901 this.directoryModel_.changeDirectory(event.path);
901 }; 902 };
902 903
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
1315 if (this.listType_ == FileManager.ListType.THUMBNAIL) { 1316 if (this.listType_ == FileManager.ListType.THUMBNAIL) {
1316 var g = this.grid_; 1317 var g = this.grid_;
1317 g.startBatchUpdates(); 1318 g.startBatchUpdates();
1318 setTimeout(function() { 1319 setTimeout(function() {
1319 g.columns = 0; 1320 g.columns = 0;
1320 g.redraw(); 1321 g.redraw();
1321 g.endBatchUpdates(); 1322 g.endBatchUpdates();
1322 }, 0); 1323 }, 0);
1323 } else { 1324 } else {
1324 this.table_.redraw(); 1325 this.table_.redraw();
1326 if (util.platform.newUI())
1327 this.table_.normalizeColumns();
1325 } 1328 }
1326 1329
1327 if (!util.platform.newUI()) 1330 if (!util.platform.newUI())
1328 this.breadcrumbs_.truncate(); 1331 this.breadcrumbs_.truncate();
1329 1332
1330 this.searchBreadcrumbs_.truncate(); 1333 this.searchBreadcrumbs_.truncate();
1331 1334
1332 this.updateWindowState_(); 1335 this.updateWindowState_();
1333 }; 1336 };
1334 1337
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
1673 */ 1676 */
1674 FileManager.prototype.isCtrlKeyPressed = function() { 1677 FileManager.prototype.isCtrlKeyPressed = function() {
1675 return this.ctrlKeyPressed_; 1678 return this.ctrlKeyPressed_;
1676 }; 1679 };
1677 1680
1678 /** 1681 /**
1679 * @return {boolean} True if the "Available offline" column should be shown in 1682 * @return {boolean} True if the "Available offline" column should be shown in
1680 * the table layout. 1683 * the table layout.
1681 */ 1684 */
1682 FileManager.prototype.shouldShowOfflineColumn = function() { 1685 FileManager.prototype.shouldShowOfflineColumn = function() {
1686 if (util.platform.newUI())
1687 return false;
1683 return this.directoryModel_.getCurrentRootType() === RootType.DRIVE; 1688 return this.directoryModel_.getCurrentRootType() === RootType.DRIVE;
1684 }; 1689 };
1685 1690
1686 /** 1691 /**
1687 * Overrides default handling for clicks on hyperlinks. 1692 * Overrides default handling for clicks on hyperlinks.
1688 * Opens them in a separate tab and if it's an open/save dialog 1693 * Opens them in a separate tab and if it's an open/save dialog
1689 * closes it. 1694 * closes it.
1690 * 1695 *
1691 * @param {Event} event Click event. 1696 * @param {Event} event Click event.
1692 * @private 1697 * @private
(...skipping 1835 matching lines...) Expand 10 before | Expand all | Expand 10 after
3528 * Set the flag expressing whether the ctrl key is pressed or not. 3533 * Set the flag expressing whether the ctrl key is pressed or not.
3529 * @param {boolean} flag New value of the flag 3534 * @param {boolean} flag New value of the flag
3530 * @private 3535 * @private
3531 */ 3536 */
3532 FileManager.prototype.setCtrlKeyPressed_ = function(flag) { 3537 FileManager.prototype.setCtrlKeyPressed_ = function(flag) {
3533 this.ctrlKeyPressed_ = flag; 3538 this.ctrlKeyPressed_ = flag;
3534 this.document_.querySelector('#drive-clear-local-cache').canExecuteChange(); 3539 this.document_.querySelector('#drive-clear-local-cache').canExecuteChange();
3535 this.document_.querySelector('#drive-reload').canExecuteChange(); 3540 this.document_.querySelector('#drive-reload').canExecuteChange();
3536 }; 3541 };
3537 })(); 3542 })();
OLDNEW
« no previous file with comments | « chrome/browser/resources/file_manager/css/file_manager.css ('k') | chrome/browser/resources/file_manager/js/file_table.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698