Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(106)

Unified Diff: chrome/browser/resources/options/chromeos/bluetooth_pair_device_overlay.js

Issue 13870020: Bluetooth: Add support for pairing display notifications (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fixed wrong check made twice Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/webui/options/chromeos/bluetooth_options_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/options/chromeos/bluetooth_pair_device_overlay.js
diff --git a/chrome/browser/resources/options/chromeos/bluetooth_pair_device_overlay.js b/chrome/browser/resources/options/chromeos/bluetooth_pair_device_overlay.js
index 9d35b57cbd6cae9a8e0c4c166655c20095f669e8..a74f0aabe51472f3ceaca9865650977a1e7c5587 100644
--- a/chrome/browser/resources/options/chromeos/bluetooth_pair_device_overlay.js
+++ b/chrome/browser/resources/options/chromeos/bluetooth_pair_device_overlay.js
@@ -274,12 +274,14 @@ cr.define('options', function() {
'bluetooth-keyboard-button' : 'bluetooth-passkey-char';
this.clearElement_(passkeyEl);
var key = String(this.device_.passkey);
- var progress = this.device_.entered | 0;
+ var progress = this.device_.entered;
for (var i = 0; i < key.length; i++) {
var keyEl = document.createElement('span');
keyEl.textContent = key.charAt(i);
keyEl.className = keyClass;
- if (i < progress)
+ if (progress == undefined)
+ keyEl.classList.add('key-pin');
+ else if (i < progress)
keyEl.classList.add('key-typed');
passkeyEl.appendChild(keyEl);
}
@@ -290,6 +292,10 @@ cr.define('options', function() {
keyEl.textContent = label;
keyEl.className = keyClass;
keyEl.id = 'bluetooth-enter-key';
+ if (progress == undefined)
+ keyEl.classList.add('key-pin');
+ else if (progress > key.length)
+ keyEl.classList.add('key-typed');
passkeyEl.appendChild(keyEl);
}
passkeyEl.hidden = false;
« no previous file with comments | « no previous file | chrome/browser/ui/webui/options/chromeos/bluetooth_options_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698