| 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/paper-item/paper-item.h
tml"> | 3 <link rel="import" href="chrome://resources/polymer/v1_0/paper-item/paper-item.h
tml"> |
| 4 <link rel="import" href="chrome://resources/polymer/v1_0/paper-spinner/paper-spi
nner.html"> |
| 4 <link rel="import" href="chrome://resources/cr_elements/cr_shared_menu/cr_shared
_menu.html"> | 5 <link rel="import" href="chrome://resources/cr_elements/cr_shared_menu/cr_shared
_menu.html"> |
| 5 <link rel="import" href="chrome://history/constants.html"> | 6 <link rel="import" href="chrome://history/constants.html"> |
| 6 <link rel="import" href="chrome://history/history_item.html"> | 7 <link rel="import" href="chrome://history/history_item.html"> |
| 7 <link rel="import" href="chrome://history/shared_style.html"> | 8 <link rel="import" href="chrome://history/shared_style.html"> |
| 8 | 9 |
| 9 <dom-module id="history-list"> | 10 <dom-module id="history-list"> |
| 10 <template> | 11 <template> |
| 11 <style include="shared-style"> | 12 <style include="shared-style"> |
| 12 :host { | 13 :host { |
| 13 display: flex; | 14 display: flex; |
| 14 flex-direction: column; | 15 flex-direction: column; |
| 16 position: relative; |
| 15 } | 17 } |
| 16 | 18 |
| 17 #infinite-list { | 19 #infinite-list { |
| 18 flex: 1; | 20 flex: 1; |
| 19 padding-top: var(--first-card-padding-top); | 21 padding-top: var(--first-card-padding-top); |
| 20 } | 22 } |
| 21 | 23 |
| 24 #loading-spinner { |
| 25 bottom: 20px; |
| 26 left: 0; |
| 27 margin: 0 auto; |
| 28 position: absolute; |
| 29 right: 0; |
| 30 width: 28px; |
| 31 } |
| 32 |
| 22 paper-item { | 33 paper-item { |
| 23 -webkit-user-select: none; | 34 -webkit-user-select: none; |
| 24 cursor: pointer; | 35 cursor: pointer; |
| 25 font: inherit; | 36 font: inherit; |
| 26 } | 37 } |
| 27 | 38 |
| 28 paper-item:hover { | 39 paper-item:hover { |
| 29 background: #eaeaea; | 40 background: #eaeaea; |
| 30 } | 41 } |
| 31 </style> | 42 </style> |
| 32 <div id="no-results" class="centered-message" | 43 <div id="no-results" class="centered-message" |
| 33 hidden$="{{hasResults(historyData.length)}}"> | 44 hidden$="{{hasResults(historyData.length)}}"> |
| 34 {{noResultsMessage_(searchTerm, loading_)}} | 45 {{noResultsMessage_(searchTerm, loading_)}} |
| 35 </div> | 46 </div> |
| 36 <iron-list items="{{historyData}}" as="item" id="infinite-list" | 47 <iron-list items="{{historyData}}" as="item" id="infinite-list" |
| 37 on-scroll="scrollHandler_" | 48 on-scroll="scrollHandler_" |
| 38 hidden$="{{!hasResults(historyData.length)}}"> | 49 hidden$="{{!hasResults(historyData.length)}}"> |
| 39 <template> | 50 <template> |
| 40 <history-item item="[[item]]" | 51 <history-item item="[[item]]" |
| 41 starred="[[item.starred]]" | 52 starred="[[item.starred]]" |
| 42 selected="{{item.selected}}" | 53 selected="{{item.selected}}" |
| 43 is-card-start="[[isCardStart_(item, index, historyData.length)]]" | 54 is-card-start="[[isCardStart_(item, index, historyData.length)]]" |
| 44 is-card-end="[[isCardEnd_(item, index, historyData.length)]]" | 55 is-card-end="[[isCardEnd_(item, index, historyData.length)]]" |
| 45 has-time-gap="[[needsTimeGap_(item, index, historyData.length)]]" | 56 has-time-gap="[[needsTimeGap_(item, index, historyData.length)]]" |
| 46 search-term="[[searchTerm]]" | 57 search-term="[[searchTerm]]" |
| 47 number-of-items="[[historyData.length]]"> | 58 number-of-items="[[historyData.length]]"> |
| 48 </history-item> | 59 </history-item> |
| 49 </template> | 60 </template> |
| 50 </iron-list> | 61 </iron-list> |
| 62 <paper-spinner id="loading-spinner" alt="$i18n{loading}" |
| 63 active="[[loading_]]"> |
| 64 </paper-spinner> |
| 51 <cr-shared-menu id="sharedMenu"> | 65 <cr-shared-menu id="sharedMenu"> |
| 52 <paper-item id="menuMoreButton" on-tap="onMoreFromSiteTap_"> | 66 <paper-item id="menuMoreButton" on-tap="onMoreFromSiteTap_"> |
| 53 $i18n{moreFromSite} | 67 $i18n{moreFromSite} |
| 54 </paper-item> | 68 </paper-item> |
| 55 <paper-item id="menuRemoveButton" on-tap="onRemoveFromHistoryTap_"> | 69 <paper-item id="menuRemoveButton" on-tap="onRemoveFromHistoryTap_"> |
| 56 $i18n{removeFromHistory} | 70 $i18n{removeFromHistory} |
| 57 </paper-item> | 71 </paper-item> |
| 58 </cr-shared-menu> | 72 </cr-shared-menu> |
| 59 </template> | 73 </template> |
| 60 <script src="chrome://history/history_list.js"></script> | 74 <script src="chrome://history/history_list.js"></script> |
| 61 </dom-module> | 75 </dom-module> |
| OLD | NEW |