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
3 // found in the LICENSE file.
6 is
: 'gaia-password-changed',
20 * https://github.com/PolymerElements/neon-animation/issues/32
21 * TODO(dzhioev): Remove when fixed in Polymer.
23 var pages
= this.$.animatedPages
;
24 delete pages
._squelchNextFinishEvent
;
25 Object
.defineProperty(pages
, '_squelchNextFinishEvent',
26 { get: function() { return false; } });
29 invalidate: function() {
30 this.$.oldPasswordInput
.isInvalid
= true;
34 this.$.animatedPages
.selected
= 0;
36 this.$.oldPasswordInput
.isInvalid
= false;
37 this.disabled
= false;
38 this.$.closeButton
.hidden
= false;
39 this.$.oldPasswordCard
.classList
.remove('disabled');
44 if (this.$.animatedPages
.selected
== 0)
45 this.$.oldPasswordInput
.focus();
48 onPasswordSubmitted_: function() {
49 if (!this.$.oldPasswordInput
.checkValidity())
51 this.$.oldPasswordCard
.classList
.add('disabled');
53 this.fire('passwordEnter', {password
: this.$.oldPasswordInput
.value
});
56 onForgotPasswordClicked_: function() {
58 this.$.animatedPages
.selected
+= 1;
61 onTryAgainClicked_: function() {
62 this.$.oldPasswordInput
.isInvalid
= false;
63 this.$.animatedPages
.selected
-= 1;
66 onAnimationFinish_: function() {
70 clearPassword: function() {
71 this.$.oldPasswordInput
.value
= '';
74 onProceedClicked_: function() {
76 this.$.closeButton
.hidden
= true;
77 this.$.animatedPages
.selected
= 2;
78 this.fire('proceedAnyway');
81 onClose_: function() {