Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 | 6 * @fileoverview |
| 7 * 'pin-keyboard' is a keyboard that can be used to enter PINs or more generally | 7 * 'pin-keyboard' is a keyboard that can be used to enter PINs or more generally |
| 8 * numeric values. | 8 * numeric values. |
| 9 * | 9 * |
| 10 * Properties: | 10 * Properties: |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 77 event.preventDefault(); | 77 event.preventDefault(); |
| 78 return; | 78 return; |
| 79 } | 79 } |
| 80 | 80 |
| 81 // Enter pressed. | 81 // Enter pressed. |
| 82 if (event.keyCode == 13) { | 82 if (event.keyCode == 13) { |
| 83 this.firePinSubmitEvent_(); | 83 this.firePinSubmitEvent_(); |
| 84 event.preventDefault(); | 84 event.preventDefault(); |
| 85 return; | 85 return; |
| 86 } | 86 } |
| 87 }, | |
| 88 | |
| 89 /** | |
| 90 * Changes the color of the submit button if PIN is ready. | |
| 91 * @param {string} value | |
| 92 */ | |
| 93 computeSubmitClass_: function(value) { | |
| 94 var pinLength = value.length; | |
| 95 return pinLength > 0 ? 'ready-background' : ''; | |
|
jdufault
2016/06/30 18:15:48
Inline value.length
sammiequon
2016/06/30 22:17:14
Done.
| |
| 87 } | 96 } |
| 88 }); | 97 }); |
| OLD | NEW |