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

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

Issue 6380015: Fix ChromeOS users list multiple X problem. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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/chromeos_accounts_options_page.css ('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) 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.accounts', function() { 5 cr.define('options.accounts', function() {
6 const List = cr.ui.List; 6 const List = cr.ui.List;
7 const ListItem = cr.ui.ListItem; 7 const ListItem = cr.ui.ListItem;
8 const ArrayDataModel = cr.ui.ArrayDataModel; 8 const ArrayDataModel = cr.ui.ArrayDataModel;
9 9
10 /** 10 /**
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 var labelEmail = this.ownerDocument.createElement('span'); 166 var labelEmail = this.ownerDocument.createElement('span');
167 labelEmail.className = 'user-email-label'; 167 labelEmail.className = 'user-email-label';
168 labelEmail.textContent = this.user.email; 168 labelEmail.textContent = this.user.email;
169 169
170 var labelName = this.ownerDocument.createElement('span'); 170 var labelName = this.ownerDocument.createElement('span');
171 labelName.className = 'user-name-label'; 171 labelName.className = 'user-name-label';
172 labelName.textContent = this.user.owner ? 172 labelName.textContent = this.user.owner ?
173 localStrings.getStringF('username_format', this.user.name) : 173 localStrings.getStringF('username_format', this.user.name) :
174 this.user.name; 174 this.user.name;
175 175
176 var emailNameBlock = this.ownerDocument.createElement('div');
177 emailNameBlock.className = 'user-email-name-block';
178 emailNameBlock.appendChild(labelEmail);
179 emailNameBlock.appendChild(labelName);
180
176 this.appendChild(icon); 181 this.appendChild(icon);
177 this.appendChild(labelEmail); 182 this.appendChild(emailNameBlock);
178 this.appendChild(labelName);
179 183
180 if (!this.user.owner) { 184 if (!this.user.owner) {
181 var removeButton = this.ownerDocument.createElement('button'); 185 var removeButton = this.ownerDocument.createElement('button');
182 removeButton.className = 'remove-user-button'; 186 removeButton.className = 'raw-button remove-user-button';
James Hawkins 2011/01/25 23:10:33 nit: Please use two classList.add(X) instead.
xiyuan 2011/01/25 23:27:29 Done.
183 this.appendChild(removeButton); 187 this.appendChild(removeButton);
184 } 188 }
185 } 189 }
186 }; 190 };
187 191
188 return { 192 return {
189 UserList: UserList 193 UserList: UserList
190 }; 194 };
191 }); 195 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/chromeos_accounts_options_page.css ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698