OLD | NEW |
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((function() { | 5 Polymer((function() { |
6 var DEFAULT_EMAIL_DOMAIN = '@gmail.com'; | 6 var DEFAULT_EMAIL_DOMAIN = '@gmail.com'; |
7 | 7 |
8 var TRANSITION_TYPE = {FORWARD: 0, BACKWARD: 1, NONE: 2}; | 8 var TRANSITION_TYPE = {FORWARD: 0, BACKWARD: 1, NONE: 2}; |
9 | 9 |
10 return { | 10 return { |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 loadTimeData.getStringF('enterpriseInfoMessage', this.domain); | 51 loadTimeData.getStringF('enterpriseInfoMessage', this.domain); |
52 this.showEnterpriseMessage = !!this.domain.length; | 52 this.showEnterpriseMessage = !!this.domain.length; |
53 }, | 53 }, |
54 | 54 |
55 onAnimationFinish_: function() { | 55 onAnimationFinish_: function() { |
56 this.fire('backButton', !this.isEmailSectionActive_()); | 56 this.fire('backButton', !this.isEmailSectionActive_()); |
57 this.focus(); | 57 this.focus(); |
58 }, | 58 }, |
59 | 59 |
60 onForgotPasswordClicked_: function() { | 60 onForgotPasswordClicked_: function() { |
61 this.$.forgotPasswordDlg.fitInto = this; | |
62 this.disabled = true; | 61 this.disabled = true; |
63 this.fire('dialogShown'); | 62 this.fire('dialogShown'); |
64 this.$.forgotPasswordDlg.open(); | 63 this.$.forgotPasswordDlg.showModal(); |
65 this.$.passwordCard.classList.add('full-disabled'); | 64 this.$.passwordCard.classList.add('full-disabled'); |
66 this.$.forgotPasswordDlg.focus(); | 65 }, |
| 66 |
| 67 onForgotPasswordCloseTap_: function() { |
| 68 this.$.forgotPasswordDlg.close(); |
67 }, | 69 }, |
68 | 70 |
69 onDialogOverlayClosed_: function() { | 71 onDialogOverlayClosed_: function() { |
70 this.fire('dialogHidden'); | 72 this.fire('dialogHidden'); |
71 this.disabled = false; | 73 this.disabled = false; |
72 this.$.passwordCard.classList.remove('full-disabled'); | 74 this.$.passwordCard.classList.remove('full-disabled'); |
73 }, | 75 }, |
74 | 76 |
75 setEmail: function(email) { | 77 setEmail: function(email) { |
76 if (email) { | 78 if (email) { |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 } | 149 } |
148 var isForward = transitionType === TRANSITION_TYPE.FORWARD; | 150 var isForward = transitionType === TRANSITION_TYPE.FORWARD; |
149 var isRTL = this.isRTL_(); | 151 var isRTL = this.isRTL_(); |
150 this.$.animatedPages.entryAnimation = 'slide-from-' + | 152 this.$.animatedPages.entryAnimation = 'slide-from-' + |
151 (isForward === isRTL ? 'left' : 'right') + '-animation'; | 153 (isForward === isRTL ? 'left' : 'right') + '-animation'; |
152 this.$.animatedPages.exitAnimation = | 154 this.$.animatedPages.exitAnimation = |
153 'slide-' + (isForward === isRTL ? 'right' : 'left') + '-animation'; | 155 'slide-' + (isForward === isRTL ? 'right' : 'left') + '-animation'; |
154 } | 156 } |
155 }; | 157 }; |
156 })()); | 158 })()); |
OLD | NEW |