| OLD | NEW |
| 1 <link rel="import" href="chrome://resources/html/polymer.html"> | 1 <link rel="import" href="chrome://resources/html/polymer.html"> |
| 2 |
| 3 <link rel="import" href="chrome://resources/cr_elements/cr_lazy_render/cr_lazy_r
ender.html"> |
| 4 <link rel="import" href="chrome://resources/cr_elements/shared_style_css.html"> |
| 5 <link rel="import" href="chrome://resources/polymer/v1_0/iron-a11y-announcer/iro
n-a11y-announcer.html"> |
| 2 <link rel="import" href="chrome://resources/polymer/v1_0/iron-list/iron-list.htm
l"> | 6 <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"> | 7 <link rel="import" href="chrome://resources/polymer/v1_0/iron-scroll-threshold/i
ron-scroll-threshold.html"> |
| 8 <link rel="import" href="chrome://history/browser_service.html"> |
| 4 <link rel="import" href="chrome://history/constants.html"> | 9 <link rel="import" href="chrome://history/constants.html"> |
| 5 <link rel="import" href="chrome://history/history_item.html"> | 10 <link rel="import" href="chrome://history/history_item.html"> |
| 6 <link rel="import" href="chrome://history/history_list_behavior.html"> | |
| 7 <link rel="import" href="chrome://history/shared_style.html"> | 11 <link rel="import" href="chrome://history/shared_style.html"> |
| 8 | 12 |
| 13 <!-- Lazy loaded: cr-dialog, cr-action-menu, paper-button. --> |
| 14 |
| 9 <dom-module id="history-list"> | 15 <dom-module id="history-list"> |
| 10 <template> | 16 <template> |
| 11 <style include="shared-style"> | 17 <style include="shared-style cr-shared-style"> |
| 12 :host { | 18 :host { |
| 13 box-sizing: border-box; | 19 box-sizing: border-box; |
| 14 display: block; | 20 display: block; |
| 15 overflow: auto; | 21 overflow: auto; |
| 16 } | 22 } |
| 17 | 23 |
| 18 iron-list { | 24 iron-list { |
| 19 @apply(--card-sizing); | 25 @apply(--card-sizing); |
| 20 margin-top: var(--first-card-padding-top); | 26 margin-top: var(--first-card-padding-top); |
| 21 } | 27 } |
| 28 |
| 29 dialog .body { |
| 30 white-space: pre-wrap; |
| 31 } |
| 22 </style> | 32 </style> |
| 23 <div id="no-results" class="centered-message" | 33 <div id="no-results" class="centered-message" |
| 24 hidden$="[[hasResults(historyData_.length)]]"> | 34 hidden$="[[hasResults_(historyData_.length)]]"> |
| 25 {{noResultsMessage(searchedTerm, querying)}} | 35 [[noResultsMessage_(searchedTerm, querying)]] |
| 26 </div> | 36 </div> |
| 37 |
| 27 <iron-list items="{{historyData_}}" as="item" id="infinite-list" | 38 <iron-list items="{{historyData_}}" as="item" id="infinite-list" |
| 28 hidden$="[[!hasResults(historyData_.length)]]"> | 39 hidden$="[[!hasResults_(historyData_.length)]]"> |
| 29 <template> | 40 <template> |
| 30 <history-item tabindex$="[[tabIndex]]" | 41 <history-item tabindex$="[[tabIndex]]" |
| 31 item="[[item]]" | 42 item="[[item]]" |
| 32 selected="{{item.selected}}" | 43 selected="[[item.selected]]" |
| 33 is-card-start="[[isCardStart_(item, index, historyData_.length)]]" | 44 is-card-start="[[isCardStart_(item, index, historyData_.length)]]" |
| 34 is-card-end="[[isCardEnd_(item, index, historyData_.length)]]" | 45 is-card-end="[[isCardEnd_(item, index, historyData_.length)]]" |
| 35 has-time-gap="[[needsTimeGap_(item, index, historyData_.length)]]" | 46 has-time-gap="[[needsTimeGap_(item, index, historyData_.length)]]" |
| 36 search-term="[[searchedTerm]]" | 47 search-term="[[searchedTerm]]" |
| 37 number-of-items="[[historyData_.length]]" | 48 number-of-items="[[historyData_.length]]" |
| 38 path="[[pathForItem_(index)]]" | |
| 39 index="[[index]]" | 49 index="[[index]]" |
| 40 iron-list-tab-index="[[tabIndex]]" | 50 iron-list-tab-index="[[tabIndex]]" |
| 41 last-focused="{{lastFocused_}}"> | 51 last-focused="{{lastFocused_}}"> |
| 42 </history-item> | 52 </history-item> |
| 43 </template> | 53 </template> |
| 44 </iron-list> | 54 </iron-list> |
| 55 |
| 45 <iron-scroll-threshold id="scroll-threshold" scroll-target="infinite-list" | 56 <iron-scroll-threshold id="scroll-threshold" scroll-target="infinite-list" |
| 46 lower-threshold="500" on-lower-threshold="loadMoreData_"> | 57 lower-threshold="500" on-lower-threshold="onScrollToBottom_"> |
| 47 </iron-scroll-threshold> | 58 </iron-scroll-threshold> |
| 59 |
| 60 <template is="cr-lazy-render" id="dialog"> |
| 61 <dialog is="cr-dialog"> |
| 62 <div class="title">$i18n{removeSelected}</div> |
| 63 <div class="body">$i18n{deleteWarning}</div> |
| 64 <div class="button-container"> |
| 65 <paper-button class="cancel-button" on-tap="onDialogCancelTap_"> |
| 66 $i18n{cancel} |
| 67 </paper-button> |
| 68 <paper-button class="action-button" on-tap="onDialogConfirmTap_"> |
| 69 $i18n{deleteConfirm} |
| 70 </paper-button> |
| 71 </div> |
| 72 </dialog> |
| 73 </template> |
| 74 |
| 75 <template is="cr-lazy-render" id="sharedMenu"> |
| 76 <dialog is="cr-action-menu"> |
| 77 <button id="menuMoreButton" class="dropdown-item" |
| 78 on-tap="onMoreFromSiteTap_"> |
| 79 $i18n{moreFromSite} |
| 80 </button> |
| 81 <button id="menuRemoveButton" class="dropdown-item" |
| 82 hidden="[[!canDeleteHistory_]]" |
| 83 on-tap="onRemoveFromHistoryTap_"> |
| 84 $i18n{removeFromHistory} |
| 85 </button> |
| 86 </dialog> |
| 87 </template> |
| 48 </template> | 88 </template> |
| 49 <script src="chrome://history/history_list.js"></script> | 89 <script src="chrome://history/history_list.js"></script> |
| 50 </dom-module> | 90 </dom-module> |
| OLD | NEW |