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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 164 } | 164 } |
| 165 | 165 |
| 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; |
|
kochi
2011/01/26 06:18:20
How about adding 'title' attribute for labelEmail
xiyuan
2011/01/26 18:27:45
Done. Good idea.
| |
| 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.classList.add('raw-button'); |
| 187 removeButton.classList.add('remove-user-button'); | |
| 183 this.appendChild(removeButton); | 188 this.appendChild(removeButton); |
| 184 } | 189 } |
| 185 } | 190 } |
| 186 }; | 191 }; |
| 187 | 192 |
| 188 return { | 193 return { |
| 189 UserList: UserList | 194 UserList: UserList |
| 190 }; | 195 }; |
| 191 }); | 196 }); |
| OLD | NEW |