OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 1015 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1026 loadTimeData.getStringF('ownerUserPattern', this.user_.displayName) : | 1026 loadTimeData.getStringF('ownerUserPattern', this.user_.displayName) : |
1027 this.user_.displayName; | 1027 this.user_.displayName; |
1028 this.actionBoxMenuTitleEmailElement.textContent = this.user_.emailAddress; | 1028 this.actionBoxMenuTitleEmailElement.textContent = this.user_.emailAddress; |
1029 this.actionBoxMenuTitleEmailElement.hidden = this.user_.supervisedUser; | 1029 this.actionBoxMenuTitleEmailElement.hidden = this.user_.supervisedUser; |
1030 | 1030 |
1031 this.actionBoxMenuCommandElement.textContent = | 1031 this.actionBoxMenuCommandElement.textContent = |
1032 loadTimeData.getString('removeUser'); | 1032 loadTimeData.getString('removeUser'); |
1033 }, | 1033 }, |
1034 | 1034 |
1035 customizeUserPodPerUserType: function() { | 1035 customizeUserPodPerUserType: function() { |
1036 if (this.user_.supervisedUser && !this.user_.isDesktopUser) { | 1036 if (this.user_.isChildUser && !this.user_.isDesktopUser) { |
| 1037 this.setUserPodIconType('child'); |
| 1038 } else if (this.user_.isSupervisedUser && !this.user_.isDesktopUser) { |
1037 this.setUserPodIconType('supervised'); | 1039 this.setUserPodIconType('supervised'); |
1038 } else if (this.multiProfilesPolicyApplied) { | 1040 } else if (this.multiProfilesPolicyApplied) { |
1039 // Mark user pod as not focusable which in addition to the grayed out | 1041 // Mark user pod as not focusable which in addition to the grayed out |
1040 // filter makes it look in disabled state. | 1042 // filter makes it look in disabled state. |
1041 this.classList.add('multiprofiles-policy-applied'); | 1043 this.classList.add('multiprofiles-policy-applied'); |
1042 this.setUserPodIconType('policy'); | 1044 this.setUserPodIconType('policy'); |
1043 | 1045 |
1044 if (this.user.multiProfilesPolicy == 'primary-only') | 1046 if (this.user.multiProfilesPolicy == 'primary-only') |
1045 this.querySelector('.mp-policy-primary-only-msg').hidden = false; | 1047 this.querySelector('.mp-policy-primary-only-msg').hidden = false; |
1046 else if (this.user.multiProfilesPolicy == 'owner-primary-only') | 1048 else if (this.user.multiProfilesPolicy == 'owner-primary-only') |
(...skipping 2086 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3133 if (pod && pod.multiProfilesPolicyApplied) { | 3135 if (pod && pod.multiProfilesPolicyApplied) { |
3134 pod.userTypeBubbleElement.classList.remove('bubble-shown'); | 3136 pod.userTypeBubbleElement.classList.remove('bubble-shown'); |
3135 } | 3137 } |
3136 } | 3138 } |
3137 }; | 3139 }; |
3138 | 3140 |
3139 return { | 3141 return { |
3140 PodRow: PodRow | 3142 PodRow: PodRow |
3141 }; | 3143 }; |
3142 }); | 3144 }); |
OLD | NEW |