Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <link rel="import" href="chrome://resources/polymer/v1_0/polymer/polymer.html"> | 1 <link rel="import" href="chrome://resources/html/polymer.html"> |
| 2 <link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/iron-f lex-layout.html"> | 2 <link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/iron-f lex-layout-classes.html"> |
| 3 <link rel="import" href="chrome://resources/polymer/v1_0/iron-icons/av-icons.htm l"> | 3 <link rel="import" href="chrome://resources/polymer/v1_0/neon-animation/neon-ani matable-behavior.html"> |
| 4 <link rel="import" href="chrome://resources/polymer/v1_0/iron-icons/iron-icons.h tml"> | |
| 5 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt on.html"> | 4 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt on.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-dialog/paper-dial og.html"> | 6 <link rel="import" href="chrome://resources/polymer/v1_0/paper-dialog/paper-dial og.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 .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-radio-button/pape r-radio-button.html"> | |
| 10 <link rel="import" href="chrome://resources/polymer/v1_0/paper-radio-group/paper -radio-group.html"> | |
| 11 <link rel="import" href="icons.html"> | |
| 12 <link rel="import" href="shared_styles.html"> | |
| 9 | 13 |
| 10 <dom-module id="audio-settings"> | 14 <dom-module id="audio-settings"> |
| 11 <link rel="import" type="css" href="shared_styles.css"> | |
| 12 <template> | 15 <template> |
| 13 <paper-dialog on-iron-overlay-opened="editDialogOpened" modal | 16 <!-- TODO(michaelpg): https://github.com/Polymer/polymer/pull/3668 --> |
|
stevenjb
2016/05/20 15:56:46
nit: todo what exactly (without having to follow t
michaelpg
2016/05/20 21:28:29
Done.
| |
| 14 id="editModal"> | 17 <style include="device-emulator-shared-styles iron-flex iron-flex-alignment iron-positioning"> |
| 18 </style> | |
| 19 <paper-dialog with-backdrop id="editDialog"> | |
| 15 <div class="element-label">[[currentEditableObject.deviceName]]</div> | 20 <div class="element-label">[[currentEditableObject.deviceName]]</div> |
| 16 <div> | 21 <div> |
| 17 <form> | 22 <form> |
| 18 <div class="form-field-section"> | 23 <div class="form-field-section"> |
| 19 <paper-input value="{{currentEditableObject.deviceName}}" | 24 <paper-input value="{{currentEditableObject.deviceName}}" |
| 20 label="Device Name"></paper-input> | 25 label="Device Name"></paper-input> |
| 21 <paper-input value="{{currentEditableObject.name}}" | 26 <paper-input value="{{currentEditableObject.name}}" |
| 22 label="Tray Name"></paper-input> | 27 label="Tray Name"></paper-input> |
| 23 <paper-input value="{{currentEditableObject.id}}" | 28 <paper-input value="{{currentEditableObject.id}}" |
| 24 label="ID" disabled></paper-input> | 29 label="ID" disabled></paper-input> |
| 25 </div> | 30 </div> |
| 26 <div class="form-field-section"> | 31 <div class="form-field-section"> |
| 27 <span class="toggle-button-label">Is Input</span> | 32 <span class="toggle-button-label">Is Input</span> |
| 28 <paper-checkbox | 33 <paper-checkbox |
| 29 checked="{{currentEditableObject.isInput}}"></paper-checkbox> | 34 checked="{{currentEditableObject.isInput}}"></paper-checkbox> |
| 30 </div> | 35 </div> |
| 31 <div class="form-field-section"> | 36 <div class="form-field-section"> |
| 32 <span class="toggle-button-label">Active</span> | 37 <span class="toggle-button-label">Active</span> |
| 33 <paper-checkbox | 38 <paper-checkbox |
| 34 checked="{{currentEditableObject.active}}"></paper-checkbox> | 39 checked="{{currentEditableObject.active}}"></paper-checkbox> |
| 35 </div> | 40 </div> |
| 36 <div class="form-field-section"> | 41 <div class="form-field-section"> |
| 37 <div class="form-label">Audio Type</div> | 42 <div class="form-label">Audio Type</div> |
| 38 <paper-radio-group class="device-class-group" | 43 <paper-radio-group class="device-class-group" |
| 39 selected="{{currentEditableObject.type}}"> | 44 selected="{{currentEditableObject.type}}"> |
| 40 <template is="dom-repeat" | 45 <template is="dom-repeat" |
| 41 items="[[nodeTypeOptions]]" as="option"> | 46 items="[[nodeTypeOptions]]" as="option"> |
| 42 <paper-radio-button name="[[option.type]]" | 47 <paper-radio-button name="[[option.type]]"> |
| 43 >[[option.name]]</paper-radio-button> | 48 [[option.name]] |
| 49 </paper-radio-button> | |
| 44 </template> | 50 </template> |
| 45 </paper-radio-group> | 51 </paper-radio-group> |
| 46 </div> | 52 </div> |
| 47 </form> | 53 </form> |
| 48 </div> | 54 </div> |
| 49 <div class="buttons"> | 55 <div class="buttons"> |
| 50 <paper-button on-click="insertEditedAudioNode" | 56 <paper-button on-click="insertEditedAudioNode" |
| 51 dialog-dismiss>Done</paper-button> | 57 dialog-dismiss>Done</paper-button> |
| 52 </div> | 58 </div> |
| 53 </paper-dialog> | 59 </paper-dialog> |
| 54 | 60 |
| 55 <div class="layout vertical"> | 61 <div class="layout vertical"> |
| 56 <div class="element-label"> | 62 <div class="element-label"> |
| 57 <paper-icon-button icon="av:volume-up"></paper-icon-button> | 63 <paper-icon-button icon="device-emulator:volume-up"></paper-icon-button> |
| 58 <span>[[title]]</span> | 64 Audio |
| 59 </div> | 65 </div> |
| 60 <table class="devices-table"> | 66 <table class="devices-table"> |
| 61 <tbody> | 67 <tbody> |
| 62 <tr class="table-section-header"> | 68 <tr class="table-section-header"> |
| 63 <td colspan="2">Devices</td> | 69 <td colspan="2">Devices</td> |
| 64 <td class="centered-cell-label">Is Input</td> | 70 <td class="centered-cell-label">Is Input</td> |
| 65 <td class="centered-cell-label">Active</td> | 71 <td class="centered-cell-label">Active</td> |
| 66 </tr> | 72 </tr> |
| 67 <template is="dom-repeat" items="[[nodes]]"> | 73 <template is="dom-repeat" items="[[nodes]]"> |
| 68 <tr> | 74 <tr> |
| 69 <td class="alias-cell">[[item.deviceName]]</td> | 75 <td class="alias-cell">[[item.deviceName]]</td> |
| 70 <td class="icon-cell"> | 76 <td class="icon-cell"> |
| 71 <paper-icon-button icon="content-copy" data-predefined="false" | 77 <paper-icon-button icon="device-emulator:content-copy" |
| 72 on-click="copyDevice"></paper-icon-button> | 78 data-predefined="false" on-click="copyDevice"> |
| 73 <paper-icon-button icon="settings" on-click="showEditModal" | 79 </paper-icon-button> |
| 74 ></paper-icon-button> | 80 <paper-icon-button icon="device-emulator:settings" |
| 75 <paper-icon-button icon="delete" on-click="removeAudioNode" | 81 on-click="showEditDialog"> |
| 76 ></paper-icon-button> | 82 </paper-icon-button> |
| 83 <paper-icon-button icon="device-emulator:delete" | |
| 84 on-click="removeAudioNode"> | |
| 85 </paper-icon-button> | |
| 77 </td> | 86 </td> |
| 78 <td class="control-cell"> | 87 <td class="control-cell"> |
| 79 <paper-checkbox checked="{{item.isInput}}" | 88 <paper-checkbox checked="{{item.isInput}}" |
| 80 on-change="insertAudioNode"></paper-checkbox> | 89 on-change="insertAudioNode"></paper-checkbox> |
| 81 </td> | 90 </td> |
| 82 <td class="control-cell"> | 91 <td class="control-cell"> |
| 83 <paper-checkbox checked="{{item.active}}" | 92 <paper-checkbox checked="{{item.active}}" |
| 84 on-change="insertAudioNode"></paper-checkbox> | 93 on-change="insertAudioNode"></paper-checkbox> |
| 85 </td> | 94 </td> |
| 86 </tr> | 95 </tr> |
| 87 </template> | 96 </template> |
| 88 </tbody> | 97 </tbody> |
| 89 </table> | 98 </table> |
| 90 <div class="add-device-container"> | 99 <div class="add-device-container"> |
| 91 <paper-button on-click="appendNewNode"> | 100 <paper-button on-click="appendNewNode"> |
| 92 Add Node | 101 Add Node |
| 93 </paper-button> | 102 </paper-button> |
| 94 </div> | 103 </div> |
| 95 </div> | 104 </div> |
| 96 </template> | 105 </template> |
| 97 <script src="audio_settings.js"></script> | 106 <script src="audio_settings.js"></script> |
| 98 </dom-module> | 107 </dom-module> |
| OLD | NEW |