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 <dialog is="cr-action-menu" id="dropdown" on-mousedown="onMenuMousedown_"> | 29 <template is="cr-lazy-render" id="dropdown"> |
30 <template is="dom-repeat" items="[[menuCommands_]]" as="command"> | 30 <dialog is="cr-action-menu" on-mousedown="onMenuMousedown_"> |
31 <button class="dropdown-item" | 31 <template is="dom-repeat" items="[[menuCommands_]]" as="command"> |
32 command$="[[command]]" | 32 <button class="dropdown-item" |
33 hidden$="[[!isCommandVisible_(command, menuIds_)]]" | 33 command$="[[command]]" |
34 disabled$="[[!isCommandEnabled_(command, menuIds_)]]" | 34 hidden$="[[!isCommandVisible_(command, menuIds_)]]" |
35 on-tap="onCommandClick_"> | 35 disabled$="[[!isCommandEnabled_(command, menuIds_)]]" |
36 <span class="label"> | 36 on-tap="onCommandClick_"> |
37 [[getCommandLabel_(command, menuIds_)]] | 37 <span class="label"> |
38 </span> | 38 [[getCommandLabel_(command, menuIds_)]] |
39 <span class="sublabel"> | 39 </span> |
40 [[getCommandSublabel_(command, menuIds_)]] | 40 <span class="sublabel"> |
41 </span> | 41 [[getCommandSublabel_(command, menuIds_)]] |
42 </button> | 42 </span> |
43 <hr hidden$="[[!showDividerAfter_(command, menuIds_)]]"></hr> | 43 </button> |
44 </template> | 44 <hr hidden$="[[!showDividerAfter_(command, menuIds_)]]"></hr> |
45 </dialog> | 45 </template> |
| 46 </dialog> |
| 47 </template> |
46 <template is="cr-lazy-render" id="editDialog"> | 48 <template is="cr-lazy-render" id="editDialog"> |
47 <bookmarks-edit-dialog></bookmarks-edit-dialog> | 49 <bookmarks-edit-dialog></bookmarks-edit-dialog> |
48 </template> | 50 </template> |
49 </template> | 51 </template> |
50 <script src="chrome://bookmarks/command_manager.js"></script> | 52 <script src="chrome://bookmarks/command_manager.js"></script> |
51 </dom-module> | 53 </dom-module> |
OLD | NEW |