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({ | 5 Polymer({ |
6 is: 'gaia-password-changed', | 6 is: 'gaia-password-changed', |
7 | 7 |
8 properties: { | 8 properties: { |
9 email: String, | 9 email: String, |
10 | 10 |
11 disabled: { | 11 disabled: {type: Boolean, value: false} |
12 type: Boolean, | |
13 value: false | |
14 } | |
15 }, | 12 }, |
16 | 13 |
17 ready: function() { | 14 ready: function() { |
18 /** | 15 /** |
19 * Workaround for | 16 * Workaround for |
20 * https://github.com/PolymerElements/neon-animation/issues/32 | 17 * https://github.com/PolymerElements/neon-animation/issues/32 |
21 * TODO(dzhioev): Remove when fixed in Polymer. | 18 * TODO(dzhioev): Remove when fixed in Polymer. |
22 */ | 19 */ |
23 var pages = this.$.animatedPages; | 20 var pages = this.$.animatedPages; |
24 delete pages._squelchNextFinishEvent; | 21 delete pages._squelchNextFinishEvent; |
25 Object.defineProperty(pages, '_squelchNextFinishEvent', | 22 Object.defineProperty(pages, '_squelchNextFinishEvent', { |
26 { get: function() { return false; } }); | 23 get: function() { |
| 24 return false; |
| 25 } |
| 26 }); |
27 }, | 27 }, |
28 | 28 |
29 invalidate: function() { | 29 invalidate: function() { |
30 this.$.oldPasswordInput.isInvalid = true; | 30 this.$.oldPasswordInput.isInvalid = true; |
31 }, | 31 }, |
32 | 32 |
33 reset: function() { | 33 reset: function() { |
34 this.$.animatedPages.selected = 0; | 34 this.$.animatedPages.selected = 0; |
35 this.clearPassword(); | 35 this.clearPassword(); |
36 this.$.oldPasswordInput.isInvalid = false; | 36 this.$.oldPasswordInput.isInvalid = false; |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 this.disabled = true; | 75 this.disabled = true; |
76 this.$.navigation.closeVisible = false; | 76 this.$.navigation.closeVisible = false; |
77 this.$.animatedPages.selected = 2; | 77 this.$.animatedPages.selected = 2; |
78 this.fire('proceedAnyway'); | 78 this.fire('proceedAnyway'); |
79 }, | 79 }, |
80 | 80 |
81 onClose_: function() { | 81 onClose_: function() { |
82 this.fire('cancel'); | 82 this.fire('cancel'); |
83 } | 83 } |
84 }); | 84 }); |
OLD | NEW |