| 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 1119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1130 | 1130 |
| 1131 setPinVisibility: function(visible) { | 1131 setPinVisibility: function(visible) { |
| 1132 var elements = [this, this.authElement, this.imageElement, | 1132 var elements = [this, this.authElement, this.imageElement, |
| 1133 this.signInElement, this.pinContainer]; | 1133 this.signInElement, this.pinContainer]; |
| 1134 | 1134 |
| 1135 for (var idx = 0; idx < elements.length; idx++) { | 1135 for (var idx = 0; idx < elements.length; idx++) { |
| 1136 var currentElement = elements[idx]; | 1136 var currentElement = elements[idx]; |
| 1137 currentElement.classList.toggle('pin-enabled', visible); | 1137 currentElement.classList.toggle('pin-enabled', visible); |
| 1138 currentElement.classList.toggle('pin-disabled', !visible); | 1138 currentElement.classList.toggle('pin-disabled', !visible); |
| 1139 } | 1139 } |
| 1140 |
| 1141 // Set the focus to the input element after showing/hiding pin keyboard. |
| 1142 if (visible) |
| 1143 this.pinKeyboard.focus(); |
| 1144 else |
| 1145 this.mainInput.focus(); |
| 1140 }, | 1146 }, |
| 1141 | 1147 |
| 1142 setUserPodIconType: function(userTypeClass) { | 1148 setUserPodIconType: function(userTypeClass) { |
| 1143 this.userTypeIconAreaElement.classList.add(userTypeClass); | 1149 this.userTypeIconAreaElement.classList.add(userTypeClass); |
| 1144 this.userTypeIconAreaElement.hidden = false; | 1150 this.userTypeIconAreaElement.hidden = false; |
| 1145 }, | 1151 }, |
| 1146 | 1152 |
| 1147 /** | 1153 /** |
| 1148 * The user that this pod represents. | 1154 * The user that this pod represents. |
| 1149 * @type {!Object} | 1155 * @type {!Object} |
| (...skipping 2347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3497 if (pod && pod.multiProfilesPolicyApplied) { | 3503 if (pod && pod.multiProfilesPolicyApplied) { |
| 3498 pod.userTypeBubbleElement.classList.remove('bubble-shown'); | 3504 pod.userTypeBubbleElement.classList.remove('bubble-shown'); |
| 3499 } | 3505 } |
| 3500 } | 3506 } |
| 3501 }; | 3507 }; |
| 3502 | 3508 |
| 3503 return { | 3509 return { |
| 3504 PodRow: PodRow | 3510 PodRow: PodRow |
| 3505 }; | 3511 }; |
| 3506 }); | 3512 }); |
| OLD | NEW |