| OLD | NEW |
| 1 <link rel="import" href="chrome://downloads/action_service.html"> | 1 <link rel="import" href="chrome://downloads/action_service.html"> |
| 2 <link rel="import" href="chrome://resources/html/assert.html"> | 2 <link rel="import" href="chrome://resources/html/assert.html"> |
| 3 <link rel="import" href="chrome://resources/html/cr.html"> | 3 <link rel="import" href="chrome://resources/html/cr.html"> |
| 4 <link rel="import" href="chrome://resources/html/polymer.html"> | 4 <link rel="import" href="chrome://resources/html/polymer.html"> |
| 5 <link rel="import" href="chrome://resources/html/util.html"> | 5 <link rel="import" href="chrome://resources/html/util.html"> |
| 6 <link rel="import" href="chrome://resources/polymer/v1_0/paper-item/paper-item.h
tml"> | 6 <link rel="import" href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.htm
l"> |
| 7 <link rel="import" href="chrome://resources/polymer/v1_0/paper-menu/paper-menu.h
tml"> | 7 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper
-icon-button-light.html"> |
| 8 <link rel="import" href="chrome://resources/polymer/v1_0/paper-menu-button/paper
-menu-button.html"> | 8 <link rel="import" href="chrome://resources/cr_elements/cr_action_menu/cr_action
_menu.html"> |
| 9 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper
-icon-button.html"> | |
| 10 <link rel="import" href="chrome://resources/cr_elements/cr_toolbar/cr_toolbar.ht
ml"> | 9 <link rel="import" href="chrome://resources/cr_elements/cr_toolbar/cr_toolbar.ht
ml"> |
| 11 <link rel="import" href="chrome://resources/cr_elements/icons.html"> | 10 <link rel="import" href="chrome://resources/cr_elements/icons.html"> |
| 12 | 11 |
| 13 <dom-module id="downloads-toolbar"> | 12 <dom-module id="downloads-toolbar"> |
| 14 <template> | 13 <template> |
| 15 <style> | 14 <style> |
| 16 :host { | 15 :host { |
| 17 align-items: center; | 16 align-items: center; |
| 18 background: var(--md-toolbar-color); | 17 background: var(--md-toolbar-color); |
| 19 color: white; | 18 color: white; |
| 20 display: flex; | 19 display: flex; |
| 21 min-height: 56px; | 20 min-height: 56px; |
| 22 } | 21 } |
| 23 | 22 |
| 24 [hidden] { | 23 [hidden] { |
| 25 display: none !important; | 24 display: none !important; |
| 26 } | 25 } |
| 27 | 26 |
| 28 #toolbar { | 27 #toolbar { |
| 29 --cr-toolbar-field-width: var(--downloads-card-width); | 28 --cr-toolbar-field-width: var(--downloads-card-width); |
| 30 flex: 1; | 29 flex: 1; |
| 31 } | 30 } |
| 32 | 31 |
| 33 paper-icon-button { | 32 #moreActions { |
| 34 --iron-icon-height: 20px; | 33 --iron-icon-height: 20px; |
| 35 --iron-icon-width: 20px; | 34 --iron-icon-width: 20px; |
| 36 --paper-icon-button: { | 35 height: 32px; |
| 37 height: 32px; | 36 padding: 6px; |
| 38 padding: 6px; | 37 width: 32px; |
| 39 width: 32px; | |
| 40 }; | |
| 41 } | |
| 42 | |
| 43 #more { | |
| 44 --paper-menu-button: { | |
| 45 padding: 6px; | |
| 46 }; | |
| 47 } | |
| 48 | |
| 49 paper-menu { | |
| 50 --paper-menu-selected-item: { | |
| 51 font-weight: normal; | |
| 52 }; | |
| 53 } | |
| 54 | |
| 55 paper-item { | |
| 56 -webkit-user-select: none; | |
| 57 cursor: pointer; | |
| 58 font: inherit; | |
| 59 min-height: 40px; | |
| 60 /* TODO(michaelpg): fix this for everybody ever. | |
| 61 * https://github.com/PolymerElements/paper-menu-button/issues/56 */ | |
| 62 white-space: nowrap; | |
| 63 } | 38 } |
| 64 </style> | 39 </style> |
| 65 <cr-toolbar id="toolbar" page-name="$i18n{title}" | 40 <cr-toolbar id="toolbar" page-name="$i18n{title}" |
| 66 search-prompt="$i18n{search}" clear-label="$i18n{clearSearch}" | 41 search-prompt="$i18n{search}" clear-label="$i18n{clearSearch}" |
| 67 spinner-active="{{spinnerActive}}" on-search-changed="onSearchChanged_"> | 42 spinner-active="{{spinnerActive}}" on-search-changed="onSearchChanged_"> |
| 68 <div class="more-actions"> | 43 <button is="paper-icon-button-light" class="more-actions" id="moreActions" |
| 69 <paper-menu-button id="more" horizontal-align="right" | 44 title="$i18n{moreActions}" class="dropdown-trigger" |
| 70 allow-outside-scroll> | 45 on-tap="onMoreActionsTap_"> |
| 71 <paper-icon-button icon="cr:more-vert" title="$i18n{moreActions}" | 46 <iron-icon icon="cr:more-vert"></iron-icon> |
| 72 class="dropdown-trigger"></paper-icon-button> | 47 </button> |
| 73 <paper-menu class="dropdown-content"> | 48 </cr-toolbar> |
| 74 <paper-item class="clear-all" on-tap="onClearAllTap_" | 49 <!-- TODO(dbeam): should cr-action-menu be role="menu" by default? --> |
| 75 role="menuitem" on-blur="onItemBlur_"> | 50 <dialog is="cr-action-menu" id="moreActionsMenu" role="menu"> |
| 76 $i18n{clearAll} | 51 <button class="dropdown-item clear-all" on-tap="onClearAllTap_" |
| 77 </paper-item> | 52 role="menuitem"> |
| 78 <paper-item on-tap="onOpenDownloadsFolderTap_" | 53 $i18n{clearAll} |
| 79 role="menuitem" on-blur="onItemBlur_"> | |
| 80 $i18n{openDownloadsFolder} | |
| 81 </paper-item> | |
| 82 </paper-menu> | |
| 83 </paper-menu-button> | |
| 84 </div> | 54 </div> |
| 85 </cr-toolbar> | 55 <button class="dropdown-item" on-tap="onOpenDownloadsFolderTap_" |
| 56 role="menuitem"> |
| 57 $i18n{openDownloadsFolder} |
| 58 </button> |
| 59 </dialog> |
| 86 </template> | 60 </template> |
| 87 <script src="chrome://downloads/toolbar.js"></script> | 61 <script src="chrome://downloads/toolbar.js"></script> |
| 88 </dom-module> | 62 </dom-module> |
| OLD | NEW |