| Index: samples/third_party/todomvc/web/lib-elements/polymer_selector.html
|
| diff --git a/samples/third_party/todomvc/web/lib-elements/polymer_selector.html b/samples/third_party/todomvc/web/lib-elements/polymer_selector.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..854ff61a3840c1a2e635e68691f825bdfc2483a2
|
| --- /dev/null
|
| +++ b/samples/third_party/todomvc/web/lib-elements/polymer_selector.html
|
| @@ -0,0 +1,47 @@
|
| +<!--
|
| +Copyright 2013 The Polymer Authors. All rights reserved.
|
| +Use of this source code is governed by a BSD-style
|
| +license that can be found in the LICENSE file.
|
| +-->
|
| +<!--
|
| +/**
|
| + * polymer-selector is used to display a list of elements that can be selected.
|
| + * The attribute "selected" indicates which element is being selected.
|
| + * Tapping on the element to change selection would fire "polymer-activate"
|
| + * event.
|
| + *
|
| + * Example:
|
| + *
|
| + * <polymer-selector selected="0" on-polymer-activate="{{activateAction}}">
|
| + * <div>Item 1</div>
|
| + * <div>Item 2</div>
|
| + * <div>Item 3</div>
|
| + * </polymer-selector>
|
| + *
|
| + * polymer-selector is not styled. So one needs to use "selected" CSS class
|
| + * to style the selected element.
|
| + *
|
| + * <style>
|
| + * .item.polymer-selected {
|
| + * background: #eee;
|
| + * }
|
| + * </style>
|
| + * ...
|
| + * <polymer-selector>
|
| + * <div class="item">Item 1</div>
|
| + * <div class="item">Item 2</div>
|
| + * <div class="item">Item 3</div>
|
| + * </polymer-selector>
|
| + */
|
| +-->
|
| +<link rel="import" href="polymer_selection.html">
|
| +
|
| +<polymer-element name="polymer-selector" on-tap="{{activateHandler}}"
|
| + touch-action="none">
|
| + <template>
|
| + <polymer-selection id="selection" multi="{{multi}}"
|
| + on-polymer-select="{{selectionSelect}}"></polymer-selection>
|
| + <content id="items" select="*"></content>
|
| + </template>
|
| + <script type="application/dart" src="polymer_selector.dart"></script>
|
| +</polymer-element>
|
|
|