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://resources/polymer/v1_0/paper-item/paper-item.h
tml"> | |
5 <link rel="import" href="chrome://resources/cr_elements/cr_shared_menu/cr_shared
_menu.html"> | |
6 <link rel="import" href="chrome://history/browser_service.html"> | 4 <link rel="import" href="chrome://history/browser_service.html"> |
7 <link rel="import" href="chrome://history/constants.html"> | 5 <link rel="import" href="chrome://history/constants.html"> |
8 <link rel="import" href="chrome://history/history_item.html"> | 6 <link rel="import" href="chrome://history/history_item.html"> |
9 <link rel="import" href="chrome://history/shared_style.html"> | 7 <link rel="import" href="chrome://history/shared_style.html"> |
10 | 8 |
11 <dom-module id="history-list"> | 9 <dom-module id="history-list"> |
12 <template> | 10 <template> |
13 <style include="shared-style"> | 11 <style include="shared-style"> |
14 :host { | 12 :host { |
15 display: block; | 13 display: block; |
16 } | 14 } |
17 | 15 |
18 #infinite-list { | 16 #infinite-list { |
19 height: 100%; | 17 height: 100%; |
20 } | 18 } |
21 | 19 |
22 paper-item { | |
23 -webkit-user-select: none; | |
24 cursor: pointer; | |
25 font: inherit; | |
26 white-space: nowrap; | |
27 } | |
28 | |
29 paper-item:hover { | |
30 background: #eaeaea; | |
31 } | |
32 | |
33 history-item { | 20 history-item { |
34 --history-item-padding-side: var(--card-padding-side); | 21 --history-item-padding-side: var(--card-padding-side); |
35 } | 22 } |
36 </style> | 23 </style> |
37 <div id="no-results" class="centered-message" | 24 <div id="no-results" class="centered-message" |
38 hidden$="[[hasResults(historyData_.length)]]"> | 25 hidden$="[[hasResults(historyData_.length)]]"> |
39 {{noResultsMessage_(searchedTerm, querying)}} | 26 {{noResultsMessage_(searchedTerm, querying)}} |
40 </div> | 27 </div> |
41 <iron-list items="{{historyData_}}" as="item" id="infinite-list" | 28 <iron-list items="{{historyData_}}" as="item" id="infinite-list" |
42 hidden$="[[!hasResults(historyData_.length)]]"> | 29 hidden$="[[!hasResults(historyData_.length)]]"> |
43 <template> | 30 <template> |
44 <history-item item="[[item]]" | 31 <history-item item="[[item]]" |
45 starred="[[item.starred]]" | 32 starred="[[item.starred]]" |
46 selected="{{item.selected}}" | 33 selected="{{item.selected}}" |
47 is-first-item="[[isFirstItem_(index)]]" | 34 is-first-item="[[isFirstItem_(index)]]" |
48 is-card-start="[[isCardStart_(item, index, historyData_.length)]]" | 35 is-card-start="[[isCardStart_(item, index, historyData_.length)]]" |
49 is-card-end="[[isCardEnd_(item, index, historyData_.length)]]" | 36 is-card-end="[[isCardEnd_(item, index, historyData_.length)]]" |
50 has-time-gap="[[needsTimeGap_(item, index, historyData_.length)]]" | 37 has-time-gap="[[needsTimeGap_(item, index, historyData_.length)]]" |
51 search-term="[[searchedTerm]]" | 38 search-term="[[searchedTerm]]" |
52 number-of-items="[[historyData_.length]]"> | 39 number-of-items="[[historyData_.length]]"> |
53 </history-item> | 40 </history-item> |
54 </template> | 41 </template> |
55 </iron-list> | 42 </iron-list> |
56 <iron-scroll-threshold id="scroll-threshold" scroll-target="infinite-list" | 43 <iron-scroll-threshold id="scroll-threshold" scroll-target="infinite-list" |
57 lower-threshold="500" on-lower-threshold="loadMoreData_"> | 44 lower-threshold="500" on-lower-threshold="loadMoreData_"> |
58 </iron-scroll-threshold> | 45 </iron-scroll-threshold> |
59 <cr-shared-menu id="sharedMenu"> | |
60 <paper-item id="menuMoreButton" on-tap="onMoreFromSiteTap_"> | |
61 $i18n{moreFromSite} | |
62 </paper-item> | |
63 <paper-item id="menuRemoveButton" on-tap="onRemoveFromHistoryTap_"> | |
64 $i18n{removeFromHistory} | |
65 </paper-item> | |
66 </cr-shared-menu> | |
67 </template> | 46 </template> |
68 <script src="chrome://history/history_list.js"></script> | 47 <script src="chrome://history/history_list.js"></script> |
69 </dom-module> | 48 </dom-module> |
OLD | NEW |