| 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 794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 805 /** | 805 /** |
| 806 * Initializes the pod after its properties set and added to a pod row. | 806 * Initializes the pod after its properties set and added to a pod row. |
| 807 */ | 807 */ |
| 808 initialize: function() { | 808 initialize: function() { |
| 809 this.passwordElement.addEventListener('keydown', | 809 this.passwordElement.addEventListener('keydown', |
| 810 this.parentNode.handleKeyDown.bind(this.parentNode)); | 810 this.parentNode.handleKeyDown.bind(this.parentNode)); |
| 811 this.passwordElement.addEventListener('keypress', | 811 this.passwordElement.addEventListener('keypress', |
| 812 this.handlePasswordKeyPress_.bind(this)); | 812 this.handlePasswordKeyPress_.bind(this)); |
| 813 this.passwordElement.addEventListener('input', | 813 this.passwordElement.addEventListener('input', |
| 814 this.handleInputChanged_.bind(this)); | 814 this.handleInputChanged_.bind(this)); |
| 815 this.passwordElement.addEventListener('mouseup', | |
| 816 this.handleInputMouseUp_.bind(this)); | |
| 817 | 815 |
| 818 if (this.submitButton) { | 816 if (this.submitButton) { |
| 819 this.submitButton.addEventListener('click', | 817 this.submitButton.addEventListener('click', |
| 820 this.handleSubmitButtonClick_.bind(this)); | 818 this.handleSubmitButtonClick_.bind(this)); |
| 821 } | 819 } |
| 822 | 820 |
| 823 this.imageElement.addEventListener('load', | 821 this.imageElement.addEventListener('load', |
| 824 this.parentNode.handlePodImageLoad.bind(this.parentNode, this)); | 822 this.parentNode.handlePodImageLoad.bind(this.parentNode, this)); |
| 825 | 823 |
| 826 var initialAuthType = this.user.initialAuthType || | 824 var initialAuthType = this.user.initialAuthType || |
| (...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1251 for (var i = 0; i < elements.length; ++i) | 1249 for (var i = 0; i < elements.length; ++i) |
| 1252 this.updatePinClass_(elements[i], visible); | 1250 this.updatePinClass_(elements[i], visible); |
| 1253 this.updatePinClass_(this, visible); | 1251 this.updatePinClass_(this, visible); |
| 1254 | 1252 |
| 1255 // Set the focus to the input element after showing/hiding pin keyboard. | 1253 // Set the focus to the input element after showing/hiding pin keyboard. |
| 1256 this.mainInput.focus(); | 1254 this.mainInput.focus(); |
| 1257 | 1255 |
| 1258 // Change the password placeholder based on pin keyboard visibility. | 1256 // Change the password placeholder based on pin keyboard visibility. |
| 1259 this.passwordElement.placeholder = loadTimeData.getString(visible ? | 1257 this.passwordElement.placeholder = loadTimeData.getString(visible ? |
| 1260 'pinKeyboardPlaceholderPinPassword' : 'passwordHint'); | 1258 'pinKeyboardPlaceholderPinPassword' : 'passwordHint'); |
| 1261 | |
| 1262 chrome.send('setForceDisableVirtualKeyboard', [visible]); | |
| 1263 }, | 1259 }, |
| 1264 | 1260 |
| 1265 isPinShown: function() { | 1261 isPinShown: function() { |
| 1266 return this.classList.contains('pin-enabled'); | 1262 return this.classList.contains('pin-enabled'); |
| 1267 }, | 1263 }, |
| 1268 | 1264 |
| 1269 setUserPodIconType: function(userTypeClass) { | 1265 setUserPodIconType: function(userTypeClass) { |
| 1270 this.userTypeIconAreaElement.classList.add(userTypeClass); | 1266 this.userTypeIconAreaElement.classList.add(userTypeClass); |
| 1271 this.userTypeIconAreaElement.hidden = false; | 1267 this.userTypeIconAreaElement.hidden = false; |
| 1272 }, | 1268 }, |
| (...skipping 2702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3975 if (pod && pod.multiProfilesPolicyApplied) { | 3971 if (pod && pod.multiProfilesPolicyApplied) { |
| 3976 pod.userTypeBubbleElement.classList.remove('bubble-shown'); | 3972 pod.userTypeBubbleElement.classList.remove('bubble-shown'); |
| 3977 } | 3973 } |
| 3978 } | 3974 } |
| 3979 }; | 3975 }; |
| 3980 | 3976 |
| 3981 return { | 3977 return { |
| 3982 PodRow: PodRow | 3978 PodRow: PodRow |
| 3983 }; | 3979 }; |
| 3984 }); | 3980 }); |
| OLD | NEW |