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

Side by Side Diff: ui/login/account_picker/user_pod_row.js

Issue 2027683003: Pin keyboard moved to under the user profile. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Fixed patch set 2 errors. Created 4 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview User pod row implementation. 6 * @fileoverview User pod row implementation.
7 */ 7 */
8 8
9 cr.define('login', function() { 9 cr.define('login', function() {
10 /** 10 /**
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after
728 this.handleRemoveCommandClick_.bind(this)); 728 this.handleRemoveCommandClick_.bind(this));
729 this.actionBoxMenuRemoveElement.addEventListener('keydown', 729 this.actionBoxMenuRemoveElement.addEventListener('keydown',
730 this.handleRemoveCommandKeyDown_.bind(this)); 730 this.handleRemoveCommandKeyDown_.bind(this));
731 this.actionBoxMenuRemoveElement.addEventListener('blur', 731 this.actionBoxMenuRemoveElement.addEventListener('blur',
732 this.handleRemoveCommandBlur_.bind(this)); 732 this.handleRemoveCommandBlur_.bind(this));
733 this.actionBoxRemoveUserWarningButtonElement.addEventListener('click', 733 this.actionBoxRemoveUserWarningButtonElement.addEventListener('click',
734 this.handleRemoveUserConfirmationClick_.bind(this)); 734 this.handleRemoveUserConfirmationClick_.bind(this));
735 this.actionBoxRemoveUserWarningButtonElement.addEventListener('keydown', 735 this.actionBoxRemoveUserWarningButtonElement.addEventListener('keydown',
736 this.handleRemoveUserConfirmationKeyDown_.bind(this)); 736 this.handleRemoveUserConfirmationKeyDown_.bind(this));
737 737
738 var pinKeyboard = $('pin-keyboard');
739 // The pin keyboard is not present on the md user manager.
740 if (pinKeyboard) {
741 pinKeyboard.addEventListener('submit',
742 this.handlePinSubmitted_.bind(this));
743 }
744
745 var customIcon = this.customIconElement; 738 var customIcon = this.customIconElement;
746 customIcon.parentNode.replaceChild(new UserPodCustomIcon(), customIcon); 739 customIcon.parentNode.replaceChild(new UserPodCustomIcon(), customIcon);
747 }, 740 },
748 741
749 /** 742 /**
750 * Initializes the pod after its properties set and added to a pod row. 743 * Initializes the pod after its properties set and added to a pod row.
751 */ 744 */
752 initialize: function() { 745 initialize: function() {
753 this.passwordElement.addEventListener('keydown', 746 this.passwordElement.addEventListener('keydown',
754 this.parentNode.handleKeyDown.bind(this.parentNode)); 747 this.parentNode.handleKeyDown.bind(this.parentNode));
755 this.passwordElement.addEventListener('keypress', 748 this.passwordElement.addEventListener('keypress',
756 this.handlePasswordKeyPress_.bind(this)); 749 this.handlePasswordKeyPress_.bind(this));
757 750
751 if (this.pinKeyboard) {
752 this.pinKeyboard.addEventListener('submit',
753 this.handlePinSubmitted_.bind(this));
754 }
755
758 this.imageElement.addEventListener('load', 756 this.imageElement.addEventListener('load',
759 this.parentNode.handlePodImageLoad.bind(this.parentNode, this)); 757 this.parentNode.handlePodImageLoad.bind(this.parentNode, this));
760 758
761 var initialAuthType = this.user.initialAuthType || 759 var initialAuthType = this.user.initialAuthType ||
762 AUTH_TYPE.OFFLINE_PASSWORD; 760 AUTH_TYPE.OFFLINE_PASSWORD;
763 this.setAuthType(initialAuthType, null); 761 this.setAuthType(initialAuthType, null);
764 762
765 this.userClickAuthAllowed_ = false; 763 this.userClickAuthAllowed_ = false;
766 }, 764 },
767 765
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 }, 828 },
831 829
832 /** 830 /**
833 * Height number of pixels. 831 * Height number of pixels.
834 */ 832 */
835 get height() { 833 get height() {
836 return this.offsetHeight; 834 return this.offsetHeight;
837 }, 835 },
838 836
839 /** 837 /**
838 * Gets the authorization element of the pod.
839 * @type {!HTMLDivElement}
840 */
841 get authElement() {
842 return this.querySelector('.auth-container');
843 },
844
845 /**
840 * Gets image element. 846 * Gets image element.
841 * @type {!HTMLImageElement} 847 * @type {!HTMLImageElement}
842 */ 848 */
843 get imageElement() { 849 get imageElement() {
844 return this.querySelector('.user-image'); 850 return this.querySelector('.user-image');
845 }, 851 },
846 852
847 /** 853 /**
848 * Gets name element. 854 * Gets name element.
849 * @type {!HTMLDivElement} 855 * @type {!HTMLDivElement}
(...skipping 29 matching lines...) Expand all
879 /** 885 /**
880 * Gets the password label, which is used to show a message where the 886 * Gets the password label, which is used to show a message where the
881 * password field is normally. 887 * password field is normally.
882 * @type {!HTMLInputElement} 888 * @type {!HTMLInputElement}
883 */ 889 */
884 get passwordLabelElement() { 890 get passwordLabelElement() {
885 return this.querySelector('.password-label'); 891 return this.querySelector('.password-label');
886 }, 892 },
887 893
888 /** 894 /**
895 * Gets the pin-keyboard of the pod.
896 * @type {!HTMLElement}
897 */
898 get pinKeyboard() {
899 return this.querySelector('pin-keyboard');
900 },
901
902 /**
889 * Gets user online sign in hint element. 903 * Gets user online sign in hint element.
890 * @type {!HTMLDivElement} 904 * @type {!HTMLDivElement}
891 */ 905 */
892 get reauthWarningElement() { 906 get reauthWarningElement() {
893 return this.querySelector('.reauth-hint-container'); 907 return this.querySelector('.reauth-hint-container');
894 }, 908 },
895 909
896 /** 910 /**
911 * Gets the signed in indicator of the pod.
912 * @type {!HTMLDivElement}
913 */
914 get signInElement() {
915 return this.querySelector('.signed-in-indicator');
916 },
917
918 /**
897 * Gets the container holding the launch app button. 919 * Gets the container holding the launch app button.
898 * @type {!HTMLButtonElement} 920 * @type {!HTMLButtonElement}
899 */ 921 */
900 get launchAppButtonContainerElement() { 922 get launchAppButtonContainerElement() {
901 return this.querySelector('.launch-app-button-container'); 923 return this.querySelector('.launch-app-button-container');
902 }, 924 },
903 925
904 /** 926 /**
905 * Gets launch app button. 927 * Gets launch app button.
906 * @type {!HTMLButtonElement} 928 * @type {!HTMLButtonElement}
(...skipping 2520 matching lines...) Expand 10 before | Expand all | Expand 10 after
3427 if (pod && pod.multiProfilesPolicyApplied) { 3449 if (pod && pod.multiProfilesPolicyApplied) {
3428 pod.userTypeBubbleElement.classList.remove('bubble-shown'); 3450 pod.userTypeBubbleElement.classList.remove('bubble-shown');
3429 } 3451 }
3430 } 3452 }
3431 }; 3453 };
3432 3454
3433 return { 3455 return {
3434 PodRow: PodRow 3456 PodRow: PodRow
3435 }; 3457 };
3436 }); 3458 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698