Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(363)

Side by Side Diff: chrome/browser/resources/md_history/history_toolbar.html

Issue 1965913003: [MD History] Add grouped history toolbar. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cbd_move
Patch Set: address comments Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/iron-icons/hardware-ico ns.html">
5 <link rel="import" href="chrome://resources/polymer/v1_0/paper-spinner/paper-spi nner.html"> 6 <link rel="import" href="chrome://resources/polymer/v1_0/paper-spinner/paper-spi nner.html">
7 <link rel="import" href="chrome://resources/polymer/v1_0/paper-tabs/paper-tab.ht ml">
8 <link rel="import" href="chrome://resources/polymer/v1_0/paper-tabs/paper-tabs.h tml">
6 <link rel="import" href="chrome://resources/cr_elements/cr_search_field/cr_searc h_field.html"> 9 <link rel="import" href="chrome://resources/cr_elements/cr_search_field/cr_searc h_field.html">
7 <link rel="import" href="chrome://history/shared_style.html"> 10 <link rel="import" href="chrome://history/shared_style.html">
8 11
9 <dom-module id="history-toolbar"> 12 <dom-module id="history-toolbar">
10 <template> 13 <template>
11 <style include="shared-style"> 14 <style include="shared-style">
12 :host { 15 :host {
13 color: #fff; 16 color: #fff;
14 height: 56px;
15 transition: background-color 150ms; 17 transition: background-color 150ms;
18 width: 100%;
16 } 19 }
17 20
18 :host,
19 #overlay-buttons, 21 #overlay-buttons,
20 #overlay-wrapper, 22 #overlay-wrapper,
21 #main-content, 23 #main-content,
22 #button-container, 24 #button-container,
23 #toolbar-container { 25 #toolbar-container {
24 @apply(--layout-center); 26 @apply(--layout-center);
25 @apply(--layout-horizontal); 27 @apply(--layout-horizontal);
26 width: 100%; 28 width: 100%;
27 } 29 }
28 30
29 :host([items-selected_]) { 31 :host([items-selected_]) {
30 background: rgb(68, 136, 255); 32 background: rgb(68, 136, 255);
31 } 33 }
32 34
33 h1 { 35 h1 {
34 @apply(--layout-flex); 36 @apply(--layout-flex);
35 -webkit-padding-start: 24px; 37 -webkit-padding-start: 24px;
36 font-size: 123%; 38 font-size: 123%;
37 font-weight: 400; 39 font-weight: 400;
38 } 40 }
39 41
42 #toolbar-container {
43 height: 56px;
44 }
45
40 #right-content { 46 #right-content {
41 flex: 1 0 0; 47 flex: 1 0 0;
42 } 48 }
43 49
44 #left-content { 50 #left-content {
45 flex: 1 0 var(--side-bar-width); 51 flex: 1 0 var(--side-bar-width);
46 } 52 }
47 53
48 #centered-content { 54 #centered-content {
49 /** Padding-start gives space on one side, flex-basis gives space on the 55 /** Padding-start gives space on one side, flex-basis gives space on the
(...skipping 26 matching lines...) Expand all
76 } 82 }
77 83
78 #overlay-wrapper { 84 #overlay-wrapper {
79 -webkit-margin-start: var(--side-bar-width); 85 -webkit-margin-start: var(--side-bar-width);
80 } 86 }
81 87
82 #number-selected { 88 #number-selected {
83 @apply(--layout-flex); 89 @apply(--layout-flex);
84 } 90 }
85 91
86 paper-icon-button { 92 #cancel-icon-button {
87 -webkit-margin-end: 24px; 93 -webkit-margin-end: 24px;
88 -webkit-margin-start: 2px; 94 -webkit-margin-start: 2px;
89 height: 36px; 95 height: 36px;
90 min-width: 36px; 96 min-width: 36px;
91 width: 36px; 97 width: 36px;
92 } 98 }
93 99
94 paper-button { 100 #grouped-nav-container paper-icon-button {
95 pointer-events: auto; 101 --paper-icon-button-ink-color: rgba(255, 255, 255, 0.4);
102 -webkit-margin-start: 24px;
103 flex: 0 0 auto;
104 }
105
106 paper-tab {
107 --paper-tab-ink: rgba(255, 255, 255, 0.4);
108 font-size: 13px;
109 text-transform: uppercase;
110 }
111
112 paper-tabs {
113 --paper-tabs-selection-bar-color: var(--google-blue-500);
114 height: 45px;
115 min-width: 300px;
116 }
117
118 #grouped-buttons-container {
119 @apply(--layout-center);
120 @apply(--layout-horizontal);
121 -webkit-margin-start: var(--side-bar-width);
122 }
123
124 #grouped-range-buttons {
125 -webkit-margin-start: 32px;
126 }
127
128 #grouped-nav-container {
129 @apply(--layout-center);
130 @apply(--layout-end-justified);
131 @apply(--layout-flex);
132 @apply(--layout-horizontal);
133 -webkit-margin-end: 24px;
134 overflow: hidden;
135 transition: opacity 150ms;
136 }
137
138 :host([grouped-range=0]) #grouped-nav-container {
139 opacity: 0;
140 pointer-events: none;
141 }
142
143 #grouped-date {
144 flex: 0 1 auto;
145 opacity: 0.7;
146 overflow: hidden;
147 text-align: right;
148 text-overflow: ellipsis;
149 white-space: nowrap;
150 }
151
152 :host-context([dir=rtl]) .rtl-reversible {
153 transform: rotate(180deg);
96 } 154 }
97 </style> 155 </style>
98 <div id="toolbar-container"> 156 <div id="toolbar-container">
99 <div id="main-content" hidden$="[[itemsSelected_]]"> 157 <div id="main-content" hidden$="[[itemsSelected_]]">
100 <div id="left-content"> 158 <div id="left-content">
101 <h1 id="title">$i18n{title}</h1> 159 <h1 id="title">$i18n{title}</h1>
102 </div> 160 </div>
103 <div id="centered-content"> 161 <div id="centered-content">
104 <div id="right-content"> 162 <div id="right-content">
105 <paper-spinner id="searching-spinner" active="[[searching]]"> 163 <paper-spinner id="searching-spinner" active="[[searching]]">
(...skipping 12 matching lines...) Expand all
118 <div id="number-selected">[[numberOfItemsSelected_(count)]]</div> 176 <div id="number-selected">[[numberOfItemsSelected_(count)]]</div>
119 <paper-button id="cancel-button" on-tap="onClearSelectionTap_"> 177 <paper-button id="cancel-button" on-tap="onClearSelectionTap_">
120 $i18n{cancel} 178 $i18n{cancel}
121 </paper-button> 179 </paper-button>
122 <paper-button id="delete-button" on-tap="onDeleteTap_"> 180 <paper-button id="delete-button" on-tap="onDeleteTap_">
123 $i18n{delete} 181 $i18n{delete}
124 </paper-button> 182 </paper-button>
125 </div> 183 </div>
126 </div> 184 </div>
127 </div> 185 </div>
186 <template is="dom-if" if="[[isGroupedMode]]">
187 <div id="grouped-buttons-container">
188 <paper-tabs attr-for-selected="value" selected="{{groupedRange}}"
189 id="grouped-range-buttons">
190 <paper-tab value="0">$i18n{rangeAllTime}</paper-tab>
191 <paper-tab value="1">$i18n{rangeWeek}</paper-tab>
192 <paper-tab value="2">$i18n{rangeMonth}</paper-tab>
193 </paper-tabs>
194 <div id="grouped-nav-container">
195 <span id="grouped-date">
196 {{getHistoryInterval_(queryStartTime, queryEndTime)}}
197 </span>
198 <paper-icon-button icon="today" alt="$i18n{rangeToday}"
199 title="$i18n{rangeToday}"></paper-icon-button>
200 <paper-icon-button icon="hardware:keyboard-arrow-left"
201 alt="$i18n{rangePrevious}" title="$i18n{rangePrevious}"
202 class="rtl-reversible"></paper-icon-button>
203 <paper-icon-button icon="hardware:keyboard-arrow-right"
204 alt="$i18n{rangeNext}" title="$i18n{rangeNext}"
205 class="rtl-reversible"></paper-icon-button>
206 </div>
207 </div>
208 </template>
128 </template> 209 </template>
129 <script src="chrome://history/history_toolbar.js"></script> 210 <script src="chrome://history/history_toolbar.js"></script>
130 </dom-module> 211 </dom-module>
OLDNEW
« no previous file with comments | « chrome/browser/resources/md_history/compiled_resources2.gyp ('k') | chrome/browser/resources/md_history/history_toolbar.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698