Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 }); |
| OLD | NEW |