| OLD | NEW |
| 1 <link rel="import" href="chrome://resources/html/i18n_behavior.html"> | 1 <link rel="import" href="chrome://resources/html/i18n_behavior.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-collapse/iron-coll
apse.html"> | 3 <link rel="import" href="chrome://resources/polymer/v1_0/iron-collapse/iron-coll
apse.html"> |
| 4 <link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/classe
s/iron-flex-layout.html"> | 4 <link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/classe
s/iron-flex-layout.html"> |
| 5 <link rel="import" href="chrome://resources/polymer/v1_0/iron-list/iron-list.htm
l"> | 5 <link rel="import" href="chrome://resources/polymer/v1_0/iron-list/iron-list.htm
l"> |
| 6 <link rel="import" href="chrome://resources/polymer/v1_0/neon-animation/neon-ani
matable.html"> | 6 <link rel="import" href="chrome://resources/polymer/v1_0/neon-animation/neon-ani
matable.html"> |
| 7 <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-button/paper-butt
on.html"> |
| 8 <link rel="import" href="chrome://resources/polymer/v1_0/paper-toggle-button/pap
er-toggle-button.html"> | 8 <link rel="import" href="chrome://resources/polymer/v1_0/paper-toggle-button/pap
er-toggle-button.html"> |
| 9 <link rel="import" href="chrome://md-settings/icons.html"> | 9 <link rel="import" href="chrome://md-settings/icons.html"> |
| 10 <link rel="import" href="chrome://md-settings/settings_page/settings_animated_pa
ges.html"> | 10 <link rel="import" href="chrome://md-settings/settings_page/settings_animated_pa
ges.html"> |
| 11 <link rel="import" href="chrome://md-settings/settings_shared_css.html"> | 11 <link rel="import" href="chrome://md-settings/settings_shared_css.html"> |
| 12 <link rel="import" href="bluetooth_device_dialog.html"> |
| 12 <link rel="import" href="bluetooth_device_list_item.html"> | 13 <link rel="import" href="bluetooth_device_list_item.html"> |
| 13 <link rel="import" href="bluetooth_add_device_dialog.html"> | |
| 14 <link rel="import" href="bluetooth_pair_device_dialog.html"> | |
| 15 | 14 |
| 16 <dom-module id="settings-bluetooth-page"> | 15 <dom-module id="settings-bluetooth-page"> |
| 17 <template> | 16 <template> |
| 18 <style include="settings-shared"> | 17 <style include="settings-shared"> |
| 19 iron-icon { | 18 iron-icon { |
| 20 -webkit-margin-end: var(--iron-icon-spacing); | 19 -webkit-margin-end: var(--iron-icon-spacing); |
| 21 } | 20 } |
| 22 | 21 |
| 23 cr-expand-button { | 22 cr-expand-button { |
| 24 -webkit-margin-end: 10px; | 23 -webkit-margin-end: 10px; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 39 padding: 0; | 38 padding: 0; |
| 40 width: 500px; | 39 width: 500px; |
| 41 } | 40 } |
| 42 </style> | 41 </style> |
| 43 <settings-animated-pages id="pages" current-route="{{currentRoute}}" | 42 <settings-animated-pages id="pages" current-route="{{currentRoute}}" |
| 44 section="bluetooth"> | 43 section="bluetooth"> |
| 45 <neon-animatable id="main"> | 44 <neon-animatable id="main"> |
| 46 <div class="settings-box first"> | 45 <div class="settings-box first"> |
| 47 <div class="layout horizontal center flex"> | 46 <div class="layout horizontal center flex"> |
| 48 <iron-icon icon="settings:bluetooth"></iron-icon> | 47 <iron-icon icon="settings:bluetooth"></iron-icon> |
| 49 <span class="flex" i18n-content="bluetoothEnable"></span> | 48 <span class="flex">$i18n{bluetoothEnable}</span> |
| 50 <cr-expand-button id="expandListButton" | 49 <cr-expand-button id="expandListButton" |
| 51 hidden$="[[!bluetoothEnabled]]" | 50 hidden$="[[!bluetoothEnabled]]" |
| 52 expanded="{{deviceListExpanded}}"> | 51 expanded="{{deviceListExpanded}}"> |
| 53 </cr-expand-button> | 52 </cr-expand-button> |
| 54 <paper-toggle-button id="enableBluetooth" | 53 <paper-toggle-button id="enableBluetooth" |
| 55 checked="{{bluetoothEnabled}}" | 54 checked="{{bluetoothEnabled}}" |
| 56 on-change="onBluetoothEnabledChange_"> | 55 on-change="onBluetoothEnabledChange_"> |
| 57 </paper-toggle-button> | 56 </paper-toggle-button> |
| 58 </div> | 57 </div> |
| 59 </div> | 58 </div> |
| 60 <iron-collapse opened="[[canShowDeviceList_(bluetoothEnabled, | 59 <iron-collapse opened="[[canShowDeviceList_(bluetoothEnabled, |
| 61 deviceListExpanded)]]"> | 60 deviceListExpanded)]]"> |
| 62 <div id="deviceList" class="list-frame vertical-list" | 61 <div id="deviceList" class="list-frame vertical-list" |
| 63 on-device-event="onDeviceEvent_"> | 62 on-device-event="onDeviceEvent_"> |
| 64 <template is="dom-repeat" items="[[deviceList]]" | 63 <template is="dom-repeat" items="[[deviceList]]" |
| 65 filter="deviceIsPairedOrConnecting_"> | 64 filter="deviceIsPairedOrConnecting_"> |
| 66 <bluetooth-device-list-item device="[[item]]" class="list-item"> | 65 <bluetooth-device-list-item device="[[item]]" class="list-item"> |
| 67 </bluetooth-device-list-item> | 66 </bluetooth-device-list-item> |
| 68 </template> | 67 </template> |
| 69 <div class="no-devices layout horizontal center" | 68 <div class="no-devices layout horizontal center" |
| 70 hidden$="[[haveDevices_(deviceList.splices)]]" | 69 hidden$="[[haveDevices_(deviceList.splices)]]"> |
| 71 i18n-content="bluetoothNoDevices"> | 70 $i18n{bluetoothNoDevices} |
| 72 </div> | 71 </div> |
| 73 </div> | 72 </div> |
| 74 <div class="settings-box" hidden$="[[!bluetoothEnabled]]"> | 73 <div class="settings-box" hidden$="[[!bluetoothEnabled]]"> |
| 75 <paper-button i18n-content="bluetoothAddDevice" | 74 <paper-button class="primary-button" on-tap="onAddDeviceTap_"> |
| 76 class="primary-button" on-tap="onAddDeviceTap_"> | 75 $i18n{bluetoothAddDevice} |
| 77 </paper-button> | 76 </paper-button> |
| 78 </div> | 77 </div> |
| 79 </iron-collapse> | 78 </iron-collapse> |
| 80 </neon-animatable> | 79 </neon-animatable> |
| 81 </settings-animated-pages> | 80 </settings-animated-pages> |
| 82 | 81 |
| 83 <paper-dialog modal id="deviceDialog" class="layout vertical" | 82 <bluetooth-device-dialog id="deviceDialog" |
| 83 adapter-state="[[adapterState]]" |
| 84 device-list="[[deviceList]]" |
| 85 dialog-type="[[dialog]]" |
| 86 on-close-dialog="onCloseDialog_" |
| 87 on-device-event="onDeviceEvent_" |
| 88 on-iron-overlay-closed="onDialogClosed_" |
| 84 on-iron-overlay-opened="onDialogOpened_" | 89 on-iron-overlay-opened="onDialogOpened_" |
| 85 on-iron-overlay-closed="onDialogClosed_"> | 90 on-response="onResponse_" |
| 86 <template is="dom-if" if="[[dialogIsVisible_(dialog, 'addDevice')]]" | 91 pairing-device="[[pairingDevice]]" |
| 87 restamp> | 92 pairing-event="[[pairingEvent]]"> |
| 88 <settings-bluetooth-add-device-dialog | 93 </bluetooth-device-dialog> |
| 89 class="layout vertical flex" | |
| 90 adapter-state="[[adapterState]]" | |
| 91 device-list="[[deviceList]]" | |
| 92 on-device-event="onDeviceEvent_" | |
| 93 on-close-dialog="onCloseDialog_"> | |
| 94 </settings-bluetooth-add-device-dialog> | |
| 95 </template> | |
| 96 <template is="dom-if" if="[[dialogIsVisible_(dialog, 'pairDevice')]]" | |
| 97 restamp> | |
| 98 <settings-bluetooth-pair-device-dialog | |
| 99 class="layout vertical flex" | |
| 100 pairing-device="[[pairingDevice]]" | |
| 101 pairing-event="[[pairingEvent]]" | |
| 102 on-response="onResponse_" | |
| 103 on-close-dialog="onCloseDialog_"> | |
| 104 </settings-bluetooth-pair-device-dialog> | |
| 105 </template> | |
| 106 </paper-dialog> | |
| 107 | 94 |
| 108 </template> | 95 </template> |
| 109 <script src="bluetooth_page.js"></script> | 96 <script src="bluetooth_page.js"></script> |
| 110 </dom-module> | 97 </dom-module> |
| OLD | NEW |