OLD | NEW |
---|---|
1 <link rel="import" href="chrome://resources/html/polymer.html"> | 1 <link rel="import" href="chrome://resources/html/polymer.html"> |
2 <link rel="import" href="chrome://resources/polymer/v1_0/iron-list/iron-list.htm l"> | 2 <link rel="import" href="chrome://resources/polymer/v1_0/iron-list/iron-list.htm l"> |
3 <link rel="import" href="chrome://resources/polymer/v1_0/iron-scroll-threshold/i ron-scroll-threshold.html"> | 3 <link rel="import" href="chrome://resources/polymer/v1_0/iron-scroll-threshold/i ron-scroll-threshold.html"> |
4 <link rel="import" href="chrome://history/constants.html"> | 4 <link rel="import" href="chrome://history/constants.html"> |
5 <link rel="import" href="chrome://history/history_item.html"> | 5 <link rel="import" href="chrome://history/history_item.html"> |
6 <link rel="import" href="chrome://history/history_list_behavior.html"> | 6 <link rel="import" href="chrome://history/history_list_behavior.html"> |
7 <link rel="import" href="chrome://history/shared_style.html"> | 7 <link rel="import" href="chrome://history/shared_style.html"> |
8 | 8 |
9 <dom-module id="history-list"> | 9 <dom-module id="history-list"> |
10 <template> | 10 <template> |
11 <style include="shared-style"> | 11 <style include="shared-style"> |
12 :host { | 12 :host { |
13 display: block; | 13 display: block; |
14 overflow: auto; | 14 overflow: auto; |
15 } | 15 } |
16 | 16 |
17 history-item { | 17 history-item { |
18 --history-item-padding-side: var(--card-padding-side); | 18 --history-item-padding-side: var(--card-padding-side); |
19 } | 19 } |
20 </style> | 20 </style> |
21 <div id="no-results" class="centered-message" | 21 <div id="no-results" class="centered-message" |
22 hidden$="[[hasResults(historyData_.length)]]"> | 22 hidden$="[[hasResults(historyData_.length)]]"> |
23 {{noResultsMessage(searchedTerm, querying)}} | 23 {{noResultsMessage(searchedTerm, querying)}} |
24 </div> | 24 </div> |
25 <iron-list items="{{historyData_}}" as="item" id="infinite-list" | 25 <iron-list items="{{historyData_}}" as="item" id="infinite-list" |
26 hidden$="[[!hasResults(historyData_.length)]]"> | 26 hidden$="[[!hasResults(historyData_.length)]]"> |
27 <template> | 27 <template> |
28 <history-item item="[[item]]" | 28 <history-item tabindex="-1" |
29 item="[[item]]" | |
29 selected="{{item.selected}}" | 30 selected="{{item.selected}}" |
30 is-first-item="[[isFirstItem_(index)]]" | 31 is-first-item="[[isFirstItem_(index)]]" |
31 is-card-start="[[isCardStart_(item, index, historyData_.length)]]" | 32 is-card-start="[[isCardStart_(item, index, historyData_.length)]]" |
32 is-card-end="[[isCardEnd_(item, index, historyData_.length)]]" | 33 is-card-end="[[isCardEnd_(item, index, historyData_.length)]]" |
33 has-time-gap="[[needsTimeGap_(item, index, historyData_.length)]]" | 34 has-time-gap="[[needsTimeGap_(item, index, historyData_.length)]]" |
34 search-term="[[searchedTerm]]" | 35 search-term="[[searchedTerm]]" |
35 number-of-items="[[historyData_.length]]" | 36 number-of-items="[[historyData_.length]]" |
36 path="[[pathForItem_(index)]]" | 37 path="[[pathForItem_(index)]]" |
37 index="[[index]]"> | 38 index="[[index]]" |
39 tab-index="[[tabIndex]]" | |
Dan Beam
2016/09/15 16:51:10
can we just name this something else? iron-list-t
| |
40 last-focused="{{lastFocused_}}"> | |
38 </history-item> | 41 </history-item> |
39 </template> | 42 </template> |
40 </iron-list> | 43 </iron-list> |
41 <iron-scroll-threshold id="scroll-threshold" scroll-target="infinite-list" | 44 <iron-scroll-threshold id="scroll-threshold" scroll-target="infinite-list" |
42 lower-threshold="500" on-lower-threshold="loadMoreData_"> | 45 lower-threshold="500" on-lower-threshold="loadMoreData_"> |
43 </iron-scroll-threshold> | 46 </iron-scroll-threshold> |
44 </template> | 47 </template> |
45 <script src="chrome://history/history_list.js"></script> | 48 <script src="chrome://history/history_list.js"></script> |
46 </dom-module> | 49 </dom-module> |
OLD | NEW |