| 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 1109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1120 if (visible && Oobe.getInstance().virtualKeyboardShown) | 1120 if (visible && Oobe.getInstance().virtualKeyboardShown) |
| 1121 return; | 1121 return; |
| 1122 | 1122 |
| 1123 var elements = this.getElementsByClassName('pin-tag'); | 1123 var elements = this.getElementsByClassName('pin-tag'); |
| 1124 for (var i = 0; i < elements.length; ++i) | 1124 for (var i = 0; i < elements.length; ++i) |
| 1125 this.updatePinClass_(elements[i], visible); | 1125 this.updatePinClass_(elements[i], visible); |
| 1126 this.updatePinClass_(this, visible); | 1126 this.updatePinClass_(this, visible); |
| 1127 | 1127 |
| 1128 // Set the focus to the input element after showing/hiding pin keyboard. | 1128 // Set the focus to the input element after showing/hiding pin keyboard. |
| 1129 this.mainInput.focus(); | 1129 this.mainInput.focus(); |
| 1130 |
| 1131 // Change the password placeholder based on pin keyboard visibility. |
| 1132 this.passwordElement.placeholder = loadTimeData.getString(visible ? |
| 1133 'pinKeyboardPlaceholderPinPassword' : 'passwordHint'); |
| 1130 }, | 1134 }, |
| 1131 | 1135 |
| 1132 isPinShown: function() { | 1136 isPinShown: function() { |
| 1133 return this.classList.contains('pin-enabled'); | 1137 return this.classList.contains('pin-enabled'); |
| 1134 }, | 1138 }, |
| 1135 | 1139 |
| 1136 setUserPodIconType: function(userTypeClass) { | 1140 setUserPodIconType: function(userTypeClass) { |
| 1137 this.userTypeIconAreaElement.classList.add(userTypeClass); | 1141 this.userTypeIconAreaElement.classList.add(userTypeClass); |
| 1138 this.userTypeIconAreaElement.hidden = false; | 1142 this.userTypeIconAreaElement.hidden = false; |
| 1139 }, | 1143 }, |
| (...skipping 2433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3573 if (pod && pod.multiProfilesPolicyApplied) { | 3577 if (pod && pod.multiProfilesPolicyApplied) { |
| 3574 pod.userTypeBubbleElement.classList.remove('bubble-shown'); | 3578 pod.userTypeBubbleElement.classList.remove('bubble-shown'); |
| 3575 } | 3579 } |
| 3576 } | 3580 } |
| 3577 }; | 3581 }; |
| 3578 | 3582 |
| 3579 return { | 3583 return { |
| 3580 PodRow: PodRow | 3584 PodRow: PodRow |
| 3581 }; | 3585 }; |
| 3582 }); | 3586 }); |
| OLD | NEW |