OLD | NEW |
1 <!-- | 1 <!-- |
2 -- Copyright 2015 The Chromium Authors. All rights reserved. | 2 -- Copyright 2015 The Chromium Authors. All rights reserved. |
3 -- Use of this source code is governed by a BSD-style license that can be | 3 -- Use of this source code is governed by a BSD-style license that can be |
4 -- found in the LICENSE file. | 4 -- found in the LICENSE file. |
5 --> | 5 --> |
6 | 6 |
7 <link rel="import" href="chrome://resources/polymer/polymer/polymer.html"> | 7 <link rel="import" href="chrome://resources/polymer/v1_0/polymer/polymer.html"> |
8 | 8 |
9 <polymer-element name="track-list" attributes="tracks"> | 9 <dom-module id="track-list"> |
| 10 <link rel="import" type="css" href="track_list.css"> |
10 <template> | 11 <template> |
11 <link rel="stylesheet" href="track_list.css"> | 12 <template is="dom-repeat" id="tracks" items="[[tracks]]"> |
12 | 13 <div class="track" active$="[[item.active]]" index$="[[index]]" on-click="
trackClicked"> |
13 <template id="tracks" repeat="{{track, index in tracks}}"> | |
14 <div class="track" active?="{{track.active}}" index="{{index}}" on-click="
{{trackClicked}}"> | |
15 <div class="data"> | 14 <div class="data"> |
16 <div class="data-title">{{track.title}}</div> | 15 <div class="data-title">[[item.title]]</div> |
17 <div class="data-artist">{{track.artist}}</div> | 16 <div class="data-artist">[[item.artist]]</div> |
18 </div> | 17 </div> |
19 </div> | 18 </div> |
20 </template> | 19 </template> |
21 </template> | 20 </template> |
22 <script src="track_list.js"></script> | 21 </dom-module> |
23 </polymer-element> | 22 |
| 23 <script src="track_list.js"></script> |
OLD | NEW |