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 725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
736 startStopButton.disabled = syncData.setupInProgress || | 736 startStopButton.disabled = syncData.setupInProgress || |
737 !syncData.signoutAllowed; | 737 !syncData.signoutAllowed; |
738 if (!syncData.signoutAllowed) | 738 if (!syncData.signoutAllowed) |
739 $('start-stop-sync-indicator').setAttribute('controlled-by', 'policy'); | 739 $('start-stop-sync-indicator').setAttribute('controlled-by', 'policy'); |
740 else | 740 else |
741 $('start-stop-sync-indicator').removeAttribute('controlled-by'); | 741 $('start-stop-sync-indicator').removeAttribute('controlled-by'); |
742 | 742 |
743 // Hide the "start/stop syncing" button on Chrome OS if sync has already | 743 // Hide the "start/stop syncing" button on Chrome OS if sync has already |
744 // been set up, or if it is managed or disabled. | 744 // been set up, or if it is managed or disabled. |
745 startStopButton.hidden = cr.isChromeOS && (syncData.setupCompleted || | 745 startStopButton.hidden = cr.isChromeOS && (syncData.setupCompleted || |
746 syncData.isManaged || | 746 syncData.managed || |
747 !syncData.syncSystemEnabled); | 747 !syncData.syncSystemEnabled); |
748 startStopButton.textContent = | 748 startStopButton.textContent = |
749 this.signedIn_ ? | 749 this.signedIn_ ? |
750 loadTimeData.getString('syncButtonTextStop') : | 750 loadTimeData.getString('syncButtonTextStop') : |
751 syncData.setupInProgress ? | 751 syncData.setupInProgress ? |
752 loadTimeData.getString('syncButtonTextInProgress') : | 752 loadTimeData.getString('syncButtonTextInProgress') : |
753 loadTimeData.getString('syncButtonTextStart'); | 753 loadTimeData.getString('syncButtonTextStart'); |
754 $('start-stop-sync-indicator').hidden = startStopButton.hidden; | 754 $('start-stop-sync-indicator').hidden = startStopButton.hidden; |
755 | 755 |
756 // TODO(estade): can this just be textContent? | 756 // TODO(estade): can this just be textContent? |
(...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1451 BrowserOptions.getLoggedInUsername = function() { | 1451 BrowserOptions.getLoggedInUsername = function() { |
1452 return BrowserOptions.getInstance().username_; | 1452 return BrowserOptions.getInstance().username_; |
1453 }; | 1453 }; |
1454 } | 1454 } |
1455 | 1455 |
1456 // Export | 1456 // Export |
1457 return { | 1457 return { |
1458 BrowserOptions: BrowserOptions | 1458 BrowserOptions: BrowserOptions |
1459 }; | 1459 }; |
1460 }); | 1460 }); |
OLD | NEW |