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 1017 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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_.childUser && !this.user_.isDesktopUser) { | 1036 if (this.user_.childUser && !this.user_.isDesktopUser) { |
1037 this.setUserPodIconType('child'); | 1037 this.setUserPodIconType('child'); |
1038 } else if (this.user_.supervisedUser && !this.user_.isDesktopUser) { | 1038 } else if (this.user_.legacySupervisedUser && !this.user_.isDesktopUser) { |
1039 this.setUserPodIconType('supervised'); | 1039 this.setUserPodIconType('legacySupervised'); |
1040 } else if (this.multiProfilesPolicyApplied) { | 1040 } else if (this.multiProfilesPolicyApplied) { |
1041 // 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 |
1042 // filter makes it look in disabled state. | 1042 // filter makes it look in disabled state. |
1043 this.classList.add('multiprofiles-policy-applied'); | 1043 this.classList.add('multiprofiles-policy-applied'); |
1044 this.setUserPodIconType('policy'); | 1044 this.setUserPodIconType('policy'); |
1045 | 1045 |
1046 if (this.user.multiProfilesPolicy == 'primary-only') | 1046 if (this.user.multiProfilesPolicy == 'primary-only') |
1047 this.querySelector('.mp-policy-primary-only-msg').hidden = false; | 1047 this.querySelector('.mp-policy-primary-only-msg').hidden = false; |
1048 else if (this.user.multiProfilesPolicy == 'owner-primary-only') | 1048 else if (this.user.multiProfilesPolicy == 'owner-primary-only') |
1049 this.querySelector('.mp-owner-primary-only-msg').hidden = false; | 1049 this.querySelector('.mp-owner-primary-only-msg').hidden = false; |
(...skipping 874 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1924 else | 1924 else |
1925 return this.nameElement; | 1925 return this.nameElement; |
1926 }, | 1926 }, |
1927 | 1927 |
1928 /** @override */ | 1928 /** @override */ |
1929 update: function() { | 1929 update: function() { |
1930 this.imageElement.src = this.user.userImage; | 1930 this.imageElement.src = this.user.userImage; |
1931 this.nameElement.textContent = this.user.displayName; | 1931 this.nameElement.textContent = this.user.displayName; |
1932 | 1932 |
1933 var isLockedUser = this.user.needsSignin; | 1933 var isLockedUser = this.user.needsSignin; |
1934 var isLegacySupervisedUser = this.user.supervisedUser; | 1934 var isLegacySupervisedUser = this.user.legacySupervisedUser; |
1935 var isChildUser = this.user.childUser; | 1935 var isChildUser = this.user.childUser; |
1936 this.classList.toggle('locked', isLockedUser); | 1936 this.classList.toggle('locked', isLockedUser); |
1937 this.classList.toggle('legacy-supervised', isLegacySupervisedUser); | 1937 this.classList.toggle('legacy-supervised', isLegacySupervisedUser); |
1938 this.classList.toggle('child', isChildUser); | 1938 this.classList.toggle('child', isChildUser); |
1939 | 1939 |
1940 if (this.isAuthTypeUserClick) | 1940 if (this.isAuthTypeUserClick) |
1941 this.passwordLabelElement.textContent = this.authValue; | 1941 this.passwordLabelElement.textContent = this.authValue; |
1942 | 1942 |
1943 this.actionBoxRemoveUserWarningTextElement.hidden = | 1943 this.actionBoxRemoveUserWarningTextElement.hidden = |
1944 isLegacySupervisedUser; | 1944 isLegacySupervisedUser; |
(...skipping 1189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3134 if (pod && pod.multiProfilesPolicyApplied) { | 3134 if (pod && pod.multiProfilesPolicyApplied) { |
3135 pod.userTypeBubbleElement.classList.remove('bubble-shown'); | 3135 pod.userTypeBubbleElement.classList.remove('bubble-shown'); |
3136 } | 3136 } |
3137 } | 3137 } |
3138 }; | 3138 }; |
3139 | 3139 |
3140 return { | 3140 return { |
3141 PodRow: PodRow | 3141 PodRow: PodRow |
3142 }; | 3142 }; |
3143 }); | 3143 }); |
OLD | NEW |