| OLD | NEW |
| 1 <link rel="import" href="chrome://resources/cr_elements/icons.html"> | 1 <link rel="import" href="chrome://resources/cr_elements/icons.html"> |
| 2 <link rel="import" href="chrome://resources/html/polymer.html"> | 2 <link rel="import" href="chrome://resources/html/polymer.html"> |
| 3 <link rel="import" href="chrome://resources/polymer/v1_0/iron-dropdown/iron-drop
down.html"> | |
| 4 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper
-icon-button.html"> | 3 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper
-icon-button.html"> |
| 5 <link rel="import" href="chrome://resources/polymer/v1_0/paper-item/paper-item.h
tml"> | |
| 6 <link rel="import" href="/printing_page/cups_printers_browser_proxy.html"> | 4 <link rel="import" href="/printing_page/cups_printers_browser_proxy.html"> |
| 5 <link rel="import" href="/settings_action_menu.html"> |
| 7 <link rel="import" href="/settings_shared_css.html"> | 6 <link rel="import" href="/settings_shared_css.html"> |
| 8 | 7 |
| 9 <dom-module id="settings-cups-printers-list"> | 8 <dom-module id="settings-cups-printers-list"> |
| 10 <template> | 9 <template> |
| 11 <style include="settings-shared"> | 10 <style include="settings-shared"> |
| 12 #container { | 11 #container { |
| 13 border-top: 1px solid lightgray; | 12 border-top: 1px solid lightgray; |
| 14 display: flex; | 13 display: flex; |
| 15 padding: 2px 20px; | 14 padding: 2px 20px; |
| 16 } | 15 } |
| 17 | 16 |
| 18 .name-column { | 17 .name-column { |
| 19 flex: 1; | 18 flex: 1; |
| 20 margin: 2px; | 19 margin: 2px; |
| 21 } | 20 } |
| 22 | 21 |
| 23 .list-item { | 22 .list-item { |
| 24 min-height: 20px; | 23 min-height: 20px; |
| 25 } | 24 } |
| 26 | |
| 27 iron-dropdown { | |
| 28 width: 120px; | |
| 29 } | |
| 30 </style> | 25 </style> |
| 31 | 26 |
| 32 <template is="dom-repeat" items="{{printers}}" | 27 <dialog is="settings-action-menu"> |
| 28 <button class="dropdown-item" role="option" on-tap="onDetailsTap_"> |
| 29 $i18n{cupsPrinterDetails} |
| 30 </button> |
| 31 <button class="dropdown-item" role="option" on-tap="onRemoveTap_"> |
| 32 $i18n{removePrinter} |
| 33 </button> |
| 34 </dialog> |
| 35 <template is="dom-repeat" items="[[printers]]" |
| 33 filter="[[filterPrinter_(searchTerm)]]"> | 36 filter="[[filterPrinter_(searchTerm)]]"> |
| 34 <div id="container" class="list-item"> | 37 <div id="container" class="list-item"> |
| 35 <div class="name-column"> | 38 <div class="name-column"> |
| 36 <span class="name" id="printer-name">[[item.printerName]]</span> | 39 <span class="name" id="printer-name">[[item.printerName]]</span> |
| 37 <!--TODO(xdai): Add icon for enterprise CUPS printer. --> | 40 <!--TODO(xdai): Add icon for enterprise CUPS printer. --> |
| 38 </div> | 41 </div> |
| 39 <paper-icon-button icon="cr:more-vert" toggles | 42 <paper-icon-button icon="cr:more-vert" on-tap="onOpenActionMenuTap_"> |
| 40 active="{{item.menuOpened}}"> | |
| 41 </paper-icon-button> | 43 </paper-icon-button> |
| 42 <iron-dropdown opened="{{item.menuOpened}}" horizontal-align="right" | |
| 43 vertical-align="top" horizontal-offset="15" vertical-offset="5"> | |
| 44 <div class="dropdown-content"> | |
| 45 <paper-item on-tap="onDetailsTap_"> | |
| 46 $i18n{cupsPrinterDetails} | |
| 47 </paper-item> | |
| 48 <paper-item on-tap="onRemoveTap_"> | |
| 49 $i18n{removePrinter} | |
| 50 </paper-item> | |
| 51 <div> | |
| 52 </iron-dropdown> | |
| 53 </div> | 44 </div> |
| 54 </template> | 45 </template> |
| 55 </template> | 46 </template> |
| 56 <script src="cups_printers_list.js"></script> | 47 <script src="cups_printers_list.js"></script> |
| 57 </dom-module> | 48 </dom-module> |
| OLD | NEW |