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 box-sizing: border-box; |
13 display: block; | 14 display: block; |
14 overflow: auto; | 15 overflow: auto; |
| 16 padding-top: var(--first-card-padding-top); |
15 } | 17 } |
16 | 18 |
17 history-item { | 19 history-item { |
18 --history-item-padding-side: var(--card-padding-side); | 20 --history-item-padding-side: var(--card-padding-side); |
19 } | 21 } |
20 </style> | 22 </style> |
21 <div id="no-results" class="centered-message" | 23 <div id="no-results" class="centered-message" |
22 hidden$="[[hasResults(historyData_.length)]]"> | 24 hidden$="[[hasResults(historyData_.length)]]"> |
23 {{noResultsMessage(searchedTerm, querying)}} | 25 {{noResultsMessage(searchedTerm, querying)}} |
24 </div> | 26 </div> |
25 <iron-list items="{{historyData_}}" as="item" id="infinite-list" | 27 <iron-list items="{{historyData_}}" as="item" id="infinite-list" |
26 hidden$="[[!hasResults(historyData_.length)]]"> | 28 hidden$="[[!hasResults(historyData_.length)]]"> |
27 <template> | 29 <template> |
28 <history-item item="[[item]]" | 30 <history-item item="[[item]]" |
29 selected="{{item.selected}}" | 31 selected="{{item.selected}}" |
30 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]]"> |
38 </history-item> | 39 </history-item> |
39 </template> | 40 </template> |
40 </iron-list> | 41 </iron-list> |
41 <iron-scroll-threshold id="scroll-threshold" scroll-target="infinite-list" | 42 <iron-scroll-threshold id="scroll-threshold" scroll-target="infinite-list" |
42 lower-threshold="500" on-lower-threshold="loadMoreData_"> | 43 lower-threshold="500" on-lower-threshold="loadMoreData_"> |
43 </iron-scroll-threshold> | 44 </iron-scroll-threshold> |
44 </template> | 45 </template> |
45 <script src="chrome://history/history_list.js"></script> | 46 <script src="chrome://history/history_list.js"></script> |
46 </dom-module> | 47 </dom-module> |
OLD | NEW |