Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <link rel="import" href="chrome://resources/cr_elements/cr_dialog/cr_dialog.html "> | 1 <link rel="import" href="chrome://resources/cr_elements/cr_dialog/cr_dialog.html "> |
| 2 <link rel="import" href="chrome://resources/cr_elements/icons.html"> | 2 <link rel="import" href="chrome://resources/cr_elements/icons.html"> |
| 3 <link rel="import" href="chrome://resources/html/polymer.html"> | 3 <link rel="import" href="chrome://resources/html/polymer.html"> |
| 4 <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/iron-dropdown/iron-drop down.html"> |
| 5 <link rel="import" href="chrome://resources/polymer/v1_0/iron-input/iron-input.h tml"> | 5 <link rel="import" href="chrome://resources/polymer/v1_0/iron-input/iron-input.h tml"> |
| 6 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt on.html"> | 6 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt on.html"> |
| 7 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper -icon-button.html"> | 7 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper -icon-button.html"> |
| 8 <link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input -container.html"> | 8 <link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input -container.html"> |
| 9 <link rel="import" href="chrome://resources/polymer/v1_0/paper-item/paper-item.h tml"> | |
| 10 <link rel="import" href="cups_printers_browser_proxy.html"> | 9 <link rel="import" href="cups_printers_browser_proxy.html"> |
| 11 <link rel="import" href="../settings_shared_css.html"> | 10 <link rel="import" href="../settings_shared_css.html"> |
| 12 | 11 |
| 12 <dom-module id="cups-add-printer-dialog-style"> | |
| 13 <template> | |
| 14 <style> | |
| 15 .list-item { | |
| 16 background: none; | |
| 17 border: none; | |
| 18 box-sizing: border-box; | |
| 19 color: var(--paper-grey-800); | |
| 20 font: inherit; | |
| 21 min-height: 32px; | |
| 22 padding: 0 24px; | |
| 23 text-align: start; | |
| 24 width: 100%; | |
| 25 @apply(--settings-actionable); | |
|
stevenjb
2017/02/07 00:13:08
This seems like a lot of unfortunatel customizatio
dpapad
2017/02/07 00:22:58
This is copied from cr-action-menu https://cs.chro
dpapad
2017/02/07 00:25:01
Regarding -settings-actionable, it seems to work w
stevenjb
2017/02/07 00:27:12
OK, that's fair. We should probably audit settings
stevenjb
2017/02/07 00:27:12
OK, maybe include settings_shared_css explicitly t
dpapad
2017/02/07 00:56:28
I think you meant settings_var_css instead. Done.
stevenjb
2017/02/07 01:11:06
SGTM
stevenjb
2017/02/07 01:11:06
Yup :)
| |
| 26 } | |
| 27 | |
| 28 .list-item:focus { | |
| 29 background-color: var(--paper-grey-300); | |
| 30 outline: none; | |
| 31 } | |
| 32 </style> | |
| 33 </template> | |
| 34 </dom-module> | |
|
stevenjb
2017/02/07 00:13:08
nit: blank line
dpapad
2017/02/07 00:22:58
Done.
| |
| 13 <dom-module id="add-printer-list"> | 35 <dom-module id="add-printer-list"> |
| 14 <template> | 36 <template> |
| 15 <style include="settings-shared"> | 37 <style include="settings-shared cups-add-printer-dialog-style"> |
| 16 .list-frame { | |
| 17 -webkit-padding-end: 0; | |
| 18 -webkit-padding-start: 0; | |
| 19 } | |
| 20 | |
| 21 .list-item { | 38 .list-item { |
| 22 -webkit-padding-start: 20px; | 39 padding: 0 20px; |
| 23 min-height: 35px; | |
| 24 } | 40 } |
| 25 </style> | 41 </style> |
| 26 <div class="list-frame"> | 42 <div> |
| 27 <array-selector id="arraySelector" items="[[printers]]" | 43 <array-selector id="arraySelector" items="[[printers]]" |
| 28 selected="{{selectedPrinter}}"> | 44 selected="{{selectedPrinter}}"> |
| 29 </array-selector> | 45 </array-selector> |
| 30 <template is="dom-repeat" items="[[printers]]"> | 46 <template is="dom-repeat" items="[[printers]]"> |
| 31 <paper-item class="list-item" on-tap="onSelect_"> | 47 <button class="list-item" on-tap="onSelect_"> |
| 32 [[item.printerName]] [[item.printerModel]] | 48 [[item.printerName]] [[item.printerModel]] |
| 33 </paper-item> | 49 </button> |
| 34 </template> | 50 </template> |
| 35 </div> | 51 </div> |
| 36 </template> | 52 </template> |
| 37 </dom-module> | 53 </dom-module> |
| 38 | 54 |
| 39 <dom-module id="drop-down-search-box"> | 55 <dom-module id="drop-down-search-box"> |
| 40 <template> | 56 <template> |
| 41 <style include="settings-shared"> | 57 <style include="settings-shared cups-add-printer-dialog-style"> |
| 42 iron-dropdown, | 58 iron-dropdown, |
| 43 paper-input-container { | 59 paper-input-container { |
| 44 width: 270px; | 60 width: 270px; |
| 45 } | 61 } |
| 46 | 62 |
| 47 paper-input-container { | 63 paper-input-container { |
| 48 --paper-input-container-color: var(--google-grey-500); | 64 --paper-input-container-color: var(--google-grey-500); |
| 49 --paper-input-container-input: { | 65 --paper-input-container-input: { |
| 50 font-size: inherit; | 66 font-size: inherit; |
| 51 }; | 67 }; |
| 52 } | 68 } |
| 53 | 69 |
| 54 iron-dropdown .dropdown-content paper-item { | 70 iron-dropdown .dropdown-content { |
| 55 min-height: 40px; | 71 background-color: white; |
| 72 box-shadow: 0 2px 6px var(--paper-grey-500); | |
| 73 min-width: 128px; | |
| 74 padding: 8px 0; | |
| 56 } | 75 } |
| 57 </style> | 76 </style> |
| 58 <paper-input-container no-label-float> | 77 <paper-input-container no-label-float> |
| 59 <input is="iron-input" type="search" on-tap="onTap_" | 78 <input is="iron-input" type="search" on-tap="onTap_" |
| 60 on-search="onInputValueChanged_" on-change="onChange_" incremental> | 79 on-search="onInputValueChanged_" on-change="onChange_" incremental> |
| 61 <paper-icon-button suffix id="searchIcon" icon="cr:search" hidden> | 80 <paper-icon-button suffix id="searchIcon" icon="cr:search" hidden> |
| 62 </paper-icon-button> | 81 </paper-icon-button> |
| 63 <paper-icon-button suffix id="dropdownIcon" icon="cr:arrow-drop-down"> | 82 <paper-icon-button suffix id="dropdownIcon" icon="cr:arrow-drop-down"> |
| 64 </paper-icon-button> | 83 </paper-icon-button> |
| 65 </paper-input-container> | 84 </paper-input-container> |
| 66 <iron-dropdown horizontal-align="left" vertical-align="top" | 85 <iron-dropdown horizontal-align="left" vertical-align="top" |
| 67 vertical-offset="47"> | 86 vertical-offset="47"> |
| 68 <div class="dropdown-content"> | 87 <div class="dropdown-content"> |
| 69 <template is="dom-repeat" items="[[items]]" | 88 <template is="dom-repeat" items="[[items]]" |
| 70 filter="[[filterItems_(searchTerm_)]]"> | 89 filter="[[filterItems_(searchTerm_)]]"> |
| 71 <paper-item on-tap="onSelect_">[[item]]</paper-item> | 90 <button class="list-item" on-tap="onSelect_">[[item]]</button> |
| 72 </template> | 91 </template> |
| 73 </div> | 92 </div> |
| 74 </iron-dropdown> | 93 </iron-dropdown> |
| 75 </template> | 94 </template> |
| 76 </dom-module> | 95 </dom-module> |
| 77 | 96 |
| 78 <dom-module id="add-printer-dialog"> | 97 <dom-module id="add-printer-dialog"> |
| 79 <template> | 98 <template> |
| 80 <style include="settings-shared"> | 99 <style include="settings-shared"> |
| 81 #dialog .body { | 100 #dialog .body { |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 103 <div class="body"> | 122 <div class="body"> |
| 104 <content select=".dialog-body"></content> | 123 <content select=".dialog-body"></content> |
| 105 </div> | 124 </div> |
| 106 <div class="button-container"> | 125 <div class="button-container"> |
| 107 <content select=".dialog-buttons"></content> | 126 <content select=".dialog-buttons"></content> |
| 108 </div> | 127 </div> |
| 109 </dialog> | 128 </dialog> |
| 110 </template> | 129 </template> |
| 111 <script src="cups_add_printer_dialog_util.js"></script> | 130 <script src="cups_add_printer_dialog_util.js"></script> |
| 112 </dom-module> | 131 </dom-module> |
| OLD | NEW |