| 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-icon/iron-icon.htm
l"> | 2 <link rel="import" href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.htm
l"> |
| 3 <link rel="import" href="chrome://resources/cr_elements/icons.html"> | 3 <link rel="import" href="chrome://resources/cr_elements/icons.html"> |
| 4 <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/cr_lazy_render/cr_lazy_r
ender.html"> |
| 5 <link rel="import" href="chrome://resources/cr_elements/cr_toolbar/cr_toolbar.ht
ml"> | 5 <link rel="import" href="chrome://resources/cr_elements/cr_toolbar/cr_toolbar.ht
ml"> |
| 6 <link rel="import" href="chrome://history/browser_service.html"> | 6 <link rel="import" href="chrome://history/browser_service.html"> |
| 7 <link rel="import" href="chrome://history/icons.html"> | 7 <link rel="import" href="chrome://history/icons.html"> |
| 8 <link rel="import" href="chrome://history/shared_style.html"> | 8 <link rel="import" href="chrome://history/shared_style.html"> |
| 9 | 9 |
| 10 <!-- Lazy loaded: iron-dropdown, paper-button, paper-icon-button-light, | 10 <!-- Lazy loaded: iron-dropdown, paper-button, paper-icon-button-light. --> |
| 11 paper-tab, paper-tabs. --> | |
| 12 | 11 |
| 13 <dom-module id="history-toolbar"> | 12 <dom-module id="history-toolbar"> |
| 14 <template> | 13 <template> |
| 15 <style include="shared-style"> | 14 <style include="shared-style"> |
| 16 :host { | 15 :host { |
| 17 color: #fff; | 16 color: #fff; |
| 18 display: block; | 17 display: block; |
| 19 transition: background-color 150ms; | 18 transition: background-color 150ms; |
| 20 width: 100%; | 19 width: 100%; |
| 21 } | 20 } |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 } | 100 } |
| 102 | 101 |
| 103 #number-selected { | 102 #number-selected { |
| 104 flex: 1; | 103 flex: 1; |
| 105 } | 104 } |
| 106 | 105 |
| 107 #cancel-icon-button { | 106 #cancel-icon-button { |
| 108 -webkit-margin-end: 24px; | 107 -webkit-margin-end: 24px; |
| 109 -webkit-margin-start: 2px; | 108 -webkit-margin-start: 2px; |
| 110 } | 109 } |
| 111 | |
| 112 /* Grouped toolbar. */ | |
| 113 | |
| 114 paper-tabs { | |
| 115 --paper-tabs: { | |
| 116 font-size: inherit; | |
| 117 }; | |
| 118 --paper-tabs-selection-bar-color: #fff; | |
| 119 height: calc(var(--toolbar-grouped-height) - var(--toolbar-height)); | |
| 120 min-width: 300px; | |
| 121 } | |
| 122 | |
| 123 paper-tab { | |
| 124 --paper-tab-ink: rgba(255, 255, 255, 0.4); | |
| 125 text-transform: uppercase; | |
| 126 } | |
| 127 | |
| 128 #grouped-buttons-container { | |
| 129 @apply(--card-sizing); | |
| 130 align-items: center; | |
| 131 display: flex; | |
| 132 max-height: 0; | |
| 133 opacity: 0; | |
| 134 transition: opacity 300ms, max-height 300ms; | |
| 135 } | |
| 136 | |
| 137 :host([show-grouped-controls]) #grouped-buttons-container { | |
| 138 max-height: calc(var(--toolbar-grouped-height) - var(--toolbar-height)); | |
| 139 opacity: 1; | |
| 140 } | |
| 141 | |
| 142 #grouped-spacer { | |
| 143 -webkit-margin-start: var(--side-bar-width); | |
| 144 } | |
| 145 | |
| 146 :host([has-drawer]) #grouped-spacer { | |
| 147 -webkit-margin-start: 0; | |
| 148 } | |
| 149 | |
| 150 #grouped-nav-container { | |
| 151 -webkit-margin-end: 16px; | |
| 152 align-items: center; | |
| 153 display: flex; | |
| 154 flex: 1; | |
| 155 justify-content: flex-end; | |
| 156 overflow: hidden; | |
| 157 transition: opacity 150ms; | |
| 158 } | |
| 159 | |
| 160 :host([grouped-range='0']) #grouped-nav-container { | |
| 161 opacity: 0; | |
| 162 pointer-events: none; | |
| 163 } | |
| 164 | |
| 165 #grouped-date { | |
| 166 -webkit-margin-end: 8px; | |
| 167 flex: 0 1 auto; | |
| 168 opacity: 0.7; | |
| 169 overflow: hidden; | |
| 170 text-align: right; | |
| 171 text-overflow: ellipsis; | |
| 172 white-space: nowrap; | |
| 173 } | |
| 174 | |
| 175 #grouped-nav-container button { | |
| 176 -webkit-margin-start: 8px; | |
| 177 flex: 0 0 auto; | |
| 178 } | |
| 179 | |
| 180 #grouped-nav-container button[disabled] { | |
| 181 color: rgba(255, 255, 255, 0.5); | |
| 182 } | |
| 183 | |
| 184 :host-context([dir=rtl]) .rtl-reversible { | |
| 185 transform: rotate(180deg); | |
| 186 } | |
| 187 </style> | 110 </style> |
| 188 <div id="toolbar-container"> | 111 <div id="toolbar-container"> |
| 189 <cr-toolbar id="main-toolbar" | 112 <cr-toolbar id="main-toolbar" |
| 190 page-name="$i18n{title}" | 113 page-name="$i18n{title}" |
| 191 clear-label="$i18n{clearSearch}" | 114 clear-label="$i18n{clearSearch}" |
| 192 search-prompt="$i18n{searchPrompt}" | 115 search-prompt="$i18n{searchPrompt}" |
| 193 hidden$="[[itemsSelected_]]" | 116 hidden$="[[itemsSelected_]]" |
| 194 spinner-active="[[spinnerActive]]" | 117 spinner-active="[[spinnerActive]]" |
| 195 show-menu="[[hasDrawer]]" | 118 show-menu="[[hasDrawer]]" |
| 196 show-menu-promo="[[showMenuPromo]]" | 119 show-menu-promo="[[showMenuPromo]]" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 226 <paper-button id="cancel-button" on-tap="onClearSelectionTap_"> | 149 <paper-button id="cancel-button" on-tap="onClearSelectionTap_"> |
| 227 $i18n{cancel} | 150 $i18n{cancel} |
| 228 </paper-button> | 151 </paper-button> |
| 229 <paper-button id="delete-button" on-tap="onDeleteTap_"> | 152 <paper-button id="delete-button" on-tap="onDeleteTap_"> |
| 230 $i18n{delete} | 153 $i18n{delete} |
| 231 </paper-button> | 154 </paper-button> |
| 232 </div> | 155 </div> |
| 233 </div> | 156 </div> |
| 234 </template> | 157 </template> |
| 235 </div> | 158 </div> |
| 236 <template is="dom-if" if="[[isGroupedMode]]"> | |
| 237 <div id="grouped-spacer"> | |
| 238 <div id="grouped-buttons-container"> | |
| 239 <paper-tabs attr-for-selected="value" selected="[[groupedRange]]" | |
| 240 on-iron-select="onTabSelected_"> | |
| 241 <paper-tab value="0">$i18n{rangeAllTime}</paper-tab> | |
| 242 <paper-tab value="1">$i18n{rangeWeek}</paper-tab> | |
| 243 <paper-tab value="2">$i18n{rangeMonth}</paper-tab> | |
| 244 </paper-tabs> | |
| 245 <div id="grouped-nav-container"> | |
| 246 <span id="grouped-date"> | |
| 247 [[getHistoryInterval_(queryInfo)]] | |
| 248 </span> | |
| 249 <button is="paper-icon-button-light" | |
| 250 id="today-button" | |
| 251 class="icon-button" | |
| 252 title="$i18n{rangeToday}" | |
| 253 on-click="onTodayTap_" | |
| 254 disabled="[[isToday_(groupedOffset)]]"> | |
| 255 <iron-icon icon="history:today"></iron-icon> | |
| 256 </button> | |
| 257 <button is="paper-icon-button-light" | |
| 258 id="prev-button" | |
| 259 title="$i18n{rangePrevious}" | |
| 260 class="icon-button rtl-reversible" | |
| 261 on-click="onPrevTap_" | |
| 262 disabled="[[!hasMoreResults]]"> | |
| 263 <iron-icon icon="history:chevron-left"></iron-icon> | |
| 264 </button> | |
| 265 <button is="paper-icon-button-light" | |
| 266 id="next-button" | |
| 267 title="$i18n{rangeNext}" | |
| 268 class="icon-button rtl-reversible" | |
| 269 on-click="onNextTap_" | |
| 270 disabled="[[isToday_(groupedOffset)]]"> | |
| 271 <iron-icon icon="cr:chevron-right"></iron-icon> | |
| 272 </button> | |
| 273 </div> | |
| 274 </div> | |
| 275 </div> | |
| 276 </template> | |
| 277 </template> | 159 </template> |
| 278 <script src="chrome://history/history_toolbar.js"></script> | 160 <script src="chrome://history/history_toolbar.js"></script> |
| 279 </dom-module> | 161 </dom-module> |
| OLD | NEW |