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

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

Issue 5965003: Show warning text in the user settings page for non-owner users. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments 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 23 matching lines...) Expand all
34 // Set up accounts page. 34 // Set up accounts page.
35 var userList = $('userList'); 35 var userList = $('userList');
36 options.accounts.UserList.decorate(userList); 36 options.accounts.UserList.decorate(userList);
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 // If the current user is not the owner, show some warning.
45 if (!AccountsOptions.currentUserIsOwner()) {
46 $('ownerOnlyWarning')..classList.remove('hidden');
arv (Not doing code reviews) 2010/12/20 19:03:36 syntax error
satorux1 2010/12/21 01:57:17 Done.
47 $('ownerUserId').textContent =
48 localStrings.getString('owner_user_id');
arv (Not doing code reviews) 2010/12/20 19:03:36 Can you move this to markup?
satorux1 2010/12/21 01:57:17 Done.
49 }
44 50
45 this.addEventListener('visibleChange', this.handleVisibleChange_); 51 this.addEventListener('visibleChange', this.handleVisibleChange_);
46 52
47 $('useWhitelistCheck').addEventListener('click', 53 $('useWhitelistCheck').addEventListener('click',
48 this.handleUseWhitelistCheckClick_); 54 this.handleUseWhitelistCheckClick_);
49 }, 55 },
50 56
51 /** 57 /**
52 * Handler for OptionsPage's visible property change event. 58 * Handler for OptionsPage's visible property change event.
53 * @private 59 * @private
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 userList.addUser(users[i]); 111 userList.addUser(users[i]);
106 } 112 }
107 }; 113 };
108 114
109 // Export 115 // Export
110 return { 116 return {
111 AccountsOptions: AccountsOptions 117 AccountsOptions: AccountsOptions
112 }; 118 };
113 119
114 }); 120 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698