| 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 '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 918 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 929 this.updateWindowState_(); | 929 this.updateWindowState_(); |
| 930 | 930 |
| 931 // Populate the static localized strings. | 931 // Populate the static localized strings. |
| 932 i18nTemplate.process(this.document_, loadTimeData); | 932 i18nTemplate.process(this.document_, loadTimeData); |
| 933 | 933 |
| 934 // Initialize the new header and arrange the file list. | 934 // Initialize the new header and arrange the file list. |
| 935 if (util.platform.newUI()) { | 935 if (util.platform.newUI()) { |
| 936 this.dialogDom_.querySelector('#app-name').innerText = | 936 this.dialogDom_.querySelector('#app-name').innerText = |
| 937 chrome.runtime.getManifest().name; | 937 chrome.runtime.getManifest().name; |
| 938 this.table_.normalizeColumns(); | 938 this.table_.normalizeColumns(); |
| 939 this.table_.redraw(); |
| 939 } | 940 } |
| 940 }; | 941 }; |
| 941 | 942 |
| 942 /** | 943 /** |
| 943 * @private | 944 * @private |
| 944 */ | 945 */ |
| 945 FileManager.prototype.onBreadcrumbClick_ = function(event) { | 946 FileManager.prototype.onBreadcrumbClick_ = function(event) { |
| 946 this.directoryModel_.changeDirectory(event.path); | 947 this.directoryModel_.changeDirectory(event.path); |
| 947 }; | 948 }; |
| 948 | 949 |
| (...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1403 FileManager.prototype.onResize_ = function() { | 1404 FileManager.prototype.onResize_ = function() { |
| 1404 if (this.listType_ == FileManager.ListType.THUMBNAIL) { | 1405 if (this.listType_ == FileManager.ListType.THUMBNAIL) { |
| 1405 var g = this.grid_; | 1406 var g = this.grid_; |
| 1406 g.startBatchUpdates(); | 1407 g.startBatchUpdates(); |
| 1407 setTimeout(function() { | 1408 setTimeout(function() { |
| 1408 g.columns = 0; | 1409 g.columns = 0; |
| 1409 g.redraw(); | 1410 g.redraw(); |
| 1410 g.endBatchUpdates(); | 1411 g.endBatchUpdates(); |
| 1411 }, 0); | 1412 }, 0); |
| 1412 } else { | 1413 } else { |
| 1414 if (util.platform.newUI()) { |
| 1415 if (this.table_.clientWidth > 0) |
| 1416 this.table_.normalizeColumns(); |
| 1417 } |
| 1413 this.table_.redraw(); | 1418 this.table_.redraw(); |
| 1414 if (util.platform.newUI()) | 1419 this.volumeList_.redraw(); |
| 1415 this.table_.normalizeColumns(); | |
| 1416 } | 1420 } |
| 1417 | 1421 |
| 1418 if (!util.platform.newUI()) | 1422 if (!util.platform.newUI()) |
| 1419 this.breadcrumbs_.truncate(); | 1423 this.breadcrumbs_.truncate(); |
| 1420 | 1424 |
| 1421 this.searchBreadcrumbs_.truncate(); | 1425 this.searchBreadcrumbs_.truncate(); |
| 1422 | 1426 |
| 1423 this.updateWindowState_(); | 1427 this.updateWindowState_(); |
| 1424 }; | 1428 }; |
| 1425 | 1429 |
| (...skipping 2215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3641 * Set the flag expressing whether the ctrl key is pressed or not. | 3645 * Set the flag expressing whether the ctrl key is pressed or not. |
| 3642 * @param {boolean} flag New value of the flag | 3646 * @param {boolean} flag New value of the flag |
| 3643 * @private | 3647 * @private |
| 3644 */ | 3648 */ |
| 3645 FileManager.prototype.setCtrlKeyPressed_ = function(flag) { | 3649 FileManager.prototype.setCtrlKeyPressed_ = function(flag) { |
| 3646 this.ctrlKeyPressed_ = flag; | 3650 this.ctrlKeyPressed_ = flag; |
| 3647 this.document_.querySelector('#drive-clear-local-cache').canExecuteChange(); | 3651 this.document_.querySelector('#drive-clear-local-cache').canExecuteChange(); |
| 3648 this.document_.querySelector('#drive-reload').canExecuteChange(); | 3652 this.document_.querySelector('#drive-reload').canExecuteChange(); |
| 3649 }; | 3653 }; |
| 3650 })(); | 3654 })(); |
| OLD | NEW |