Chromium Code Reviews| 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; | |
|
calamity
2016/02/05 00:43:37
We should convert this 960px value into a variable
| |
| 54 max-width: 960px; | |
| 55 pointer-events: auto; | |
| 56 } | |
| 57 | |
| 58 :host([items-selected_]) #clear-browsing-data { | |
| 59 display: none; | |
| 60 } | |
| 61 | |
| 62 #button-container { | |
| 63 @apply(--layout-horizontal); | |
| 64 @apply(--layout-center); | |
| 65 height: inherit; | |
| 66 left: 0; | |
| 67 pointer-events: none; | |
| 68 position: absolute; | |
| 69 top: 0; | |
| 70 width: 100%; | |
| 71 } | |
| 72 | |
| 73 #toolbar-container { | |
| 74 @apply(--layout-horizontal); | |
| 75 @apply(--layout-center); | |
| 76 width: 100%; | |
| 77 } | |
| 78 | |
| 79 #front-padding { | |
| 80 flex: 1 1 0; | |
| 81 min-width: 100px; | |
| 82 } | |
| 83 | |
| 84 #back-padding { | |
| 85 flex: 1 1 0; | |
| 86 pointer-events: none; | |
| 87 } | |
| 50 </style> | 88 </style> |
| 89 <div id="toolbar-container"> | |
| 90 <template is="dom-if" if="{{!itemsSelected_}}"> | |
| 91 <h1 i18n-content="title" id="title"></h1> | |
| 92 <cr-search-field id="search-input" | |
| 93 i18n-values="label:search;clear-label:clearSearch"></cr-search-field > | |
|
calamity
2016/02/05 00:43:37
nit: Wrap.
| |
| 94 </template> | |
| 51 | 95 |
| 52 <template is="dom-if" if="{{!itemsSelected_}}"> | 96 <template is="dom-if" if="{{itemsSelected_}}"> |
| 53 <h1 i18n-content="title" id="title"></h1> | 97 <div class="items"> |
| 54 <cr-search-field id="search-input" | 98 <paper-icon-button icon="clear" id="cancel-icon-button" |
| 55 i18n-values="label:search;clear-label:clearSearch"></cr-search-field> | 99 on-tap="onClearSelectionTap_"> |
| 56 </template> | 100 </paper-icon-button> |
| 57 | 101 <!-- TODO: change "selected" and number to an i18n (or equivalent) |
| 58 <template is="dom-if" if="{{itemsSelected_}}"> | 102 string --> |
| 59 <div id="items"> | 103 <div id="number-selected">{{count}} selected</div> |
| 60 <paper-icon-button icon="clear" id="cancel-icon-button" | 104 <paper-button id="cancel-button" on-tap="onClearSelectionTap_"> |
| 61 on-tap="onClearSelectionTap_"> | 105 CANCEL |
| 62 </paper-icon-button> | 106 </paper-button> |
| 63 <!-- TODO: change "selected" and number to an i18n (or equivalent) | 107 <paper-button id="delete-button">DELETE</paper-button> |
| 64 string --> | 108 </div> |
| 65 <div id="number-selected">{{count}} selected</div> | 109 </template> |
| 66 <paper-button id="cancel-button" on-tap="onClearSelectionTap_"> | 110 </div> |
| 67 CANCEL | 111 <div id="button-container"> |
| 112 <div id="front-padding"></div> | |
| 113 <div id="clear-browsing-data"> | |
| 114 <paper-button on-tap="clearBrowsingData" i18n-content="clearBrowsingData "> | |
|
tsergeant
2016/02/04 02:49:02
Rename this event to the standard format:
onClear
yingran
2016/02/04 23:29:43
Done.
| |
| 68 </paper-button> | 115 </paper-button> |
| 69 <paper-button id="delete-button">DELETE</paper-button> | |
| 70 </div> | 116 </div> |
| 71 </template> | 117 <div id="back-padding"></div> |
| 72 | 118 </div> |
| 73 </template> | 119 </template> |
| 74 <script src="chrome://history/history_toolbar.js"></script> | 120 <script src="chrome://history/history_toolbar.js"></script> |
| 75 </dom-module> | 121 </dom-module> |
| OLD | NEW |