| 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 1093 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1104 | 1104 |
| 1105 setPinVisibility: function(visible) { | 1105 setPinVisibility: function(visible) { |
| 1106 var elements = this.getElementsByClassName('pin-tag'); | 1106 var elements = this.getElementsByClassName('pin-tag'); |
| 1107 for (var i = 0; i < elements.length; ++i) | 1107 for (var i = 0; i < elements.length; ++i) |
| 1108 this.updatePinClass_(elements[i], visible); | 1108 this.updatePinClass_(elements[i], visible); |
| 1109 this.updatePinClass_(this, visible); | 1109 this.updatePinClass_(this, visible); |
| 1110 | 1110 |
| 1111 // Set the focus to the input element after showing/hiding pin keyboard. | 1111 // Set the focus to the input element after showing/hiding pin keyboard. |
| 1112 if (visible) | 1112 if (visible) |
| 1113 this.pinKeyboard.focus(); | 1113 this.pinKeyboard.focus(); |
| 1114 else | |
| 1115 this.mainInput.focus(); | |
| 1116 }, | 1114 }, |
| 1117 | 1115 |
| 1118 isPinShown: function() { | 1116 isPinShown: function() { |
| 1119 return this.classList.contains('pin-enabled'); | 1117 return this.classList.contains('pin-enabled'); |
| 1120 }, | 1118 }, |
| 1121 | 1119 |
| 1122 setUserPodIconType: function(userTypeClass) { | 1120 setUserPodIconType: function(userTypeClass) { |
| 1123 this.userTypeIconAreaElement.classList.add(userTypeClass); | 1121 this.userTypeIconAreaElement.classList.add(userTypeClass); |
| 1124 this.userTypeIconAreaElement.hidden = false; | 1122 this.userTypeIconAreaElement.hidden = false; |
| 1125 }, | 1123 }, |
| (...skipping 2392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3518 if (pod && pod.multiProfilesPolicyApplied) { | 3516 if (pod && pod.multiProfilesPolicyApplied) { |
| 3519 pod.userTypeBubbleElement.classList.remove('bubble-shown'); | 3517 pod.userTypeBubbleElement.classList.remove('bubble-shown'); |
| 3520 } | 3518 } |
| 3521 } | 3519 } |
| 3522 }; | 3520 }; |
| 3523 | 3521 |
| 3524 return { | 3522 return { |
| 3525 PodRow: PodRow | 3523 PodRow: PodRow |
| 3526 }; | 3524 }; |
| 3527 }); | 3525 }); |
| OLD | NEW |