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

Side by Side Diff: chrome/browser/resources/options/managed_user_settings.js

Issue 12389079: Disable content pack buttons. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Multiline tags should close on new line. Created 7 years, 9 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
« no previous file with comments | « chrome/browser/resources/options/managed_user_settings.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 if (loadTimeData.getBoolean('managedUsersEnabled')) { 5 if (loadTimeData.getBoolean('managedUsersEnabled')) {
6 6
7 cr.define('options', function() { 7 cr.define('options', function() {
8 /** @const */ var OptionsPage = options.OptionsPage; 8 /** @const */ var OptionsPage = options.OptionsPage;
9 /** @const */ var SettingsDialog = options.SettingsDialog; 9 /** @const */ var SettingsDialog = options.SettingsDialog;
10 10
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 var isAuthenticated = 107 var isAuthenticated =
108 this.authenticationState == ManagedUserAuthentication.AUTHENTICATED; 108 this.authenticationState == ManagedUserAuthentication.AUTHENTICATED;
109 this.enableControls(isAuthenticated); 109 this.enableControls(isAuthenticated);
110 }, 110 },
111 111
112 // Enables or disables all controls based on the authentication state of 112 // Enables or disables all controls based on the authentication state of
113 // the managed user. If |enable| is true, the controls will be enabled. 113 // the managed user. If |enable| is true, the controls will be enabled.
114 enableControls: function(enable) { 114 enableControls: function(enable) {
115 $('set-passphrase').disabled = 115 $('set-passphrase').disabled =
116 !enable || !$('use-passphrase-checkbox').checked; 116 !enable || !$('use-passphrase-checkbox').checked;
117 $('get-content-packs-button').disabled = !enable; 117 // TODO(sergiu): make $('get-content-packs-button') behave the same as
118 // the other controls once the button actually does something.
118 $('contentpacks-allow').setDisabled('notManagedUserModifiable', !enable); 119 $('contentpacks-allow').setDisabled('notManagedUserModifiable', !enable);
119 $('contentpacks-warn').setDisabled('notManagedUserModifiable', !enable); 120 $('contentpacks-warn').setDisabled('notManagedUserModifiable', !enable);
120 $('contentpacks-block').setDisabled('notManagedUserModifiable', !enable); 121 $('contentpacks-block').setDisabled('notManagedUserModifiable', !enable);
121 $('safe-search-checkbox').setDisabled( 122 $('safe-search-checkbox').setDisabled(
122 'notManagedUserModifiable', !enable); 123 'notManagedUserModifiable', !enable);
123 // TODO(akuegel): Add disable-signin-checkbox and 124 // TODO(akuegel): Add disable-signin-checkbox and
124 // disable-history-deletion-checkbox once these features are implemented 125 // disable-history-deletion-checkbox once these features are implemented
125 $('use-passphrase-checkbox').disabled = !enable; 126 $('use-passphrase-checkbox').disabled = !enable;
126 if (enable) 127 if (enable)
127 $('managed-user-settings-page').classList.remove('locked'); 128 $('managed-user-settings-page').classList.remove('locked');
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 177
177 // Export 178 // Export
178 return { 179 return {
179 ManagedUserSettings: ManagedUserSettings, 180 ManagedUserSettings: ManagedUserSettings,
180 ManagedUserSettingsForTesting: ManagedUserSettingsForTesting, 181 ManagedUserSettingsForTesting: ManagedUserSettingsForTesting,
181 ManagedUserAuthentication: ManagedUserAuthentication 182 ManagedUserAuthentication: ManagedUserAuthentication
182 }; 183 };
183 }); 184 });
184 185
185 } 186 }
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/managed_user_settings.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698