OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 /** | 5 /** |
6 * @fileoverview User pod row implementation. | 6 * @fileoverview User pod row implementation. |
7 */ | 7 */ |
8 | 8 |
9 cr.define('login', function() { | 9 cr.define('login', function() { |
10 /** | 10 /** |
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 this.actionBoxAreaElement.setAttribute( | 312 this.actionBoxAreaElement.setAttribute( |
313 'aria-label', loadTimeData.getStringF( | 313 'aria-label', loadTimeData.getStringF( |
314 'podMenuButtonAccessibleName', this.user_.emailAddress)); | 314 'podMenuButtonAccessibleName', this.user_.emailAddress)); |
315 this.actionBoxMenuRemoveElement.setAttribute( | 315 this.actionBoxMenuRemoveElement.setAttribute( |
316 'aria-label', loadTimeData.getString( | 316 'aria-label', loadTimeData.getString( |
317 'podMenuRemoveItemAccessibleName')); | 317 'podMenuRemoveItemAccessibleName')); |
318 this.actionBoxMenuTitleNameElement.textContent = this.user_.isOwner ? | 318 this.actionBoxMenuTitleNameElement.textContent = this.user_.isOwner ? |
319 loadTimeData.getStringF('ownerUserPattern', this.user_.displayName) : | 319 loadTimeData.getStringF('ownerUserPattern', this.user_.displayName) : |
320 this.user_.displayName; | 320 this.user_.displayName; |
321 this.actionBoxMenuTitleEmailElement.textContent = this.user_.emailAddress; | 321 this.actionBoxMenuTitleEmailElement.textContent = this.user_.emailAddress; |
| 322 this.actionBoxMenuTitleEmailElement.hidden = |
| 323 this.user_.locallyManagedUser; |
| 324 |
322 this.actionBoxMenuCommandElement.textContent = | 325 this.actionBoxMenuCommandElement.textContent = |
323 loadTimeData.getString('removeUser'); | 326 loadTimeData.getString('removeUser'); |
324 this.passwordElement.setAttribute('aria-label', loadTimeData.getStringF( | 327 this.passwordElement.setAttribute('aria-label', loadTimeData.getStringF( |
325 'passwordFieldAccessibleName', this.user_.emailAddress)); | 328 'passwordFieldAccessibleName', this.user_.emailAddress)); |
326 this.signinButtonElement.hidden = !needSignin; | 329 this.signinButtonElement.hidden = !needSignin; |
327 this.userTypeIconAreaElement.hidden = !this.user_.locallyManagedUser; | 330 this.userTypeIconAreaElement.hidden = !this.user_.locallyManagedUser; |
328 }, | 331 }, |
329 | 332 |
330 /** | 333 /** |
331 * The user that this pod represents. | 334 * The user that this pod represents. |
(...skipping 1068 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1400 this.classList.remove('images-loading'); | 1403 this.classList.remove('images-loading'); |
1401 chrome.send('userImagesLoaded'); | 1404 chrome.send('userImagesLoaded'); |
1402 } | 1405 } |
1403 } | 1406 } |
1404 }; | 1407 }; |
1405 | 1408 |
1406 return { | 1409 return { |
1407 PodRow: PodRow | 1410 PodRow: PodRow |
1408 }; | 1411 }; |
1409 }); | 1412 }); |
OLD | NEW |