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 /** | 5 /** |
6 * @fileoverview | 6 * @fileoverview |
7 * 'settings-menu' shows a menu with a hardcoded set of pages and subpages. | 7 * 'settings-menu' shows a menu with a hardcoded set of pages and subpages. |
8 */ | 8 */ |
9 Polymer({ | 9 Polymer({ |
10 is: 'settings-menu', | 10 is: 'settings-menu', |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 * @param {!Event} event | 66 * @param {!Event} event |
67 * @private | 67 * @private |
68 */ | 68 */ |
69 openPage_: function(event) { | 69 openPage_: function(event) { |
70 var submenuRoute = event.currentTarget.parentNode.dataset.page; | 70 var submenuRoute = event.currentTarget.parentNode.dataset.page; |
71 if (submenuRoute) { | 71 if (submenuRoute) { |
72 this.currentRoute = { | 72 this.currentRoute = { |
73 page: submenuRoute, | 73 page: submenuRoute, |
74 section: event.currentTarget.dataset.section, | 74 section: event.currentTarget.dataset.section, |
75 subpage: [], | 75 subpage: [], |
| 76 url: '', |
76 }; | 77 }; |
77 } | 78 } |
78 }, | 79 }, |
79 | 80 |
80 /** | 81 /** |
81 * @param {boolean} opened Whether the menu is expanded. | 82 * @param {boolean} opened Whether the menu is expanded. |
82 * @return {string} Which icon to use. | 83 * @return {string} Which icon to use. |
83 * @private | 84 * @private |
84 * */ | 85 * */ |
85 arrowState_: function(opened) { | 86 arrowState_: function(opened) { |
86 return opened ? 'settings:arrow-drop-up' : 'cr:arrow-drop-down'; | 87 return opened ? 'settings:arrow-drop-up' : 'cr:arrow-drop-down'; |
87 }, | 88 }, |
88 }); | 89 }); |
OLD | NEW |