| OLD | NEW |
| 1 <link rel="import" href="chrome://resources/cr_elements/cr_scrollable_behavior.h
tml"> | |
| 2 <link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_pref_in
dicator.html"> | 1 <link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_pref_in
dicator.html"> |
| 3 <link rel="import" href="chrome://resources/html/i18n_behavior.html"> | 2 <link rel="import" href="chrome://resources/html/i18n_behavior.html"> |
| 4 <link rel="import" href="chrome://resources/html/polymer.html"> | 3 <link rel="import" href="chrome://resources/html/polymer.html"> |
| 5 <link rel="import" href="chrome://resources/polymer/v1_0/iron-collapse/iron-coll
apse.html"> | |
| 6 <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"> |
| 7 <link rel="import" href="chrome://resources/polymer/v1_0/iron-list/iron-list.htm
l"> | |
| 8 <link rel="import" href="chrome://resources/polymer/v1_0/neon-animation/neon-ani
matable.html"> | 5 <link rel="import" href="chrome://resources/polymer/v1_0/neon-animation/neon-ani
matable.html"> |
| 9 <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-icon-button/paper
-icon-button-light.html"> |
| 10 <link rel="import" href="chrome://resources/polymer/v1_0/paper-toggle-button/pap
er-toggle-button.html"> | |
| 11 <link rel="import" href="/icons.html"> | 7 <link rel="import" href="/icons.html"> |
| 8 <link rel="import" href="/prefs/prefs.html"> |
| 12 <link rel="import" href="/settings_page/settings_animated_pages.html"> | 9 <link rel="import" href="/settings_page/settings_animated_pages.html"> |
| 10 <link rel="import" href="/settings_page/settings_subpage.html"> |
| 13 <link rel="import" href="/settings_shared_css.html"> | 11 <link rel="import" href="/settings_shared_css.html"> |
| 14 <link rel="import" href="bluetooth_device_dialog.html"> | 12 <link rel="import" href="bluetooth_subpage.html"> |
| 15 <link rel="import" href="bluetooth_device_list_item.html"> | |
| 16 | 13 |
| 17 <dom-module id="settings-bluetooth-page"> | 14 <dom-module id="settings-bluetooth-page"> |
| 18 <template> | 15 <template> |
| 19 <style include="settings-shared"> | 16 <style include="settings-shared"> |
| 20 cr-expand-button { | |
| 21 -webkit-margin-end: 10px; | |
| 22 } | |
| 23 | |
| 24 #deviceList { | |
| 25 max-height: 300px; | |
| 26 overflow-y: auto; | |
| 27 } | |
| 28 | |
| 29 .no-devices { | |
| 30 min-height: var(--settings-row-min-height); | |
| 31 } | |
| 32 | |
| 33 settings-bluetooth-add-device-dialog, | |
| 34 settings-bluetooth-pair-device-dialog { | |
| 35 height: 400px; | |
| 36 padding: 0; | |
| 37 width: 500px; | |
| 38 } | |
| 39 </style> | 17 </style> |
| 40 <settings-animated-pages id="pages" section="bluetooth"> | 18 <settings-animated-pages id="pages" section="bluetooth"> |
| 41 <neon-animatable route-path="default"> | 19 <neon-animatable route-path="default"> |
| 42 <div class="settings-box first" actionable | 20 <div class="settings-box first" actionable on-tap="onTap_"> |
| 43 on-tap="toggleDeviceListExpanded_"> | 21 <iron-icon icon="[[getIcon_(bluetoothEnabled_)]]"></iron-icon> |
| 44 <iron-icon icon="[[getIcon_(bluetoothEnabled_, deviceConnected_)]]"> | |
| 45 </iron-icon> | |
| 46 <span class="middle">[[getTitle_(bluetoothEnabled_)]]</span> | 22 <span class="middle">[[getTitle_(bluetoothEnabled_)]]</span> |
| 47 <cr-policy-pref-indicator | 23 <cr-policy-pref-indicator |
| 48 pref="[[prefs.cros.device.allow_bluetooth]]" | 24 pref="[[prefs.cros.device.allow_bluetooth]]" |
| 49 hidden="[[prefs.cros.device.allow_bluetooth.value]]"> | 25 hidden="[[prefs.cros.device.allow_bluetooth.value]]"> |
| 50 </cr-policy-pref-indicator> | 26 </cr-policy-pref-indicator> |
| 51 <cr-expand-button id="expandListButton" | 27 <button class="subpage-arrow" is="paper-icon-button-light" |
| 52 alt="$i18n{bluetoothExpandA11yLabel}" | 28 on-tap="onSubpageArrowTap_"> |
| 53 hidden$="[[!bluetoothEnabled_]]" | 29 </button> |
| 54 expanded="{{deviceListExpanded_}}"> | |
| 55 </cr-expand-button> | |
| 56 <div class="secondary-action"> | |
| 57 <paper-toggle-button id="enableBluetooth" | |
| 58 checked="{{bluetoothEnabled_}}" | |
| 59 disabled="[[!adapterState_.available]]" | |
| 60 on-change="onBluetoothEnabledChange_" on-tap="stopTap_"> | |
| 61 </paper-toggle-button> | |
| 62 </div> | |
| 63 </div> | 30 </div> |
| 64 <iron-collapse opened="[[canShowDeviceList_(bluetoothEnabled_, | |
| 65 deviceListExpanded_)]]"> | |
| 66 <div id="deviceList" class="list-frame vertical-list" | |
| 67 on-device-event="onDeviceEvent_"> | |
| 68 <div id="container" class="layout vertical" scrollable> | |
| 69 <iron-list items="[[getPairedOrConnecting_(deviceList_.*)]]" | |
| 70 selection-enabled selected-item="{{selectedItem_}}" | |
| 71 scroll-target="container"> | |
| 72 <template> | |
| 73 <bluetooth-device-list-item device="[[item]]" | |
| 74 tabindex$="[[tabIndex]]"> | |
| 75 </bluetooth-device-list-item> | |
| 76 </template> | |
| 77 </iron-list> | |
| 78 </div> | |
| 79 <div class="no-devices layout horizontal center" | |
| 80 hidden$="[[haveDevices_(deviceList_.*)]]"> | |
| 81 $i18n{bluetoothNoDevices} | |
| 82 </div> | |
| 83 </div> | |
| 84 <div class="settings-box" hidden$="[[!bluetoothEnabled_]]"> | |
| 85 <paper-button class="primary-button" on-tap="onAddDeviceTap_"> | |
| 86 $i18n{bluetoothPairDevice} | |
| 87 </paper-button> | |
| 88 </div> | |
| 89 </iron-collapse> | |
| 90 </neon-animatable> | 31 </neon-animatable> |
| 32 |
| 33 <template is="dom-if" route-path="/bluetoothDevices"> |
| 34 <settings-subpage associated-control="[[$$('#bluetoothDevices')]]" |
| 35 page-title="$i18n{bluetoothPageTitle}" |
| 36 show-spinner="[[showSpinner_]]"> |
| 37 <settings-bluetooth-subpage |
| 38 adapter-state="[[adapterState_]]" |
| 39 bluetooth-enabled="{{bluetoothEnabled_}}" |
| 40 bluetooth="[[bluetooth]]" |
| 41 bluetooth-private="[[bluetoothPrivate]]" |
| 42 show-spinner="{{showSpinner_}}"> |
| 43 </settings-bluetooth-subpage> |
| 44 </settings-subpage> |
| 45 </template> |
| 46 |
| 91 </settings-animated-pages> | 47 </settings-animated-pages> |
| 92 | |
| 93 <template is="dom-if" if="[[deviceListExpanded_]]"> | |
| 94 <bluetooth-device-dialog id="deviceDialog" | |
| 95 adapter-state="[[adapterState_]]" | |
| 96 device-list="[[deviceList_]]" | |
| 97 dialog-id="[[dialogId_]]" | |
| 98 on-close="onDialogClosed_" | |
| 99 error-message="[[errorMessage_]]" | |
| 100 on-device-event="onDeviceEvent_" | |
| 101 on-response="onResponse_" | |
| 102 pairing-device="[[pairingDevice_]]" | |
| 103 pairing-event="[[pairingEvent_]]"> | |
| 104 </bluetooth-device-dialog> | |
| 105 </template> | |
| 106 | |
| 107 </template> | 48 </template> |
| 108 <script src="bluetooth_page.js"></script> | 49 <script src="bluetooth_page.js"></script> |
| 109 </dom-module> | 50 </dom-module> |
| OLD | NEW |