Chromium Code Reviews| Index: chrome/browser/resources/chromeos/login/oobe_screen_hid_detection.js |
| diff --git a/chrome/browser/resources/chromeos/login/oobe_screen_hid_detection.js b/chrome/browser/resources/chromeos/login/oobe_screen_hid_detection.js |
| index 7610e2b788a4a22072d8d6b01f137c481a5b8c63..498846a572161ae4bfe3d15e8a8b921acf51d3d3 100644 |
| --- a/chrome/browser/resources/chromeos/login/oobe_screen_hid_detection.js |
| +++ b/chrome/browser/resources/chromeos/login/oobe_screen_hid_detection.js |
| @@ -79,6 +79,16 @@ login.createScreen('HIDDetectionScreen', 'hid-detection', function() { |
| deviceBlock.classList.remove(states[i]); |
| } |
| deviceBlock.classList.add(state); |
| + |
| + // 'Continue' button available iff at least one device is connected, |
| + if ($('hid-mouse-block').classList.contains('connected') || |
|
ygorshenin1
2014/12/24 09:34:47
Also, it would be nice to declare a dictionary for
ygorshenin1
2014/12/24 09:34:47
I thought it would be better to rewrite predicate
merkulova
2014/12/24 13:47:46
Done.
merkulova
2014/12/24 13:47:46
Done.
|
| + $('hid-mouse-block').classList.contains('paired') || |
| + $('hid-keyboard-block').classList.contains('connected') || |
| + $('hid-keyboard-block').classList.contains('paired')) { |
| + $('hid-continue-button').disabled = false; |
| + } else { |
| + $('hid-continue-button').disabled = true; |
| + } |
| }, |
| /** |
| @@ -142,15 +152,5 @@ login.createScreen('HIDDetectionScreen', 'hid-detection', function() { |
| } |
| } |
| }, |
| - |
| - /** |
|
ygorshenin1
2014/12/24 09:34:47
Why this code is removed?
merkulova
2014/12/24 13:47:46
1. Its logic is wrong: if list of connected device
|
| - * Event handler that is invoked just before the screen in shown. |
| - * @param {Object} data Screen init payload. |
| - */ |
| - onBeforeShow: function(data) { |
| - $('hid-continue-button').disabled = true; |
| - this.setDeviceBlockState_('hid-mouse-block', 'searching'); |
| - this.setDeviceBlockState_('hid-keyboard-block', 'searching'); |
| - }, |
| }; |
| }); |