Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <link rel="import" href="chrome://resources/html/polymer.html"> | 1 <link rel="import" href="chrome://resources/html/polymer.html"> |
| 2 <link rel="import" href="chrome://resources/html/md_select_css.html"> | |
| 2 <link rel="import" href="chrome://resources/polymer/v1_0/iron-collapse/iron-coll apse.html"> | 3 <link rel="import" href="chrome://resources/polymer/v1_0/iron-collapse/iron-coll apse.html"> |
| 3 <link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/iron-f lex-layout-classes.html"> | 4 <link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/iron-f lex-layout-classes.html"> |
| 4 <link rel="import" href="chrome://resources/polymer/v1_0/neon-animation/neon-ani matable-behavior.html"> | 5 <link rel="import" href="chrome://resources/polymer/v1_0/neon-animation/neon-ani matable-behavior.html"> |
| 5 <link rel="import" href="chrome://resources/polymer/v1_0/paper-checkbox/paper-ch eckbox.html"> | 6 <link rel="import" href="chrome://resources/polymer/v1_0/paper-checkbox/paper-ch eckbox.html"> |
| 6 <link rel="import" href="chrome://resources/polymer/v1_0/paper-dropdown-menu/pap er-dropdown-menu.html"> | 7 <link rel="import" href="chrome://resources/polymer/v1_0/paper-dropdown-menu/pap er-dropdown-menu.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-icon-button/paper -icon-button.html"> |
| 8 <link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input .html"> | 9 <link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input .html"> |
| 9 <link rel="import" href="chrome://resources/polymer/v1_0/paper-item/paper-item.h tml"> | 10 <link rel="import" href="chrome://resources/polymer/v1_0/paper-item/paper-item.h tml"> |
|
dpapad
2017/06/15 01:35:36
paper-item, paper-listbox, paper-dropdown-menu imp
scottchen
2017/06/15 23:50:51
Done.
| |
| 10 <link rel="import" href="chrome://resources/polymer/v1_0/paper-listbox/paper-lis tbox.html"> | 11 <link rel="import" href="chrome://resources/polymer/v1_0/paper-listbox/paper-lis tbox.html"> |
| 11 <link rel="import" href="chrome://resources/polymer/v1_0/paper-radio-button/pape r-radio-button.html"> | 12 <link rel="import" href="chrome://resources/polymer/v1_0/paper-radio-button/pape r-radio-button.html"> |
| 12 <link rel="import" href="chrome://resources/polymer/v1_0/paper-radio-group/paper -radio-group.html"> | 13 <link rel="import" href="chrome://resources/polymer/v1_0/paper-radio-group/paper -radio-group.html"> |
| 13 <link rel="import" href="icons.html"> | 14 <link rel="import" href="icons.html"> |
| 14 <link rel="import" href="shared_styles.html"> | 15 <link rel="import" href="shared_styles.html"> |
| 15 | 16 |
| 16 <dom-module id="battery-settings"> | 17 <dom-module id="battery-settings"> |
| 17 <template> | 18 <template> |
| 18 <!-- TODO(michaelpg): Wrap the line below to fit within the 80-char limit. | 19 <!-- TODO(michaelpg): Wrap the line below to fit within the 80-char limit. |
| 19 See https://github.com/Polymer/polymer/pull/3668. --> | 20 See https://github.com/Polymer/polymer/pull/3668. --> |
| 20 <style include="device-emulator-shared-styles iron-flex iron-flex-alignment iron-positioning"> | 21 <style include="device-emulator-shared-styles iron-flex iron-flex-alignment |
| 22 iron-positioning md-select"> | |
| 21 </style> | 23 </style> |
| 22 <div class="layout vertical"> | 24 <div class="layout vertical"> |
| 23 <div class="element-label"> | 25 <div class="element-label"> |
| 24 <paper-icon-button icon="device-emulator:battery-charging-full"> | 26 <paper-icon-button icon="device-emulator:battery-charging-full"> |
| 25 </paper-icon-button> | 27 </paper-icon-button> |
| 26 Power | 28 Power |
| 27 </div> | 29 </div> |
| 28 <label> | 30 <label> |
| 29 <span class="form-label">Battery state</span> | 31 <span class="form-label">Battery state</span> |
| 30 <paper-radio-group selected="{{batteryState}}"> | 32 <paper-radio-group selected="{{batteryState}}"> |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 67 <paper-button on-tap="onSetAsSourceTap" | 69 <paper-button on-tap="onSetAsSourceTap" |
| 68 hidden$="[[!isDualRole(item)]]" | 70 hidden$="[[!isDualRole(item)]]" |
| 69 raised="[[!isSelectedSource(item, selectedPowerSourceId)]]" | 71 raised="[[!isSelectedSource(item, selectedPowerSourceId)]]" |
| 70 disabled="[[!canBecomeSource( | 72 disabled="[[!canBecomeSource( |
| 71 item, selectedPowerSourceId, powerSourceOptions.*)]]"> | 73 item, selectedPowerSourceId, powerSourceOptions.*)]]"> |
| 72 Set as source | 74 Set as source |
| 73 </paper-button> | 75 </paper-button> |
| 74 <div hidden$="[[isDualRole(item)]]">Source</div> | 76 <div hidden$="[[isDualRole(item)]]">Source</div> |
| 75 </td> | 77 </td> |
| 76 <td class="control-cell"> | 78 <td class="control-cell"> |
| 77 <paper-dropdown-menu class="device-class-group" | 79 <div class="md-select-wrapper"> |
| 78 disabled="[[!item.variablePower]]"> | 80 <select class="md-select" disabled$="[[!item.variablePower]]" |
| 79 <paper-listbox selected="{{item.power}}" | 81 on-change="onPowerChanged"> |
| 80 class="dropdown-content" attr-for-selected="data-value"> | 82 <template is="dom-repeat" items="[[powerOptions]]" |
|
dpapad
2017/06/15 01:35:36
Is it necessary to use a dom-repeat for static con
scottchen
2017/06/15 23:50:51
Discussed offline with dpapad, hard-coding this in
| |
| 81 <paper-item data-value="high">High</paper-item> | 83 as="option"> |
| 82 <paper-item data-value="low">Low</paper-item> | 84 <option value="[[option]]" |
| 83 </paper-listbox> | 85 selected="[[isPowerEqual(item.power, option)]]"> |
| 84 </paper-dropdown-menu> | 86 [[option]] |
| 87 </option> | |
| 88 </template> | |
| 89 </select> | |
| 90 <span class="md-select-underline"></span> | |
| 91 </div> | |
| 85 </td> | 92 </td> |
| 86 </template> | 93 </template> |
| 87 </tbody> | 94 </tbody> |
| 88 </table> | 95 </table> |
| 89 </div> | 96 </div> |
| 90 </template> | 97 </template> |
| 91 <script src="battery_settings.js"></script> | 98 <script src="battery_settings.js"></script> |
| 92 </dom-module> | 99 </dom-module> |
| OLD | NEW |