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

Side by Side Diff: ui/webui/resources/cr_elements/v1_0/network/cr_network_list.js

Issue 1406023003: Elim cr_elements/v1_0 subdirectory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 2 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 Polymer element for displaying a collapsable list of networks.
7 */
8
9 (function() {
10
11 /**
12 * Polymer class definition for 'cr-network-list'.
13 * TODO(stevenjb): Update with iron-list(?) once implemented in Polymer 1.0.
14 * @element cr-network-list
15 */
16 Polymer({
17 is: 'cr-network-list',
18
19 properties: {
20 /**
21 * The maximum height in pixels for the list.
22 */
23 maxHeight: {
24 type: Number,
25 value: 1000,
26 observer: 'maxHeightChanged_'
27 },
28
29 /**
30 * Determines how the list item will be displayed:
31 * 'visible' - displays the network icon (with strength) and name
32 * 'known' - displays the visible info along with a toggle icon for the
33 * preferred status and a remove button.
34 */
35 listType: {
36 type: String,
37 value: 'visible'
38 },
39
40 /**
41 * The list of network state properties for the items to display.
42 *
43 * @type {!Array<!CrOnc.NetworkStateProperties>}
44 */
45 networks: {
46 type: Array,
47 value: function() { return []; }
48 },
49
50 /**
51 * True if the list is opened.
52 */
53 opened: {
54 type: Boolean,
55 value: true
56 }
57 },
58
59 /**
60 * Polymer maxHeight changed method.
61 */
62 maxHeightChanged_: function() {
63 this.$.container.style.maxHeight = this.maxHeight + 'px';
64 },
65
66 /**
67 * Event triggered when a list item is tapped.
68 * @param {!{model: {item: !CrOnc.NetworkStateProperties}}} event
69 * @private
70 */
71 onTap_: function(event) {
72 this.fire('selected', event.model.item);
73 },
74 });
75 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698