| 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): Wrap the line below to fit within the 80-char limit. |
| 14 id="editModal"> | 17 See https://github.com/Polymer/polymer/pull/3668. --> |
| 18 <style include="device-emulator-shared-styles iron-flex iron-flex-alignment
iron-positioning"> |
| 19 </style> |
| 20 <paper-dialog with-backdrop id="editDialog"> |
| 15 <div class="element-label">[[currentEditableObject.deviceName]]</div> | 21 <div class="element-label">[[currentEditableObject.deviceName]]</div> |
| 16 <div> | 22 <div> |
| 17 <form> | 23 <form> |
| 18 <div class="form-field-section"> | 24 <div class="form-field-section"> |
| 19 <paper-input value="{{currentEditableObject.deviceName}}" | 25 <paper-input value="{{currentEditableObject.deviceName}}" |
| 20 label="Device Name"></paper-input> | 26 label="Device Name"></paper-input> |
| 21 <paper-input value="{{currentEditableObject.name}}" | 27 <paper-input value="{{currentEditableObject.name}}" |
| 22 label="Tray Name"></paper-input> | 28 label="Tray Name"></paper-input> |
| 23 <paper-input value="{{currentEditableObject.id}}" | 29 <paper-input value="{{currentEditableObject.id}}" |
| 24 label="ID" disabled></paper-input> | 30 label="ID" disabled></paper-input> |
| 25 </div> | 31 </div> |
| 26 <div class="form-field-section"> | 32 <div class="form-field-section"> |
| 27 <span class="toggle-button-label">Is Input</span> | 33 <span class="toggle-button-label">Is Input</span> |
| 28 <paper-checkbox | 34 <paper-checkbox |
| 29 checked="{{currentEditableObject.isInput}}"></paper-checkbox> | 35 checked="{{currentEditableObject.isInput}}"></paper-checkbox> |
| 30 </div> | 36 </div> |
| 31 <div class="form-field-section"> | 37 <div class="form-field-section"> |
| 32 <span class="toggle-button-label">Active</span> | 38 <span class="toggle-button-label">Active</span> |
| 33 <paper-checkbox | 39 <paper-checkbox |
| 34 checked="{{currentEditableObject.active}}"></paper-checkbox> | 40 checked="{{currentEditableObject.active}}"></paper-checkbox> |
| 35 </div> | 41 </div> |
| 36 <div class="form-field-section"> | 42 <div class="form-field-section"> |
| 37 <div class="form-label">Audio Type</div> | 43 <div class="form-label">Audio Type</div> |
| 38 <paper-radio-group class="device-class-group" | 44 <paper-radio-group class="device-class-group" |
| 39 selected="{{currentEditableObject.type}}"> | 45 selected="{{currentEditableObject.type}}"> |
| 40 <template is="dom-repeat" | 46 <template is="dom-repeat" |
| 41 items="[[nodeTypeOptions]]" as="option"> | 47 items="[[nodeTypeOptions]]" as="option"> |
| 42 <paper-radio-button name="[[option.type]]" | 48 <paper-radio-button name="[[option.type]]"> |
| 43 >[[option.name]]</paper-radio-button> | 49 [[option.name]] |
| 50 </paper-radio-button> |
| 44 </template> | 51 </template> |
| 45 </paper-radio-group> | 52 </paper-radio-group> |
| 46 </div> | 53 </div> |
| 47 </form> | 54 </form> |
| 48 </div> | 55 </div> |
| 49 <div class="buttons"> | 56 <div class="buttons"> |
| 50 <paper-button on-click="insertEditedAudioNode" | 57 <paper-button on-click="insertEditedAudioNode" |
| 51 dialog-dismiss>Done</paper-button> | 58 dialog-dismiss>Done</paper-button> |
| 52 </div> | 59 </div> |
| 53 </paper-dialog> | 60 </paper-dialog> |
| 54 | 61 |
| 55 <div class="layout vertical"> | 62 <div class="layout vertical"> |
| 56 <div class="element-label"> | 63 <div class="element-label"> |
| 57 <paper-icon-button icon="av:volume-up"></paper-icon-button> | 64 <paper-icon-button icon="device-emulator:volume-up"></paper-icon-button> |
| 58 <span>[[title]]</span> | 65 Audio |
| 59 </div> | 66 </div> |
| 60 <table class="devices-table"> | 67 <table class="devices-table"> |
| 61 <tbody> | 68 <tbody> |
| 62 <tr class="table-section-header"> | 69 <tr class="table-section-header"> |
| 63 <td colspan="2">Devices</td> | 70 <td colspan="2">Devices</td> |
| 64 <td class="centered-cell-label">Is Input</td> | 71 <td class="centered-cell-label">Is Input</td> |
| 65 <td class="centered-cell-label">Active</td> | 72 <td class="centered-cell-label">Active</td> |
| 66 </tr> | 73 </tr> |
| 67 <template is="dom-repeat" items="[[nodes]]"> | 74 <template is="dom-repeat" items="[[nodes]]"> |
| 68 <tr> | 75 <tr> |
| 69 <td class="alias-cell">[[item.deviceName]]</td> | 76 <td class="alias-cell">[[item.deviceName]]</td> |
| 70 <td class="icon-cell"> | 77 <td class="icon-cell"> |
| 71 <paper-icon-button icon="content-copy" data-predefined="false" | 78 <paper-icon-button icon="device-emulator:content-copy" |
| 72 on-click="copyDevice"></paper-icon-button> | 79 data-predefined="false" on-click="copyDevice"> |
| 73 <paper-icon-button icon="settings" on-click="showEditModal" | 80 </paper-icon-button> |
| 74 ></paper-icon-button> | 81 <paper-icon-button icon="device-emulator:settings" |
| 75 <paper-icon-button icon="delete" on-click="removeAudioNode" | 82 on-click="showEditDialog"> |
| 76 ></paper-icon-button> | 83 </paper-icon-button> |
| 84 <paper-icon-button icon="device-emulator:delete" |
| 85 on-click="removeAudioNode"> |
| 86 </paper-icon-button> |
| 77 </td> | 87 </td> |
| 78 <td class="control-cell"> | 88 <td class="control-cell"> |
| 79 <paper-checkbox checked="{{item.isInput}}" | 89 <paper-checkbox checked="{{item.isInput}}" |
| 80 on-change="insertAudioNode"></paper-checkbox> | 90 on-change="insertAudioNode"></paper-checkbox> |
| 81 </td> | 91 </td> |
| 82 <td class="control-cell"> | 92 <td class="control-cell"> |
| 83 <paper-checkbox checked="{{item.active}}" | 93 <paper-checkbox checked="{{item.active}}" |
| 84 on-change="insertAudioNode"></paper-checkbox> | 94 on-change="insertAudioNode"></paper-checkbox> |
| 85 </td> | 95 </td> |
| 86 </tr> | 96 </tr> |
| 87 </template> | 97 </template> |
| 88 </tbody> | 98 </tbody> |
| 89 </table> | 99 </table> |
| 90 <div class="add-device-container"> | 100 <div class="add-device-container"> |
| 91 <paper-button on-click="appendNewNode"> | 101 <paper-button on-click="appendNewNode"> |
| 92 Add Node | 102 Add Node |
| 93 </paper-button> | 103 </paper-button> |
| 94 </div> | 104 </div> |
| 95 </div> | 105 </div> |
| 96 </template> | 106 </template> |
| 97 <script src="audio_settings.js"></script> | 107 <script src="audio_settings.js"></script> |
| 98 </dom-module> | 108 </dom-module> |
| OLD | NEW |