Chromium Code Reviews| Index: ui/login/account_picker/user_pod_row.js |
| diff --git a/ui/login/account_picker/user_pod_row.js b/ui/login/account_picker/user_pod_row.js |
| index 6b23a93f9d9fcd3c22b8b9b024f179005d0cc5cf..d3f5d4900115a0f9534ac8248426abaca1366836 100644 |
| --- a/ui/login/account_picker/user_pod_row.js |
| +++ b/ui/login/account_picker/user_pod_row.js |
| @@ -56,7 +56,7 @@ cr.define('login', function() { |
| var CROS_POD_HEIGHT = 213; |
| var DESKTOP_POD_HEIGHT = 226; |
| var MD_DESKTOP_POD_HEIGHT = 200; |
| - var POD_ROW_PADDING = 10; |
| + var POD_ROW_PADDING = 0; |
|
jdufault
2016/05/31 19:24:52
Have you tested this with multiple pods? We probab
|
| var DESKTOP_ROW_PADDING = 32; |
| var CUSTOM_ICON_CONTAINER_SIZE = 40; |
| @@ -155,6 +155,8 @@ cr.define('login', function() { |
| var UserPod = cr.ui.define(function() { |
| var node = $('user-pod-template').cloneNode(true); |
| node.removeAttribute('id'); |
| + |
|
jdufault
2016/05/31 19:24:52
Remove extraneous lines.
sammiequon
2016/06/14 22:22:22
Done.
|
| + |
| return node; |
| }); |
| @@ -732,12 +734,6 @@ cr.define('login', function() { |
| 'keydown', |
| this.handleRemoveUserConfirmationKeyDown_.bind(this)); |
| - var pinKeyboard = $('pin-keyboard'); |
| - // The pin keyboard is not present on the md user manager. |
| - if (pinKeyboard) { |
| - pinKeyboard.addEventListener('submit', |
| - this.handlePinSubmitted_.bind(this)); |
| - } |
| var customIcon = this.customIconElement; |
| customIcon.parentNode.replaceChild(new UserPodCustomIcon(), customIcon); |
| @@ -778,7 +774,7 @@ cr.define('login', function() { |
| */ |
| handlePinSubmitted_: function(e) { |
| var pin = e.detail.pin; |
| - chrome.send('authenticateUserWithPin', [this.user.username, pin]); |
| + chrome.send('authenticateUser', [this.user.username, pin]); |
|
jdufault
2016/05/31 19:24:52
Drop this change, it is handled in a different CL.
|
| }, |
| /** |
| @@ -2432,6 +2428,21 @@ cr.define('login', function() { |
| else |
| userPod = new UserPod({user: user}); |
| + var pinKeyboard = userPod.getElementsByTagName('pin-keyboard'); |
| + |
| + var handlePinSubmitted_ = function(e) { |
| + var pin = e.detail.pin; |
| + // TODO: hardcode this.user.username |
|
jdufault
2016/05/31 19:24:52
Remove TODO?
sammiequon
2016/06/14 22:22:22
Done.
|
| + chrome.send('authenticateUser', [user.username, pin]); |
| + } |
| + |
| + // The pin keyboard is not present on the md user manager. |
| + if (pinKeyboard && pinKeyboard.length > 0) { |
| + pinKeyboard[0].addEventListener('submit', |
|
jdufault
2016/05/31 19:24:52
Can we add the event listener directly to the |use
sammiequon
2016/06/14 22:22:22
Done.
|
| + handlePinSubmitted_.bind(this)); |
| + } |
| + |
| + |
| userPod.hidden = false; |
| return userPod; |
| }, |