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

Side by Side Diff: chrome/browser/resources/chromeos/login/saml_confirm_password.js

Issue 2961103003: CrOS OOBE login: Replace last usages of paper-dialog with cr-dialog. (Closed)
Patch Set: Tweak Created 3 years, 5 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
« no previous file with comments | « chrome/browser/resources/chromeos/login/saml_confirm_password.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 Polymer({ 5 Polymer({
6 is: 'saml-confirm-password', 6 is: 'saml-confirm-password',
7 7
8 properties: { 8 properties: {
9 email: String, 9 email: String,
10 10
(...skipping 12 matching lines...) Expand all
23 var pages = this.$.animatedPages; 23 var pages = this.$.animatedPages;
24 delete pages._squelchNextFinishEvent; 24 delete pages._squelchNextFinishEvent;
25 Object.defineProperty(pages, '_squelchNextFinishEvent', { 25 Object.defineProperty(pages, '_squelchNextFinishEvent', {
26 get: function() { 26 get: function() {
27 return false; 27 return false;
28 } 28 }
29 }); 29 });
30 }, 30 },
31 31
32 reset: function() { 32 reset: function() {
33 this.$.cancelConfirmDlg.close(); 33 if (this.$.cancelConfirmDlg.open)
34 this.$.cancelConfirmDlg.close();
34 this.disabled = false; 35 this.disabled = false;
35 this.$.navigation.closeVisible = true; 36 this.$.navigation.closeVisible = true;
36 if (this.$.animatedPages.selected != 0) 37 if (this.$.animatedPages.selected != 0)
37 this.$.animatedPages.selected = 0; 38 this.$.animatedPages.selected = 0;
38 this.$.passwordInput.isInvalid = false; 39 this.$.passwordInput.isInvalid = false;
39 this.$.passwordInput.value = ''; 40 this.$.passwordInput.value = '';
40 if (this.manualInput) { 41 if (this.manualInput) {
41 this.$$('#confirmPasswordInput').isInvalid = false; 42 this.$$('#confirmPasswordInput').isInvalid = false;
42 this.$$('#confirmPasswordInput').value = ''; 43 this.$$('#confirmPasswordInput').value = '';
43 } 44 }
44 }, 45 },
45 46
46 invalidate: function() { 47 invalidate: function() {
47 this.$.passwordInput.isInvalid = true; 48 this.$.passwordInput.isInvalid = true;
48 }, 49 },
49 50
50 focus: function() { 51 focus: function() {
51 if (this.$.animatedPages.selected == 0) 52 if (this.$.animatedPages.selected == 0)
52 this.$.passwordInput.focus(); 53 this.$.passwordInput.focus();
53 }, 54 },
54 55
55 onClose_: function() { 56 onClose_: function() {
56 this.disabled = true; 57 this.disabled = true;
57 this.$.cancelConfirmDlg.fitInto = this; 58 this.$.cancelConfirmDlg.showModal();
58 this.$.cancelConfirmDlg.open();
59 }, 59 },
60 60
61 onConfirmCancel_: function() { 61 onCancelNo_: function() {
62 this.$.cancelConfirmDlg.close();
63 },
64
65 onCancelYes_: function() {
66 this.$.cancelConfirmDlg.close();
62 this.fire('cancel'); 67 this.fire('cancel');
63 }, 68 },
64 69
65 onPasswordSubmitted_: function() { 70 onPasswordSubmitted_: function() {
66 if (!this.$.passwordInput.checkValidity()) 71 if (!this.$.passwordInput.checkValidity())
67 return; 72 return;
68 if (this.manualInput) { 73 if (this.manualInput) {
69 // When using manual password entry, both passwords must match. 74 // When using manual password entry, both passwords must match.
70 var confirmPasswordInput = this.$$('#confirmPasswordInput'); 75 var confirmPasswordInput = this.$$('#confirmPasswordInput');
71 if (!confirmPasswordInput.checkValidity()) 76 if (!confirmPasswordInput.checkValidity())
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 }, 116 },
112 117
113 getConfirmPasswordInputLabel_: function() { 118 getConfirmPasswordInputLabel_: function() {
114 return loadTimeData.getString('confirmPasswordLabel'); 119 return loadTimeData.getString('confirmPasswordLabel');
115 }, 120 },
116 121
117 getConfirmPasswordInputError_: function() { 122 getConfirmPasswordInputError_: function() {
118 return loadTimeData.getString('manualPasswordMismatch'); 123 return loadTimeData.getString('manualPasswordMismatch');
119 } 124 }
120 }); 125 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/chromeos/login/saml_confirm_password.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698