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

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

Issue 5530005: Whitelist checkbox on ChromeOS users settings page should be inverted. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 6
7 var OptionsPage = options.OptionsPage; 7 var OptionsPage = options.OptionsPage;
8 8
9 ///////////////////////////////////////////////////////////////////////////// 9 /////////////////////////////////////////////////////////////////////////////
10 // AccountsOptions class: 10 // AccountsOptions class:
(...skipping 26 matching lines...) Expand all
37 37
38 var userNameEdit = $('userNameEdit'); 38 var userNameEdit = $('userNameEdit');
39 options.accounts.UserNameEdit.decorate(userNameEdit); 39 options.accounts.UserNameEdit.decorate(userNameEdit);
40 userNameEdit.addEventListener('add', this.handleAddUser_); 40 userNameEdit.addEventListener('add', this.handleAddUser_);
41 41
42 userList.disabled = 42 userList.disabled =
43 userNameEdit.disabled = !AccountsOptions.currentUserIsOwner(); 43 userNameEdit.disabled = !AccountsOptions.currentUserIsOwner();
44 44
45 this.addEventListener('visibleChange', this.handleVisibleChange_); 45 this.addEventListener('visibleChange', this.handleVisibleChange_);
46 46
47 $('allowGuestCheck').addEventListener('click', 47 $('useWhitelistCheck').addEventListener('click',
48 this.handleAllowGuestCheckClick_); 48 this.handleUseWhitelistCheckClick_);
49 }, 49 },
50 50
51 /** 51 /**
52 * Handler for OptionsPage's visible property change event. 52 * Handler for OptionsPage's visible property change event.
53 * @private 53 * @private
54 * @param {Event} e Property change event. 54 * @param {Event} e Property change event.
55 */ 55 */
56 handleVisibleChange_: function(e) { 56 handleVisibleChange_: function(e) {
57 if (this.visible) { 57 if (this.visible) {
58 // fetchUserPictures calls back AccountsOptions.setUserPictures and 58 // fetchUserPictures calls back AccountsOptions.setUserPictures and
59 // triggers redraw. 59 // triggers redraw.
60 chrome.send('fetchUserPictures', []); 60 chrome.send('fetchUserPictures', []);
61 } 61 }
62 }, 62 },
63 63
64 /** 64 /**
65 * Handler for allow guest check click. 65 * Handler for allow guest check click.
66 * @private 66 * @private
67 */ 67 */
68 handleAllowGuestCheckClick_: function(e) { 68 handleUseWhitelistCheckClick_: function(e) {
69 // Whitelist existing users when guest login is being disabled. 69 // Whitelist existing users when guest login is being disabled.
70 if (!$('allowGuestCheck').checked) { 70 if ($('useWhitelistCheck').checked) {
71 chrome.send('whitelistExistingUsers', []); 71 chrome.send('whitelistExistingUsers', []);
72 } 72 }
73 }, 73 },
74 74
75 /** 75 /**
76 * Handler for "add" event fired from userNameEdit. 76 * Handler for "add" event fired from userNameEdit.
77 * @private 77 * @private
78 * @param {Event} e Add event fired from userNameEdit. 78 * @param {Event} e Add event fired from userNameEdit.
79 */ 79 */
80 handleAddUser_: function(e) { 80 handleAddUser_: function(e) {
(...skipping 24 matching lines...) Expand all
105 userList.addUser(users[i]); 105 userList.addUser(users[i]);
106 } 106 }
107 }; 107 };
108 108
109 // Export 109 // Export
110 return { 110 return {
111 AccountsOptions: AccountsOptions 111 AccountsOptions: AccountsOptions
112 }; 112 };
113 113
114 }); 114 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/chromeos_accounts_options.html ('k') | chrome/browser/resources/options/pref_ui.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698