Chromium Code Reviews| Index: chrome/browser/resources/chromeos/quick_unlock/pin_keyboard.js |
| diff --git a/chrome/browser/resources/chromeos/quick_unlock/pin_keyboard.js b/chrome/browser/resources/chromeos/quick_unlock/pin_keyboard.js |
| index dfc111d4c5fcd7c32df8aa1e7a95762d0894bfbb..8827527fbb507e6b5ff9f4ea6313039e36937b5a 100644 |
| --- a/chrome/browser/resources/chromeos/quick_unlock/pin_keyboard.js |
| +++ b/chrome/browser/resources/chromeos/quick_unlock/pin_keyboard.js |
| @@ -51,6 +51,12 @@ Polymer({ |
| this.fire('submit', { pin: this.value }); |
| }, |
| + /** Changes the color of the submit button if PIN is ready. */ |
| + changeSubmitColor_: function(pinLength) { |
| + var button = this.querySelectorAll('.submit-button .icon-container')[0]; |
| + button.classList.toggle('ready-background', pinLength > 0); |
| + }, |
| + |
| /** |
| * Fires an update event with the current PIN value. The event will only be |
| * fired if the PIN value has actually changed. |
| @@ -58,8 +64,10 @@ Polymer({ |
| * @param {string} previous |
| */ |
| onPinValueChange_: function(value, previous) { |
| - if (value != previous) |
| + if (value != previous) { |
| this.fire('pin-change', { pin: value }); |
| + this.changeSubmitColor_(value.length); |
|
jdufault
2016/06/27 19:17:52
The color should only be blue if value.length > 0,
|
| + } |
| }, |
| /** Called when the user wants to erase the last character of the entered |