Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(234)

Side by Side Diff: chrome/browser/resources/settings/settings_menu/settings_menu.js

Issue 2651103003: [MD settings] rename advancedSubmenu id (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 25 matching lines...) Expand all
36 // the first tap to close an opened Advanced section does nothing (because 36 // the first tap to close an opened Advanced section does nothing (because
37 // it calls .open() on an opened menu instead of .close(). This is a fix for 37 // it calls .open() on an opened menu instead of .close(). This is a fix for
38 // that bug without changing that code through its public API. 38 // that bug without changing that code through its public API.
39 // 39 //
40 // TODO(dbeam): we're currently deciding whether <paper-{,sub}menu> are 40 // TODO(dbeam): we're currently deciding whether <paper-{,sub}menu> are
41 // right for our needs (there have been minor a11y problems). If we decide 41 // right for our needs (there have been minor a11y problems). If we decide
42 // to keep <paper-{,sub}menu>, fix this bug with a local Chrome CL (ex: 42 // to keep <paper-{,sub}menu>, fix this bug with a local Chrome CL (ex:
43 // https://codereview.chromium.org/2412343004) or a Polymer PR (ex: 43 // https://codereview.chromium.org/2412343004) or a Polymer PR (ex:
44 // https://github.com/PolymerElements/paper-menu/pull/107). 44 // https://github.com/PolymerElements/paper-menu/pull/107).
45 if (this.advancedOpened) 45 if (this.advancedOpened)
46 this.$.advancedPage.open(); 46 this.$.advancedSubmenu.open();
47 }, 47 },
48 48
49 /** 49 /**
50 * @param {!settings.Route} newRoute 50 * @param {!settings.Route} newRoute
51 */ 51 */
52 currentRouteChanged: function(newRoute) { 52 currentRouteChanged: function(newRoute) {
53 // Make the three menus mutually exclusive. 53 // Make the three menus mutually exclusive.
54 if (settings.Route.ABOUT.contains(newRoute)) { 54 if (settings.Route.ABOUT.contains(newRoute)) {
55 this.aboutSelected_ = true; 55 this.aboutSelected_ = true;
56 this.$.advancedMenu.selected = null; 56 this.$.advancedMenu.selected = null;
(...skipping 24 matching lines...) Expand all
81 81
82 /** 82 /**
83 * @param {boolean} opened Whether the menu is expanded. 83 * @param {boolean} opened Whether the menu is expanded.
84 * @return {string} Which icon to use. 84 * @return {string} Which icon to use.
85 * @private 85 * @private
86 * */ 86 * */
87 arrowState_: function(opened) { 87 arrowState_: function(opened) {
88 return opened ? 'cr:arrow-drop-up' : 'cr:arrow-drop-down'; 88 return opened ? 'cr:arrow-drop-up' : 'cr:arrow-drop-down';
89 }, 89 },
90 }); 90 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698