OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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-manager-tutorial' is the element that controls the | 6 * @fileoverview 'user-manager-tutorial' is the element that controls the |
7 * tutorial steps for the user manager page. | 7 * tutorial steps for the user manager page. |
8 */ | 8 */ |
9 (function() { | 9 (function() { |
10 | 10 |
11 /** @enum {string} */ | 11 /** @enum {string} */ |
12 var TutorialSteps = { | 12 var TutorialSteps = { |
13 YOUR_CHROME: 'yourChrome', | 13 YOUR_CHROME: 'yourChrome', |
14 FRIENDS: 'friends', | 14 FRIENDS: 'friends', |
15 GUESTS: 'guests', | 15 GUESTS: 'guests', |
16 COMPLETE: 'complete', | 16 COMPLETE: 'complete', |
17 NOT_YOU: 'notYou' | 17 NOT_YOU: 'notYou' |
18 }; | 18 }; |
19 | 19 |
20 Polymer({ | 20 Polymer({ |
21 is: 'user-manager-tutorial', | 21 is: 'user-manager-tutorial', |
22 | 22 |
23 properties: { | 23 properties: { |
24 /** | 24 /** |
25 * True if the tutorial is currently hidden. | 25 * True if the tutorial is currently hidden. |
26 * @private {boolean} | 26 * @private {boolean} |
27 */ | 27 */ |
28 hidden_: { | 28 hidden_: {type: Boolean, value: true}, |
29 type: Boolean, | |
30 value: true | |
31 }, | |
32 | 29 |
33 /** | 30 /** |
34 * Current tutorial step ID. | 31 * Current tutorial step ID. |
35 * @type {string} | 32 * @type {string} |
36 */ | 33 */ |
37 currentStep_: { | 34 currentStep_: {type: String, value: ''}, |
38 type: String, | |
39 value: '' | |
40 }, | |
41 | 35 |
42 /** | 36 /** |
43 * Enum values for the step IDs. | 37 * Enum values for the step IDs. |
44 * @private {TutorialSteps} | 38 * @private {TutorialSteps} |
45 */ | 39 */ |
46 steps_: { | 40 steps_: {readOnly: true, type: Object, value: TutorialSteps} |
47 readOnly: true, | |
48 type: Object, | |
49 value: TutorialSteps | |
50 } | |
51 }, | 41 }, |
52 | 42 |
53 /** | 43 /** |
54 * Determines whether a given step is displaying. | 44 * Determines whether a given step is displaying. |
55 * @param {string} currentStep Index of the current step | 45 * @param {string} currentStep Index of the current step |
56 * @param {string} step Name of the given step | 46 * @param {string} step Name of the given step |
57 * @return {boolean} | 47 * @return {boolean} |
58 * @private | 48 * @private |
59 */ | 49 */ |
60 isStepHidden_: function(currentStep, step) { | 50 isStepHidden_: function(currentStep, step) { |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 /** | 95 /** |
106 * Ends the tutorial. | 96 * Ends the tutorial. |
107 * @private | 97 * @private |
108 */ | 98 */ |
109 onDissmissTap_: function() { | 99 onDissmissTap_: function() { |
110 $('inner-container').classList.remove('disabled'); | 100 $('inner-container').classList.remove('disabled'); |
111 this.hidden_ = true; | 101 this.hidden_ = true; |
112 } | 102 } |
113 }); | 103 }); |
114 })(); | 104 })(); |
OLD | NEW |