| 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 88fa9278c24bbc0b6bfc51917402b1d18ee7b493..0f854e0ba07a820dc14601dd4c059926d1345f2e 100644
|
| --- a/ui/login/account_picker/user_pod_row.js
|
| +++ b/ui/login/account_picker/user_pod_row.js
|
| @@ -735,13 +735,6 @@ cr.define('login', function() {
|
| this.actionBoxRemoveUserWarningButtonElement.addEventListener('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);
|
| },
|
| @@ -755,6 +748,11 @@ cr.define('login', function() {
|
| this.passwordElement.addEventListener('keypress',
|
| this.handlePasswordKeyPress_.bind(this));
|
|
|
| + if (this.pinKeyboard) {
|
| + this.pinKeyboard.addEventListener('submit',
|
| + this.handlePinSubmitted_.bind(this));
|
| + }
|
| +
|
| this.imageElement.addEventListener('load',
|
| this.parentNode.handlePodImageLoad.bind(this.parentNode, this));
|
|
|
| @@ -837,6 +835,14 @@ cr.define('login', function() {
|
| },
|
|
|
| /**
|
| + * Gets the authorization element of the pod.
|
| + * @type {!HTMLDivElement}
|
| + */
|
| + get authElement() {
|
| + return this.querySelector('.auth-container');
|
| + },
|
| +
|
| + /**
|
| * Gets image element.
|
| * @type {!HTMLImageElement}
|
| */
|
| @@ -886,6 +892,22 @@ cr.define('login', function() {
|
| },
|
|
|
| /**
|
| + * Gets the pin-container of the pod.
|
| + * @type {!HTMLDivElement}
|
| + */
|
| + get pinContainer() {
|
| + return this.querySelector('.pin-container');
|
| + },
|
| +
|
| + /**
|
| + * Gets the pin-keyboard of the pod.
|
| + * @type {!HTMLElement}
|
| + */
|
| + get pinKeyboard() {
|
| + return this.querySelector('pin-keyboard');
|
| + },
|
| +
|
| + /**
|
| * Gets user online sign in hint element.
|
| * @type {!HTMLDivElement}
|
| */
|
| @@ -894,6 +916,14 @@ cr.define('login', function() {
|
| },
|
|
|
| /**
|
| + * Gets the signed in indicator of the pod.
|
| + * @type {!HTMLDivElement}
|
| + */
|
| + get signInElement() {
|
| + return this.querySelector('.signed-in-indicator');
|
| + },
|
| +
|
| + /**
|
| * Gets the container holding the launch app button.
|
| * @type {!HTMLButtonElement}
|
| */
|
| @@ -1094,6 +1124,17 @@ cr.define('login', function() {
|
| }
|
| },
|
|
|
| + setPinVisibility: function(visible) {
|
| + var elements = [this, this.authElement, this.imageElement,
|
| + this.signInElement, this.pinContainer];
|
| +
|
| + for (var idx = 0; idx < elements.length; idx++) {
|
| + var currentElement = elements[idx];
|
| + currentElement.classList.toggle('pin-enabled', visible);
|
| + currentElement.classList.toggle('pin-disabled', !visible);
|
| + }
|
| + },
|
| +
|
| setUserPodIconType: function(userTypeClass) {
|
| this.userTypeIconAreaElement.classList.add(userTypeClass);
|
| this.userTypeIconAreaElement.hidden = false;
|
| @@ -2510,6 +2551,11 @@ cr.define('login', function() {
|
| userPod.initialize();
|
| },
|
|
|
| + setFocusedPodPinVisibility: function(visible) {
|
| + if (this.focusedPod_ && this.focusedPod_.user.showPin)
|
| + this.focusedPod_.setPinVisibility(visible);
|
| + },
|
| +
|
| /**
|
| * Runs app with a given id from the list of loaded apps.
|
| * @param {!string} app_id of an app to run.
|
|
|