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 var HotwordSearchSettingIndicator = options.HotwordSearchSettingIndicator; | 9 var HotwordSearchSettingIndicator = options.HotwordSearchSettingIndicator; |
10 | 10 |
(...skipping 850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
861 // See http://crbug.com/268265. | 861 // See http://crbug.com/268265. |
862 var customizeSyncButtonNewText = syncData.setupCompleted ? | 862 var customizeSyncButtonNewText = syncData.setupCompleted ? |
863 loadTimeData.getString('customizeSync') : | 863 loadTimeData.getString('customizeSync') : |
864 loadTimeData.getString('syncButtonTextStart'); | 864 loadTimeData.getString('syncButtonTextStart'); |
865 if (customizeSyncButton.textContent != customizeSyncButtonNewText) | 865 if (customizeSyncButton.textContent != customizeSyncButtonNewText) |
866 customizeSyncButton.textContent = customizeSyncButtonNewText; | 866 customizeSyncButton.textContent = customizeSyncButtonNewText; |
867 | 867 |
868 // Disable the "sign in" button if we're currently signing in, or if we're | 868 // Disable the "sign in" button if we're currently signing in, or if we're |
869 // already signed in and signout is not allowed. | 869 // already signed in and signout is not allowed. |
870 var signInButton = $('start-stop-sync'); | 870 var signInButton = $('start-stop-sync'); |
871 signInButton.disabled = syncData.setupInProgress || | 871 signInButton.disabled = syncData.setupInProgress; |
872 !syncData.signoutAllowed; | |
873 this.signoutAllowed_ = syncData.signoutAllowed; | 872 this.signoutAllowed_ = syncData.signoutAllowed; |
874 if (!syncData.signoutAllowed) | 873 if (!syncData.signoutAllowed) |
875 $('start-stop-sync-indicator').setAttribute('controlled-by', 'policy'); | 874 $('start-stop-sync-indicator').setAttribute('controlled-by', 'policy'); |
876 else | 875 else |
877 $('start-stop-sync-indicator').removeAttribute('controlled-by'); | 876 $('start-stop-sync-indicator').removeAttribute('controlled-by'); |
878 | 877 |
879 // Hide the "sign in" button on Chrome OS, and show it on desktop Chrome. | 878 // Hide the "sign in" button on Chrome OS, and show it on desktop Chrome. |
880 signInButton.hidden = cr.isChromeOS; | 879 signInButton.hidden = cr.isChromeOS; |
881 | 880 |
882 signInButton.textContent = | 881 signInButton.textContent = |
(...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1792 BrowserOptions.getLoggedInUsername = function() { | 1791 BrowserOptions.getLoggedInUsername = function() { |
1793 return BrowserOptions.getInstance().username_; | 1792 return BrowserOptions.getInstance().username_; |
1794 }; | 1793 }; |
1795 } | 1794 } |
1796 | 1795 |
1797 // Export | 1796 // Export |
1798 return { | 1797 return { |
1799 BrowserOptions: BrowserOptions | 1798 BrowserOptions: BrowserOptions |
1800 }; | 1799 }; |
1801 }); | 1800 }); |
OLD | NEW |