OLD | NEW |
1 <link rel="import" href="chrome://resources/html/polymer.html"> | 1 <link rel="import" href="chrome://resources/html/polymer.html"> |
2 | 2 |
3 <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_action_menu/cr_action
_menu.html"> |
4 <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_lazy_render/cr_lazy_r
ender.html"> |
5 <link rel="import" href="chrome://resources/html/cr/ui/command.html"> | 5 <link rel="import" href="chrome://resources/html/cr/ui/command.html"> |
6 <link rel="import" href="chrome://resources/polymer/v1_0/iron-a11y-keys-behavior
/iron-a11y-keys-behavior.html"> | 6 <link rel="import" href="chrome://resources/polymer/v1_0/iron-a11y-keys-behavior
/iron-a11y-keys-behavior.html"> |
7 <link rel="import" href="chrome://bookmarks/edit_dialog.html"> | 7 <link rel="import" href="chrome://bookmarks/edit_dialog.html"> |
8 <link rel="import" href="chrome://bookmarks/shared_style.html"> | 8 <link rel="import" href="chrome://bookmarks/shared_style.html"> |
9 <link rel="import" href="chrome://bookmarks/store_client.html"> | 9 <link rel="import" href="chrome://bookmarks/store_client.html"> |
10 | 10 |
11 <dom-module id="bookmarks-command-manager"> | 11 <dom-module id="bookmarks-command-manager"> |
12 <template> | 12 <template> |
13 <style include="shared-style"> | 13 <style include="shared-style"> |
14 .label { | 14 .label { |
15 flex: 1; | 15 flex: 1; |
16 } | 16 } |
17 | 17 |
18 .sublabel { | 18 .sublabel { |
19 -webkit-margin-start: 8px; | 19 -webkit-margin-start: 8px; |
20 color: var(--secondary-text-color); | 20 color: var(--secondary-text-color); |
21 text-align: end; | 21 text-align: end; |
22 width: 3ch; | 22 width: 3ch; |
23 } | 23 } |
24 | 24 |
25 :host(:not([has-any-sublabel_])) .sublabel { | 25 :host(:not([has-any-sublabel_])) .sublabel { |
26 display: none; | 26 display: none; |
27 } | 27 } |
28 </style> | 28 </style> |
29 <template is="cr-lazy-render" id="dropdown"> | 29 <template is="cr-lazy-render" id="dropdown"> |
30 <dialog is="cr-action-menu" on-mousedown="onMenuMousedown_"> | 30 <dialog is="cr-action-menu" on-mousedown="onMenuMousedown_" role="menu"> |
31 <template is="dom-repeat" items="[[menuCommands_]]" as="command"> | 31 <template is="dom-repeat" items="[[menuCommands_]]" as="command"> |
32 <button class="dropdown-item" | 32 <button class="dropdown-item" |
33 command$="[[command]]" | 33 command$="[[command]]" |
34 hidden$="[[!isCommandVisible_(command, menuIds_)]]" | 34 hidden$="[[!isCommandVisible_(command, menuIds_)]]" |
35 disabled$="[[!isCommandEnabled_(command, menuIds_)]]" | 35 disabled$="[[!isCommandEnabled_(command, menuIds_)]]" |
36 on-tap="onCommandClick_"> | 36 on-tap="onCommandClick_" |
| 37 role="menuitem"> |
37 <span class="label"> | 38 <span class="label"> |
38 [[getCommandLabel_(command, menuIds_)]] | 39 [[getCommandLabel_(command, menuIds_)]] |
39 </span> | 40 </span> |
40 <span class="sublabel"> | 41 <span class="sublabel"> |
41 [[getCommandSublabel_(command, menuIds_)]] | 42 [[getCommandSublabel_(command, menuIds_)]] |
42 </span> | 43 </span> |
43 </button> | 44 </button> |
44 <hr hidden$="[[!showDividerAfter_(command, menuIds_)]]"></hr> | 45 <hr hidden$="[[!showDividerAfter_(command, menuIds_)]]"></hr> |
45 </template> | 46 </template> |
46 </dialog> | 47 </dialog> |
(...skipping 11 matching lines...) Expand all Loading... |
58 </paper-button> | 59 </paper-button> |
59 <paper-button class="action-button" on-tap="onOpenConfirmTap_"> | 60 <paper-button class="action-button" on-tap="onOpenConfirmTap_"> |
60 $i18n{openDialogConfirm} | 61 $i18n{openDialogConfirm} |
61 </paper-button> | 62 </paper-button> |
62 </div> | 63 </div> |
63 </dialog> | 64 </dialog> |
64 </template> | 65 </template> |
65 </template> | 66 </template> |
66 <script src="chrome://bookmarks/command_manager.js"></script> | 67 <script src="chrome://bookmarks/command_manager.js"></script> |
67 </dom-module> | 68 </dom-module> |
OLD | NEW |