| 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-flex-layout/iron-f
lex-layout.html"> | 2 <link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/iron-f
lex-layout.html"> |
| 3 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt
on.html"> | 3 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt
on.html"> |
| 4 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper
-icon-button.html"> | 4 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper
-icon-button.html"> |
| 5 <link rel="import" href="chrome://resources/polymer/v1_0/paper-spinner/paper-spi
nner.html"> | 5 <link rel="import" href="chrome://resources/polymer/v1_0/paper-spinner/paper-spi
nner.html"> |
| 6 <link rel="import" href="chrome://resources/cr_elements/cr_search_field/cr_searc
h_field.html"> | 6 <link rel="import" href="chrome://resources/cr_elements/cr_toolbar/cr_toolbar.ht
ml"> |
| 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-toolbar"> | 9 <dom-module id="history-toolbar"> |
| 10 <template> | 10 <template> |
| 11 <style include="shared-style"> | 11 <style include="shared-style"> |
| 12 :host { | 12 :host { |
| 13 --content-max-width: var(--card-max-width); |
| 13 color: #fff; | 14 color: #fff; |
| 14 height: 56px; | 15 height: 56px; |
| 15 transition: background-color 150ms; | 16 transition: background-color 150ms; |
| 16 } | 17 } |
| 17 | 18 |
| 18 :host, | 19 :host, |
| 20 cr-toolbar, |
| 19 #overlay-buttons, | 21 #overlay-buttons, |
| 20 #overlay-wrapper, | 22 #overlay-wrapper, |
| 21 #main-content, | |
| 22 #button-container, | |
| 23 #toolbar-container { | 23 #toolbar-container { |
| 24 @apply(--layout-center); | 24 @apply(--layout-center); |
| 25 @apply(--layout-horizontal); | 25 @apply(--layout-horizontal); |
| 26 width: 100%; | 26 width: 100%; |
| 27 } | 27 } |
| 28 | 28 |
| 29 :host([items-selected_]) { | 29 :host([items-selected_]) { |
| 30 background: rgb(68, 136, 255); | 30 background: rgb(68, 136, 255); |
| 31 } | 31 } |
| 32 | 32 |
| 33 h1 { | |
| 34 @apply(--layout-flex); | |
| 35 -webkit-padding-start: 24px; | |
| 36 font-size: 123%; | |
| 37 font-weight: 400; | |
| 38 } | |
| 39 | |
| 40 #right-content { | |
| 41 flex: 1 0 0; | |
| 42 } | |
| 43 | |
| 44 #left-content { | |
| 45 flex: 1 0 var(--side-bar-width); | |
| 46 } | |
| 47 | |
| 48 #centered-content { | |
| 49 /** Padding-start gives space on one side, flex-basis gives space on the | |
| 50 other. */ | |
| 51 -webkit-padding-start: var(--card-padding-side); | |
| 52 display: flex; | |
| 53 flex: 1 1 calc(var(--card-max-width) + var(--card-padding-side)); | |
| 54 } | |
| 55 | |
| 56 #right-content { | |
| 57 @apply(--layout-center); | |
| 58 @apply(--layout-horizontal); | |
| 59 justify-content: flex-end; | |
| 60 } | |
| 61 | |
| 62 #search-input { | |
| 63 -webkit-padding-end: 20px; | |
| 64 } | |
| 65 | |
| 66 #searching-spinner { | |
| 67 height: 20px; | |
| 68 width: 20px; | |
| 69 -webkit-padding-end: 10px; | |
| 70 } | |
| 71 | |
| 72 #overlay-buttons { | 33 #overlay-buttons { |
| 73 margin: 0 auto; | 34 margin: 0 auto; |
| 74 max-width: var(--card-max-width); | 35 max-width: var(--card-max-width); |
| 75 padding: 0 var(--card-padding-side); | 36 padding: 0 var(--card-padding-side); |
| 76 } | 37 } |
| 77 | 38 |
| 78 #overlay-wrapper { | 39 #overlay-wrapper { |
| 79 -webkit-margin-start: var(--side-bar-width); | 40 -webkit-margin-start: var(--side-bar-width); |
| 80 } | 41 } |
| 81 | 42 |
| 82 #number-selected { | 43 #number-selected { |
| 83 @apply(--layout-flex); | 44 @apply(--layout-flex); |
| 84 } | 45 } |
| 85 | 46 |
| 86 paper-icon-button { | 47 paper-icon-button { |
| 87 -webkit-margin-end: 24px; | 48 -webkit-margin-end: 24px; |
| 88 -webkit-margin-start: 2px; | 49 -webkit-margin-start: 2px; |
| 89 height: 36px; | 50 height: 36px; |
| 90 min-width: 36px; | 51 min-width: 36px; |
| 91 width: 36px; | 52 width: 36px; |
| 92 } | 53 } |
| 93 | |
| 94 paper-button { | |
| 95 pointer-events: auto; | |
| 96 } | |
| 97 </style> | 54 </style> |
| 98 <div id="toolbar-container"> | 55 <div id="toolbar-container"> |
| 99 <div id="main-content" hidden$="[[itemsSelected_]]"> | 56 <cr-toolbar id="main-toolbar" page-name="History" |
| 100 <div id="left-content"> | 57 hidden$="[[itemsSelected_]]"> |
| 101 <h1 id="title">$i18n{title}</h1> | 58 </cr-toolbar> |
| 102 </div> | |
| 103 <div id="centered-content"> | |
| 104 <div id="right-content"> | |
| 105 <paper-spinner id="searching-spinner" active="[[searching]]"> | |
| 106 </paper-spinner> | |
| 107 <cr-search-field id="search-input" label="$i18n{search}" | |
| 108 clear-label="$i18n{clearSearch}"> | |
| 109 </cr-search-field> | |
| 110 </div> | |
| 111 </div> | |
| 112 </div> | |
| 113 | |
| 114 <div id="overlay-wrapper" hidden$="[[!itemsSelected_]]"> | 59 <div id="overlay-wrapper" hidden$="[[!itemsSelected_]]"> |
| 115 <div id="overlay-buttons"> | 60 <div id="overlay-buttons"> |
| 116 <paper-icon-button icon="clear" id="cancel-icon-button" | 61 <paper-icon-button icon="clear" id="cancel-icon-button" |
| 117 on-tap="onClearSelectionTap_"></paper-icon-button> | 62 on-tap="onClearSelectionTap_"></paper-icon-button> |
| 118 <div id="number-selected">[[numberOfItemsSelected_(count)]]</div> | 63 <div id="number-selected">[[numberOfItemsSelected_(count)]]</div> |
| 119 <paper-button id="cancel-button" on-tap="onClearSelectionTap_"> | 64 <paper-button id="cancel-button" on-tap="onClearSelectionTap_"> |
| 120 $i18n{cancel} | 65 $i18n{cancel} |
| 121 </paper-button> | 66 </paper-button> |
| 122 <paper-button id="delete-button" on-tap="onDeleteTap_"> | 67 <paper-button id="delete-button" on-tap="onDeleteTap_"> |
| 123 $i18n{delete} | 68 $i18n{delete} |
| 124 </paper-button> | 69 </paper-button> |
| 125 </div> | 70 </div> |
| 126 </div> | 71 </div> |
| 127 </div> | 72 </div> |
| 128 </template> | 73 </template> |
| 129 <script src="chrome://history/history_toolbar.js"></script> | 74 <script src="chrome://history/history_toolbar.js"></script> |
| 130 </dom-module> | 75 </dom-module> |
| OLD | NEW |