| OLD | NEW |
| 1 <link rel="import" href="chrome://resources/cr_elements/cr_dialog/cr_dialog.html
"> | 1 <link rel="import" href="chrome://resources/cr_elements/cr_dialog/cr_dialog.html
"> |
| 2 <link rel="import" href="chrome://resources/cr_elements/cr_scrollable_behavior.h
tml"> | 2 <link rel="import" href="chrome://resources/cr_elements/cr_scrollable_behavior.h
tml"> |
| 3 <link rel="import" href="chrome://resources/html/cr.html"> | 3 <link rel="import" href="chrome://resources/html/cr.html"> |
| 4 <link rel="import" href="chrome://resources/html/polymer.html"> | 4 <link rel="import" href="chrome://resources/html/polymer.html"> |
| 5 <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-flex-layout/classe
s/iron-flex-layout.html"> |
| 6 <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/iron-list/iron-list.htm
l"> |
| 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-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-spinner/paper-spi
nner.html"> | 9 <link rel="import" href="chrome://resources/polymer/v1_0/paper-spinner/paper-spi
nner.html"> |
| 10 <link rel="import" href="/bluetooth_page/bluetooth_device_list_item.html"> | 10 <link rel="import" href="/bluetooth_page/bluetooth_device_list_item.html"> |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 } | 67 } |
| 68 | 68 |
| 69 /* .confirm indicates a confirmation passkey. */ | 69 /* .confirm indicates a confirmation passkey. */ |
| 70 span.confirm { | 70 span.confirm { |
| 71 color: #999; | 71 color: #999; |
| 72 font-size: 153.85%; /* 20px / 13px */ | 72 font-size: 153.85%; /* 20px / 13px */ |
| 73 font-weight: 600; /* semibold */ | 73 font-weight: 600; /* semibold */ |
| 74 margin: 0 20px; | 74 margin: 0 20px; |
| 75 } | 75 } |
| 76 </style> | 76 </style> |
| 77 <dialog is="cr-dialog" id="dialog" on-cancel="onDialogCanceled_"> | 77 <dialog is="cr-dialog" id="dialog" on-cancel="onDialogCanceled_" |
| 78 on-closed="onDialogCanceled_"> |
| 78 <div class="title">$i18n{bluetoothPairDevicePageTitle}</div> | 79 <div class="title">$i18n{bluetoothPairDevicePageTitle}</div> |
| 79 <div class="body"> | 80 <div class="body"> |
| 80 <div class="contents layout vertical center center-justified"> | 81 <div class="contents layout vertical center center-justified"> |
| 81 <!-- Note: dialog + dom-if + iron-list makes sizing complicated so use | 82 <!-- Note: dialog + dom-if + iron-list makes sizing complicated so use |
| 82 hidden here; this is almost always the first dialog shown. --> | 83 hidden here; this is almost always the first dialog shown. --> |
| 83 <div id="dialogDeviceList" | 84 <div id="dialogDeviceList" |
| 84 hidden$="[[!isDialogType_(dialogId, 'addDevice')]]" | 85 hidden$="[[!isDialogType_(dialogId, 'addDevice')]]" |
| 85 class="layout vertical flex start self-stretch"> | 86 class="layout vertical flex start self-stretch"> |
| 86 <span class="no-devices" hidden$="[[haveUnpaired_(deviceList.*)]]"> | 87 <span class="no-devices" hidden$="[[haveUnpaired_(deviceList.*)]]"> |
| 87 $i18n{bluetoothNoDevices} | 88 $i18n{bluetoothNoDevices} |
| 88 </span> | 89 </span> |
| 89 <div id="container" class="layout vertical flex self-stretch" | 90 <div id="container" class="layout vertical flex self-stretch" |
| 90 scrollable> | 91 scrollable> |
| 91 <iron-list items="[[getUnpaired_(deviceList.*)]]" | 92 <iron-list items="[[getUnpaired_(deviceList.*)]]" |
| 92 selection-enabled selected-item="{{selectedItem}}" | 93 selection-enabled selected-item="{{selectedItem}}" |
| 93 scroll-target="container"> | 94 scroll-target="container"> |
| 94 <template> | 95 <template> |
| 95 <bluetooth-device-list-item device="[[item]]" | 96 <bluetooth-device-list-item device="[[item]]" |
| 96 tabindex$="[[tabIndex]]"> | 97 tabindex$="[[tabIndex]]"> |
| 97 </bluetooth-device-list-item> | 98 </bluetooth-device-list-item> |
| 98 </template> | 99 </template> |
| 99 </iron-list> | 100 </iron-list> |
| 100 </div> | 101 </div> |
| 101 </div> | 102 </div> |
| 102 <template is="dom-if" if="[[isDialogType_(dialogId, 'pairDevice')]]"> | 103 <template is="dom-if" if="[[isDialogType_(dialogId, 'pairDevice')]]"> |
| 103 <div id="pairing" class="settings-box first layout vertical center | 104 <div id="pairing" class="settings-box first layout vertical center |
| 104 center-justified"> | 105 center-justified"> |
| 105 <div class="dialog-message"> | 106 <div class="dialog-message"> |
| 106 [[getMessage_(pairingDevice, pairingEvent)]] | 107 [[getMessage_(pairingDevice, pairingEvent_)]] |
| 107 </div> | 108 </div> |
| 108 <div hidden$="[[!showEnterPincode_(pairingEvent)]]"> | 109 <div hidden$="[[!showEnterPincode_(pairingEvent_)]]"> |
| 109 <paper-input id="pincode" minlength="1" maxlength="16" | 110 <paper-input id="pincode" minlength="1" maxlength="16" |
| 110 type="text" auto-validate value="{{pinOrPass}}"> | 111 type="text" auto-validate value="{{pinOrPass}}"> |
| 111 </paper-input> | 112 </paper-input> |
| 112 </div> | 113 </div> |
| 113 <div hidden$="[[!showEnterPasskey_(pairingEvent)]]"> | 114 <div hidden$="[[!showEnterPasskey_(pairingEvent_)]]"> |
| 114 <paper-input id="passkey" minlength="6" maxlength="6" | 115 <paper-input id="passkey" minlength="6" maxlength="6" |
| 115 type="text" auto-validate value="{{pinOrPass}}"> | 116 type="text" auto-validate value="{{pinOrPass}}"> |
| 116 </paper-input> | 117 </paper-input> |
| 117 </div> | 118 </div> |
| 118 <div id="pinDiv" class="layout horizontal center center-justified" | 119 <div id="pinDiv" class="layout horizontal center center-justified" |
| 119 hidden="[[!showDisplayPassOrPin_(pairingEvent)]]"> | 120 hidden="[[!showDisplayPassOrPin_(pairingEvent_)]]"> |
| 120 <template is="dom-repeat" items="[[digits]]"> | 121 <template is="dom-repeat" items="[[digits]]"> |
| 121 <span class$="[[getPinClass_(index, pairingEvent)]]"> | 122 <span class$="[[getPinClass_(index, pairingEvent_)]]"> |
| 122 [[getPinDigit_(index, pairingEvent)]] | 123 [[getPinDigit_(index, pairingEvent_)]] |
| 123 </span> | 124 </span> |
| 124 </template> | 125 </template> |
| 125 <span class$="[[getPinClass_(-1, pairingEvent)]]" | 126 <span class$="[[getPinClass_(-1, pairingEvent_)]]" |
| 126 hidden="[[showAcceptReject_(pairingEvent)]]"> | 127 hidden="[[showAcceptReject_(pairingEvent_)]]"> |
| 127 $i18n{bluetoothEnterKey} | 128 $i18n{bluetoothEnterKey} |
| 128 </span> | 129 </span> |
| 129 </div> | 130 </div> |
| 130 </div> | 131 </div> |
| 131 </template> | 132 </template> |
| 132 <template is="dom-if" | 133 <template is="dom-if" |
| 133 if="[[isDialogType_('connectError', dialogId)]]"> | 134 if="[[isDialogType_('connectError', dialogId)]]"> |
| 134 <div class="settings-box first layout vertical center | 135 <div class="settings-box first layout vertical center |
| 135 center-justified"> | 136 center-justified"> |
| 136 <div class="dialog-message">[[errorMessage]]</div> | 137 <div class="dialog-message">[[errorMessage]]</div> |
| 137 </div> | 138 </div> |
| 138 </template> | 139 </template> |
| 139 </div> | 140 </div> |
| 140 </div> | 141 </div> |
| 141 <div class="button-container"> | 142 <div class="button-container"> |
| 142 <template is="dom-if" if="[[isDialogType_('addDevice', dialogId)]]"> | 143 <template is="dom-if" if="[[isDialogType_('addDevice', dialogId)]]"> |
| 143 <div id="scanning" class="layout horizontal center flex" | 144 <div id="scanning" class="layout horizontal center flex" |
| 144 hidden$="[[!adapterState.discovering]]"> | 145 hidden$="[[!adapterState.discovering]]"> |
| 145 <paper-spinner active="[[adapterState.discovering]]"> | 146 <paper-spinner active="[[adapterState.discovering]]"> |
| 146 </paper-spinner> | 147 </paper-spinner> |
| 147 <span>$i18n{bluetoothScanning}</span> | 148 <span>$i18n{bluetoothScanning}</span> |
| 148 </div> | 149 </div> |
| 149 <paper-button class="end-justified" on-tap="onCancelTap_"> | 150 <paper-button class="end-justified" on-tap="onCancelTap_"> |
| 150 $i18n{cancel} | 151 $i18n{cancel} |
| 151 </paper-button> | 152 </paper-button> |
| 152 </template> | 153 </template> |
| 153 <template is="dom-if" if="[[isDialogType_('pairDevice', dialogId)]]"> | 154 <template is="dom-if" if="[[isDialogType_('pairDevice', dialogId)]]"> |
| 154 <paper-button hidden$="[[!showAcceptReject_(pairingEvent)]]" | 155 <paper-button hidden$="[[!showAcceptReject_(pairingEvent_)]]" |
| 155 on-tap="onAcceptTap_">$i18n{bluetoothAccept}</paper-button> | 156 on-tap="onAcceptTap_">$i18n{bluetoothAccept}</paper-button> |
| 156 <paper-button hidden$="[[!showAcceptReject_(pairingEvent)]]" | 157 <paper-button hidden$="[[!showAcceptReject_(pairingEvent_)]]" |
| 157 on-tap="onRejectTap_">$i18n{bluetoothReject}</paper-button> | 158 on-tap="onRejectTap_">$i18n{bluetoothReject}</paper-button> |
| 158 <paper-button hidden$="[[!showConnect_(pairingEvent)]]" | 159 <paper-button hidden$="[[!showConnect_(pairingEvent_)]]" |
| 159 disabled="[[!enableConnect_(pairingEvent, pinOrPass)]]" | 160 disabled="[[!enableConnect_(pairingEvent_, pinOrPass)]]" |
| 160 on-tap="onConnectTap_">$i18n{bluetoothPair}</paper-button> | 161 on-tap="onConnectTap_">$i18n{bluetoothPair}</paper-button> |
| 161 <paper-button hidden$="[[!showDismiss_(pairingDevice, pairingEvent)]]" | 162 <paper-button |
| 163 hidden$="[[!showDismiss_(pairingDevice, pairingEvent_)]]" |
| 162 on-tap="close">$i18n{bluetoothDismiss}</paper-button> | 164 on-tap="close">$i18n{bluetoothDismiss}</paper-button> |
| 163 <paper-button hidden$="[[showDismiss_(pairingDevice, pairingEvent)]]" | 165 <paper-button hidden$="[[showDismiss_(pairingDevice, pairingEvent_)]]" |
| 164 on-tap="onCancelTap_"> | 166 on-tap="onCancelTap_"> |
| 165 $i18n{cancel} | 167 $i18n{cancel} |
| 166 </paper-button> | 168 </paper-button> |
| 167 </template> | 169 </template> |
| 168 <template is="dom-if" if="[[isDialogType_('connectError', dialogId)]]"> | 170 <template is="dom-if" if="[[isDialogType_('connectError', dialogId)]]"> |
| 169 <paper-button on-tap="close">$i18n{bluetoothDismiss} | 171 <paper-button on-tap="close">$i18n{bluetoothDismiss} |
| 170 </paper-button> | 172 </paper-button> |
| 171 </template> | 173 </template> |
| 172 </div> | 174 </div> |
| 173 </dialog> | 175 </dialog> |
| 174 </template> | 176 </template> |
| 175 <script src="bluetooth_device_dialog.js"></script> | 177 <script src="bluetooth_device_dialog.js"></script> |
| 176 </dom-module> | 178 </dom-module> |
| OLD | NEW |