Chromium Code Reviews| 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/cr_elements/cr_action_menu/cr_action _menu.html"> | 2 <link rel="import" href="chrome://resources/cr_elements/cr_action_menu/cr_action _menu.html"> |
| 3 <link rel="import" href="chrome://resources/cr_elements/cr_lazy_render/cr_lazy_r ender.html"> | 3 <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_toolbar/cr_toolbar.ht ml"> | 4 <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_se lection_overlay.html"> | |
| 5 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper -icon-button-light.html"> | 6 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper -icon-button-light.html"> |
| 6 <link rel="import" href="chrome://bookmarks/edit_dialog.html"> | 7 <link rel="import" href="chrome://bookmarks/edit_dialog.html"> |
| 7 <link rel="import" href="chrome://bookmarks/shared_style.html"> | 8 <link rel="import" href="chrome://bookmarks/shared_style.html"> |
| 8 <link rel="stylesheet" href="chrome://resources/css/md_colors.css"> | 9 <link rel="stylesheet" href="chrome://resources/css/md_colors.css"> |
| 9 | 10 |
| 10 <dom-module id="bookmarks-toolbar"> | 11 <dom-module id="bookmarks-toolbar"> |
| 11 <template> | 12 <template> |
| 12 <style include="shared-style"> | 13 <style include="shared-style"> |
| 14 :host { | |
| 15 background: var(--md-toolbar-color); | |
| 16 color: #fff; | |
| 17 transition: background-color 150ms; | |
| 18 } | |
| 19 | |
| 20 :host([show-selection-overlay]) { | |
| 21 background: var(--interactive-color); | |
| 22 } | |
| 23 | |
| 13 button.more-actions { | 24 button.more-actions { |
| 14 margin: 4px; | 25 margin: 4px; |
| 15 } | 26 } |
| 16 | 27 |
| 17 button.more-vert-button div { | 28 button.more-vert-button div { |
| 18 border-color: white; | 29 border-color: white; |
| 19 } | 30 } |
| 20 | 31 |
| 32 cr-toolbar, | |
| 33 cr-toolbar-selection-overlay { | |
| 34 flex: 1; | |
| 35 } | |
| 36 | |
| 21 cr-toolbar { | 37 cr-toolbar { |
| 22 --cr-toolbar-field-margin: | 38 --cr-toolbar-field-margin: |
| 23 calc(var(--sidebar-width) + var(--splitter-width)); | 39 calc(var(--sidebar-width) + var(--splitter-width)); |
| 24 background: var(--md-toolbar-color); | 40 } |
| 41 | |
| 42 @media (min-width: 901px) { | |
|
calamity
2017/04/24 06:06:38
=S
Any way to factor this into a css variable in
tsergeant
2017/04/24 06:49:10
You can't have CSS variables in media queries, but
calamity
2017/04/26 10:13:25
Wew.
| |
| 43 cr-toolbar-selection-overlay { | |
| 44 --selection-overlay-padding: var(--card-padding-side); | |
| 45 --cr-toolbar-field-margin: var(--sidebar-width); | |
| 46 --selection-overlay-max-width: var(--card-max-width); | |
| 47 } | |
| 25 } | 48 } |
| 26 </style> | 49 </style> |
| 27 <dialog is="cr-action-menu" id="dropdown"> | 50 <dialog is="cr-action-menu" id="dropdown"> |
| 28 <button class="dropdown-item" on-tap="onSortTap_" | 51 <button class="dropdown-item" on-tap="onSortTap_" |
| 29 disabled="[[hasSearchTerm_(searchTerm_)]]"> | 52 disabled="[[hasSearchTerm_(searchTerm_)]]"> |
| 30 $i18n{menuSort} | 53 $i18n{menuSort} |
| 31 </button> | 54 </button> |
| 32 <hr> | 55 <hr> |
| 33 <button class="dropdown-item" on-tap="onAddBookmarkTap_" | 56 <button class="dropdown-item" on-tap="onAddBookmarkTap_" |
| 34 disabled="[[hasSearchTerm_(searchTerm_)]]"> | 57 disabled="[[hasSearchTerm_(searchTerm_)]]"> |
| 35 $i18n{menuAddBookmark} | 58 $i18n{menuAddBookmark} |
| 36 </button> | 59 </button> |
| 37 <button class="dropdown-item" on-tap="onAddFolderTap_" | 60 <button class="dropdown-item" on-tap="onAddFolderTap_" |
| 38 disabled="[[hasSearchTerm_(searchTerm_)]]"> | 61 disabled="[[hasSearchTerm_(searchTerm_)]]"> |
| 39 $i18n{menuAddFolder} | 62 $i18n{menuAddFolder} |
| 40 </button> | 63 </button> |
| 41 <hr> | 64 <hr> |
| 42 <button class="dropdown-item" on-tap="onImportTap_"> | 65 <button class="dropdown-item" on-tap="onImportTap_"> |
| 43 $i18n{menuImport} | 66 $i18n{menuImport} |
| 44 </button> | 67 </button> |
| 45 <button class="dropdown-item" on-tap="onExportTap_"> | 68 <button class="dropdown-item" on-tap="onExportTap_"> |
| 46 $i18n{menuExport} | 69 $i18n{menuExport} |
| 47 </button> | 70 </button> |
| 48 </dialog> | 71 </dialog> |
| 49 <cr-toolbar page-name="$i18n{title}" | 72 <cr-toolbar page-name="$i18n{title}" |
| 50 clear-label="$i18n{clearSearch}" | 73 clear-label="$i18n{clearSearch}" |
| 51 search-prompt="$i18n{searchPrompt}" | 74 search-prompt="$i18n{searchPrompt}" |
| 75 hidden$="[[showSelectionOverlay]]" | |
| 52 on-search-changed="onSearchChanged_"> | 76 on-search-changed="onSearchChanged_"> |
| 53 <button is="paper-icon-button-light" class="more-actions more-vert-button" | 77 <button is="paper-icon-button-light" class="more-actions more-vert-button" |
| 54 on-tap="onMenuButtonOpenTap_"> | 78 on-tap="onMenuButtonOpenTap_"> |
| 55 <div></div> | 79 <div></div> |
| 56 <div></div> | 80 <div></div> |
| 57 <div></div> | 81 <div></div> |
| 58 </button> | 82 </button> |
| 59 </cr-toolbar> | 83 </cr-toolbar> |
| 60 <template is="cr-lazy-render" id="addDialog"> | 84 <template is="cr-lazy-render" id="addDialog"> |
| 61 <bookmarks-edit-dialog></bookmarks-edit-dialog> | 85 <bookmarks-edit-dialog></bookmarks-edit-dialog> |
| 62 </template> | 86 </template> |
| 87 <template is="dom-if" if="[[showSelectionOverlay]]"> | |
| 88 <cr-toolbar-selection-overlay delete-label="$i18n{delete}" | |
| 89 cancel-label="$i18n{cancel}" | |
| 90 selection-label="[[numberOfItemsSelected_(selectedCount_)]]" | |
|
calamity
2017/04/24 06:06:38
nit: (get)itemsSelectedString_
tsergeant
2017/04/24 06:49:10
Done.
| |
| 91 on-clear-selected-items="onClearSelectionTap_"> | |
| 92 </cr-toolbar-selection-overlay> | |
| 93 </template> | |
| 63 </template> | 94 </template> |
| 64 <script src="chrome://bookmarks/toolbar.js"></script> | 95 <script src="chrome://bookmarks/toolbar.js"></script> |
| 65 </dom-module> | 96 </dom-module> |
| OLD | NEW |