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 cr.define('options', function() { | 5 cr.define('options', function() { |
6 var OptionsPage = options.OptionsPage; | 6 var OptionsPage = options.OptionsPage; |
7 var ArrayDataModel = cr.ui.ArrayDataModel; | 7 var ArrayDataModel = cr.ui.ArrayDataModel; |
8 var RepeatingButton = cr.ui.RepeatingButton; | 8 var RepeatingButton = cr.ui.RepeatingButton; |
9 | 9 |
10 // | 10 // |
(...skipping 755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
766 if (cr.isChromeOS) { | 766 if (cr.isChromeOS) { |
767 // On ChromeOS, replace /special/drive with Drive for drive paths, and | 767 // On ChromeOS, replace /special/drive with Drive for drive paths, and |
768 // /home/chronos/user/Downloads with Downloads for local files. | 768 // /home/chronos/user/Downloads with Downloads for local files. |
769 // Also replace '/' with ' \u203a ' (angled quote sign) everywhere. | 769 // Also replace '/' with ' \u203a ' (angled quote sign) everywhere. |
770 var path = $('downloadLocationPath').value; | 770 var path = $('downloadLocationPath').value; |
771 path = path.replace(/^\/special\/drive/, 'Google Drive'); | 771 path = path.replace(/^\/special\/drive/, 'Google Drive'); |
772 path = path.replace(/^\/home\/chronos\/user\//, ''); | 772 path = path.replace(/^\/home\/chronos\/user\//, ''); |
773 path = path.replace(/\//g, ' \u203a '); | 773 path = path.replace(/\//g, ' \u203a '); |
774 $('downloadLocationPath').value = path; | 774 $('downloadLocationPath').value = path; |
775 } | 775 } |
| 776 if (event.value.disabled) |
| 777 $('download-location-label').classList.add('disabled'); |
| 778 else |
| 779 $('download-location-label').classList.remove('disabled'); |
| 780 $('downloadLocationChangeButton').disabled = event.value.disabled; |
776 }, | 781 }, |
777 | 782 |
778 /** | 783 /** |
779 * Update the Default Browsers section based on the current state. | 784 * Update the Default Browsers section based on the current state. |
780 * @param {string} statusString Description of the current default state. | 785 * @param {string} statusString Description of the current default state. |
781 * @param {boolean} isDefault Whether or not the browser is currently | 786 * @param {boolean} isDefault Whether or not the browser is currently |
782 * default. | 787 * default. |
783 * @param {boolean} canBeDefault Whether or not the browser can be default. | 788 * @param {boolean} canBeDefault Whether or not the browser can be default. |
784 * @private | 789 * @private |
785 */ | 790 */ |
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1336 BrowserOptions.getLoggedInUsername = function() { | 1341 BrowserOptions.getLoggedInUsername = function() { |
1337 return BrowserOptions.getInstance().username_; | 1342 return BrowserOptions.getInstance().username_; |
1338 }; | 1343 }; |
1339 } | 1344 } |
1340 | 1345 |
1341 // Export | 1346 // Export |
1342 return { | 1347 return { |
1343 BrowserOptions: BrowserOptions | 1348 BrowserOptions: BrowserOptions |
1344 }; | 1349 }; |
1345 }); | 1350 }); |
OLD | NEW |