OLD | NEW |
---|---|
1 <link rel="import" href="chrome://resources/polymer/v1_0/polymer/polymer.html"> | 1 <link rel="import" href="chrome://resources/polymer/v1_0/polymer/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/cr_elements/cr_search_field/cr_searc h_field.html"> | 5 <link rel="import" href="chrome://resources/cr_elements/cr_search_field/cr_searc h_field.html"> |
6 | 6 |
7 <dom-module id="history-toolbar"> | 7 <dom-module id="history-toolbar"> |
8 <template> | 8 <template> |
9 | 9 |
10 <style> | 10 <style> |
11 :host { | 11 :host { |
12 @apply(--layout-center); | 12 @apply(--layout-center); |
13 @apply(--layout-horizontal); | 13 @apply(--layout-horizontal); |
14 background: #3f5566; | 14 background: #3f5566; |
15 color: #fff; | 15 color: #fff; |
16 height: 56px; | 16 height: 56px; |
17 transition: background-color 150ms; | 17 transition: background-color 150ms; |
18 width: 100%; | 18 width: 100%; |
19 } | 19 } |
20 | 20 |
21 :host([items-selected_]) { | 21 :host([items-selected_]) { |
22 background: rgb(68, 136, 255); | 22 background: rgb(68, 136, 255); |
23 } | 23 } |
24 | 24 |
25 h1 { | 25 h1 { |
26 @apply(--layout-flex); | 26 @apply(--layout-flex); |
27 @apply(--layout-horizontal); | |
27 font-size: 16px; | 28 font-size: 16px; |
28 font-weight: 400; | 29 font-weight: 400; |
29 padding-left: 24px; | 30 padding-left: 24px; |
30 } | 31 } |
31 | 32 |
32 #items { | 33 .items { |
34 @apply(--layout-horizontal); | |
33 @apply(--layout-center); | 35 @apply(--layout-center); |
34 @apply(--layout-horizontal); | |
35 margin: 0 auto; | 36 margin: 0 auto; |
36 max-width: 960px; | 37 max-width: 960px; |
37 width: 100%; | 38 width: 100%; |
38 } | 39 } |
39 | 40 |
40 #number-selected { | 41 #number-selected { |
41 @apply(--layout-flex); | 42 @apply(--layout-flex); |
42 } | 43 } |
43 | 44 |
44 paper-icon-button { | 45 paper-icon-button { |
45 height: 36px; | 46 height: 36px; |
46 margin: 0 24px 0 2px; | 47 margin: 0 24px 0 2px; |
47 min-width: 36px; | 48 min-width: 36px; |
48 width: 36px; | 49 width: 36px; |
49 } | 50 } |
51 | |
52 #clear-browsing-data { | |
53 flex: 1 1 960px; | |
54 max-width: 960px; | |
55 pointer-events: auto; | |
56 } | |
57 | |
58 #button-container { | |
59 @apply(--layout-horizontal); | |
60 @apply(--layout-center); | |
61 @apply(--layout-center-justified); | |
tsergeant
2016/02/03 22:57:11
Is this one necessary?
yingran
2016/02/03 23:25:52
Done.
| |
62 height: inherit; | |
63 left: 0; | |
64 pointer-events: none; | |
65 position: absolute; | |
66 top: 0; | |
67 width: 100%; | |
68 } | |
69 | |
70 #toolbar-container { | |
71 @apply(--layout-horizontal); | |
72 @apply(--layout-center); | |
73 width: 100%; | |
74 } | |
75 | |
76 #front-padding { | |
77 flex: 1 1 0; | |
78 min-width: 80px; | |
tsergeant
2016/02/03 22:57:11
I would prefer it if this was a bit bigger -- in t
yingran
2016/02/03 23:25:52
Done.
| |
79 } | |
80 | |
81 #back-padding { | |
82 flex: 1 1 0; | |
83 pointer-events: none; | |
84 } | |
50 </style> | 85 </style> |
86 <div id="toolbar-container"> | |
87 <template is="dom-if" if="{{!itemsSelected_}}"> | |
88 <h1 i18n-content="title" id="title"></h1> | |
89 <cr-search-field id="search-input" | |
90 i18n-values="label:search;clear-label:clearSearch"></cr-search-field > | |
91 </template> | |
51 | 92 |
52 <template is="dom-if" if="{{!itemsSelected_}}"> | 93 <template is="dom-if" if="{{itemsSelected_}}"> |
53 <h1 i18n-content="title" id="title"></h1> | 94 <div class="items"> |
54 <cr-search-field id="search-input" | 95 <paper-icon-button icon="clear" id="cancel-icon-button" |
55 i18n-values="label:search;clear-label:clearSearch"></cr-search-field> | 96 on-tap="onClearSelectionTap_"> |
56 </template> | 97 </paper-icon-button> |
57 | 98 <!-- TODO: change "selected" and number to an i18n (or equivalent) |
58 <template is="dom-if" if="{{itemsSelected_}}"> | 99 string --> |
59 <div id="items"> | 100 <div id="number-selected">{{count}} selected</div> |
60 <paper-icon-button icon="clear" id="cancel-icon-button" | 101 <paper-button id="cancel-button" on-tap="onClearSelectionTap_"> |
61 on-tap="onClearSelectionTap_"> | 102 CANCEL |
62 </paper-icon-button> | 103 </paper-button> |
63 <!-- TODO: change "selected" and number to an i18n (or equivalent) | 104 <paper-button id="delete-button">DELETE</paper-button> |
64 string --> | 105 </div> |
65 <div id="number-selected">{{count}} selected</div> | 106 </template> |
66 <paper-button id="cancel-button" on-tap="onClearSelectionTap_"> | 107 </div> |
67 CANCEL | 108 <div id="button-container"> |
tsergeant
2016/02/03 22:57:11
This is all still visible when there are items sel
yingran
2016/02/03 23:25:52
Done.
| |
109 <div id="front-padding"></div> | |
110 <div id="clear-browsing-data"> | |
111 <paper-button on-tap="clearBrowsingData" i18n-content="clearBrowsingData "> | |
68 </paper-button> | 112 </paper-button> |
69 <paper-button id="delete-button">DELETE</paper-button> | |
70 </div> | 113 </div> |
71 </template> | 114 <div id="back-padding"></div> |
72 | 115 </div> |
73 </template> | 116 </template> |
74 <script src="chrome://history/history_toolbar.js"></script> | 117 <script src="chrome://history/history_toolbar.js"></script> |
75 </dom-module> | 118 </dom-module> |
OLD | NEW |