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

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

Issue 981203007: Scaffold for MD-Settings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove help Created 5 years, 9 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
(Empty)
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.
4
5 /**
6 * @fileoverview
7 * 'cr-settings-menu' shows a menu with the given pages.
8 *
9 * Example:
10 *
11 * <cr-settings-menu pages="{{pages}}" selectedIndex="{{index}}">
12 * </cr-settings-menu>
13 *
14 * @group Chrome Settings Elements
15 * @element cr-settings-menu
16 */
17 Polymer('cr-settings-menu', {
18 publish: {
19 /**
20 * Pages to show menu items for.
21 *
22 * @attribute pages
23 * @type Array<!Object>
24 * @default []
25 */
26 pages: [],
27
28 /**
29 * Index of the currently selected page.
30 *
31 * @attribute selectedIndex
32 * @type number
33 * default 0
34 */
35 selectedIndex: 0,
36 },
37
38 pageSelected: function(e, detail) {
39 if (!detail.isSelected)
40 return;
41
42 // Issue 33: selectedModel is not updated yet, so grab the model from the
Jeremy Klein 2015/03/09 21:17:14 Weird... I guess it's either this or this.async(..
43 // selectedItem's templateInstance object. See http://goo.gl/KpEYGP.
44 this.fire('cr-settings-page-select',
Kyle Horimoto 2015/03/09 20:59:32 Don't we need to declare this event type?
Jeremy Klein 2015/03/09 21:17:14 Yeah, we should probably at least extract this to
michaelpg 2015/03/12 01:41:40 Removed, as this isn't doing anything.
45 this.$.menu.selectedItem.templateInstance.model);
46 },
47 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698