Chromium Code Reviews| Index: chrome/browser/resources/settings/bluetooth_page/bluetooth_device_dialog.html |
| diff --git a/chrome/browser/resources/settings/bluetooth_page/bluetooth_device_dialog.html b/chrome/browser/resources/settings/bluetooth_page/bluetooth_device_dialog.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..38a1a22c00b9ea584cf02d947a5705d012f6945d |
| --- /dev/null |
| +++ b/chrome/browser/resources/settings/bluetooth_page/bluetooth_device_dialog.html |
| @@ -0,0 +1,111 @@ |
| +<link rel="import" href="chrome://md-settings/bluetooth_page/bluetooth_device_list_item.html"> |
| +<link rel="import" href="chrome://md-settings/settings_dialog.html"> |
| +<link rel="import" href="chrome://resources/polymer/paper-button/paper-button.html"> |
| +<link rel="import" href="chrome://resources/polymer/paper-input/paper-input.html"> |
| +<link rel="import" href="chrome://md-settings/bluetooth_page/bluetooth_dialog_shared_css.html"> |
| + |
| +<dom-module id="bluetooth-device-dialog"> |
| + <template> |
| + <style include="settings-shared bluetooth-dialog-shared"></style> |
| + <settings-dialog id="dialog" class="layout vertical"> |
| + <!-- TODO(dbeam): use .title instead. --> |
| + <div class="body"> |
| + <template is="dom-if" if="[[isDialog_(dialog, 'addDevice')]]"> |
| + |
| + <div id="dialogHeaderDiv" class="settings-box layout horizontal"> |
| + <span id="dialogTitle" class="flex"> |
| + $i18n{bluetoothAddDevicePageTitle} |
| + </span> |
| + <paper-icon-button icon="close" on-tap="onAddCancelTap_" |
| + id="closeAdd"> |
| + </paper-icon-button> |
| + </div> |
|
stevenjb
2016/05/09 16:58:10
This bit really seems like it ought to be shared b
Dan Beam
2016/05/10 23:55:22
it will be (<settings-dialog> has its own)
stevenjb
2016/05/11 16:30:07
Acknowledged.
|
| + <div class="settings-box flex"> |
| + <div id="dialogDeviceList" class="settings-box layout vertical" |
| + on-device-event="onDeviceEvent_"> |
| + <span class="no-devices" hidden$="[[haveDevices_(deviceList)]]"> |
| + $i18n{bluetoothNoDevices} |
| + </span> |
| + <iron-selector class="flex"> |
| + <template is="dom-repeat" items="[[deviceList]]" |
| + filter="deviceNotPaired_" observe="paired"> |
| + <bluetooth-device-list-item device="[[item]]"> |
| + </bluetooth-device-list-item> |
| + </template> |
| + </iron-selector> |
| + </div> |
| + </div> |
| + |
| + </template> |
| + <template is="dom-if" if="[[isDialog_(dialog, 'pairDevice')]]"> |
| + |
| + <div id="dialogHeaderDiv" class="settings-box layout horizontal center"> |
| + <span id="dialogTitle" class="flex"> |
| + $i18n{bluetoothPairDevicePageTitle} |
| + </span> |
| + <paper-icon-button icon="close" on-tap="onPairCancelTap_" |
| + id="closePair"> |
| + </paper-icon-button> |
| + </div> |
| + <div id="pairing" |
| + class="settings-blox layout vertical center center-justified flex"> |
|
stevenjb
2016/05/09 16:58:10
Are we enforcing 80 cols in the html?
Dan Beam
2016/05/10 23:55:22
Done.
|
| + <div id="dialogMessage"> |
| + [[getMessage_(pairingDevice, pairingEvent)]] |
| + </div> |
| + <div hidden$="[[!showEnterPincode_(pairingEvent)]]"> |
| + <paper-input id="pincode" minlength="1" maxlength="16" type="text"> |
| + </div> |
| + <div hidden$="[[!showEnterPasskey_(pairingEvent)]]"> |
| + <paper-input id="passkey" minlength="6" maxlength="6" type="text"> |
| + </div> |
| + <div id="pinDiv" class="layout horizontal center center-justified" |
| + hidden="[[!showDisplayPassOrPin_(pairingEvent)]]"> |
| + <template is="dom-repeat" items="[[digits]]"> |
| + <span class$="[[getPinClass_(pairingEvent, index)]]"> |
| + [[getPinDigit_(pairingEvent, index)]] |
| + </span> |
| + </template> |
| + <span class$="[[getPinClass_(pairingEvent, -1)]]" |
| + hidden="[[showAcceptReject_(pairingEvent)]]"> |
| + $i18n{bluetoothEnterKey} |
| + </span> |
| + </div> |
| + </div> |
| + |
| + </template> |
| + </div> |
| + <div class="button-container"> |
| + <template is="dom-if" if="[[isDialog_(dialog, 'addDevice')]]"> |
| + |
| + <div id="scanning" class="layout horizontal center flex" |
| + hidden$="[[!adapterState.discovering]]"> |
| + <paper-spinner active="[[adapterState.discovering]]"> |
| + </paper-spinner> |
| + <span>$i18n{bluetoothScanning}</span> |
| + </div> |
| + <paper-button id="cancel" class="end-justified" on-tap="onAddCancelTap_"> |
| + $i18n{cancel} |
| + </paper-button> |
| + |
| + </template> |
| + <template is="dom-if" if="[[isDialog_(dialog, 'pairDevice')]]"> |
| + |
| + <paper-button hidden$="[[!showAcceptReject_(pairingEvent)]]" |
| + on-tap="onAcceptTap_">$i18n{bluetoothAccept}</paper-button> |
| + <paper-button hidden$="[[!showAcceptReject_(pairingEvent)]]" |
| + on-tap="onRejectTap_">$i18n{bluetoothReject}</paper-button> |
| + <paper-button hidden$="[[!showConnect_(pairingEvent)]]" |
| + on-tap="onConnectTap_">$i18n{bluetoothConnect}</paper-button> |
| + <paper-button hidden$="[[!showDismiss_(pairingDevice, pairingEvent)]]" |
| + on-tap="onDismissTap_">$i18n{bluetoothDismiss}</paper-button> |
| + <paper-button on-tap="onPairCancelTap_" |
| + hidden$="[[showDismiss_(pairingDevice, pairingEvent)]]"> |
| + $i18n{cancel} |
| + </paper-button> |
| + |
| + </template> |
| + </div> |
| + </settings-dialog> |
| + </template> |
| + <script src="chrome://md-settings/bluetooth_page/bluetooth_device_dialog.js"></script> |
| +</dom-module> |