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/html/cr.html"> | 2 <link rel="import" href="chrome://resources/html/cr.html"> |
3 <link rel="import" href="chrome://resources/html/polymer.html"> | 3 <link rel="import" href="chrome://resources/html/polymer.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-selector/iron-sele
ctor.html"> | 5 <link rel="import" href="chrome://resources/polymer/v1_0/iron-selector/iron-sele
ctor.html"> |
6 <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-button/paper-butt
on.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-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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 span.confirm { | 72 span.confirm { |
73 color: #999; | 73 color: #999; |
74 font-size: 20px; | 74 font-size: 20px; |
75 font-weight: 600; /* semibold */ | 75 font-weight: 600; /* semibold */ |
76 margin: 0 20px; | 76 margin: 0 20px; |
77 } | 77 } |
78 </style> | 78 </style> |
79 <cr-dialog id="dialog" class="layout vertical" | 79 <cr-dialog id="dialog" class="layout vertical" |
80 on-iron-overlay-canceled="onIronOverlayCanceled_" | 80 on-iron-overlay-canceled="onIronOverlayCanceled_" |
81 on-iron-overlay-closed="onIronOverlayClosed_"> | 81 on-iron-overlay-closed="onIronOverlayClosed_"> |
82 <div class="title">[[getTitle_(dialogType)]]</div> | 82 <div class="title">[[getTitle_(dialogId)]]</div> |
83 <div class="body"> | 83 <div class="body"> |
84 <template is="dom-if" if="[[isDialogType_(dialogType, 'addDevice')]]"> | 84 <template is="dom-if" if="[[isDialogType_(dialogId, 'addDevice')]]"> |
85 <div id="dialogDeviceList" class="layout vertical" | 85 <div id="dialogDeviceList" class="layout vertical" |
86 on-device-event="onDeviceEvent_"> | 86 on-device-event="onDeviceEvent_"> |
87 <span class="no-devices" hidden$="[[haveDevices_(deviceList)]]"> | 87 <span class="no-devices" hidden$="[[haveDevices_(deviceList)]]"> |
88 $i18n{bluetoothNoDevices} | 88 $i18n{bluetoothNoDevices} |
89 </span> | 89 </span> |
90 <iron-selector class="flex"> | 90 <iron-selector class="flex"> |
91 <template is="dom-repeat" items="[[deviceList]]" | 91 <template is="dom-repeat" items="[[deviceList]]" |
92 filter="deviceNotPaired_" observe="paired"> | 92 filter="deviceNotPaired_" observe="paired"> |
93 <bluetooth-device-list-item device="[[item]]"> | 93 <bluetooth-device-list-item device="[[item]]"> |
94 </bluetooth-device-list-item> | 94 </bluetooth-device-list-item> |
95 </template> | 95 </template> |
96 </iron-selector> | 96 </iron-selector> |
97 </div> | 97 </div> |
98 </template> | 98 </template> |
99 <template is="dom-if" if="[[isDialogType_(dialogType, 'pairDevice')]]"> | 99 <template is="dom-if" if="[[isDialogType_(dialogId, 'pairDevice')]]"> |
100 <div id="pairing" class="settings-blox layout vertical center | 100 <div id="pairing" class="settings-box first layout vertical center |
101 center-justified flex"> | 101 center-justified"> |
102 <div id="dialogMessage"> | 102 <div id="dialogMessage"> |
103 [[getMessage_(pairingDevice, pairingEvent)]] | 103 [[getMessage_(pairingDevice, pairingEvent)]] |
104 </div> | 104 </div> |
105 <div hidden$="[[!showEnterPincode_(pairingEvent)]]"> | 105 <div hidden$="[[!showEnterPincode_(pairingEvent)]]"> |
106 <paper-input id="pincode" minlength="1" maxlength="16" | 106 <paper-input id="pincode" minlength="1" maxlength="16" |
107 type="text"> | 107 type="text" auto-validate value="{{pinOrPass}}"> |
| 108 </paper-input> |
108 </div> | 109 </div> |
109 <div hidden$="[[!showEnterPasskey_(pairingEvent)]]"> | 110 <div hidden$="[[!showEnterPasskey_(pairingEvent)]]"> |
110 <paper-input id="passkey" minlength="6" maxlength="6" type="text"> | 111 <paper-input id="passkey" minlength="6" maxlength="6" type="text" |
| 112 auto-validate value="{{pinOrPass}}"></paper-input> |
111 </div> | 113 </div> |
112 <div id="pinDiv" class="layout horizontal center center-justified" | 114 <div id="pinDiv" class="layout horizontal center center-justified" |
113 hidden="[[!showDisplayPassOrPin_(pairingEvent)]]"> | 115 hidden="[[!showDisplayPassOrPin_(pairingEvent)]]"> |
114 <template is="dom-repeat" items="[[digits]]"> | 116 <template is="dom-repeat" items="[[digits]]"> |
115 <span class$="[[getPinClass_(pairingEvent, index)]]"> | 117 <span class$="[[getPinClass_(pairingEvent, index)]]"> |
116 [[getPinDigit_(pairingEvent, index)]] | 118 [[getPinDigit_(pairingEvent, index)]] |
117 </span> | 119 </span> |
118 </template> | 120 </template> |
119 <span class$="[[getPinClass_(pairingEvent, -1)]]" | 121 <span class$="[[getPinClass_(pairingEvent, -1)]]" |
120 hidden="[[showAcceptReject_(pairingEvent)]]"> | 122 hidden="[[showAcceptReject_(pairingEvent)]]"> |
121 $i18n{bluetoothEnterKey} | 123 $i18n{bluetoothEnterKey} |
122 </span> | 124 </span> |
123 </div> | 125 </div> |
124 </div> | 126 </div> |
125 </template> | 127 </template> |
126 </div> | 128 </div> |
127 <div class="button-container"> | 129 <div class="button-container"> |
128 <template is="dom-if" if="[[isDialogType_(dialogType, 'addDevice')]]"> | 130 <template is="dom-if" if="[[isDialogType_(dialogId, 'addDevice')]]"> |
129 <div id="scanning" class="layout horizontal center flex" | 131 <div id="scanning" class="layout horizontal center flex" |
130 hidden$="[[!adapterState.discovering]]"> | 132 hidden$="[[!adapterState.discovering]]"> |
131 <paper-spinner active="[[adapterState.discovering]]"> | 133 <paper-spinner active="[[adapterState.discovering]]"> |
132 </paper-spinner> | 134 </paper-spinner> |
133 <span>$i18n{bluetoothScanning}</span> | 135 <span>$i18n{bluetoothScanning}</span> |
134 </div> | 136 </div> |
135 <paper-button class="end-justified" on-tap="onCancelTap_"> | 137 <paper-button class="end-justified" on-tap="onCancelTap_"> |
136 $i18n{cancel} | 138 $i18n{cancel} |
137 </paper-button> | 139 </paper-button> |
138 </template> | 140 </template> |
139 <template is="dom-if" if="[[isDialogType_(dialogType, 'pairDevice')]]"> | 141 <template is="dom-if" if="[[isDialogType_(dialogId, 'pairDevice')]]"> |
140 <paper-button hidden$="[[!showAcceptReject_(pairingEvent)]]" | 142 <paper-button hidden$="[[!showAcceptReject_(pairingEvent)]]" |
141 on-tap="onAcceptTap_">$i18n{bluetoothAccept}</paper-button> | 143 on-tap="onAcceptTap_">$i18n{bluetoothAccept}</paper-button> |
142 <paper-button hidden$="[[!showAcceptReject_(pairingEvent)]]" | 144 <paper-button hidden$="[[!showAcceptReject_(pairingEvent)]]" |
143 on-tap="onRejectTap_">$i18n{bluetoothReject}</paper-button> | 145 on-tap="onRejectTap_">$i18n{bluetoothReject}</paper-button> |
144 <paper-button hidden$="[[!showConnect_(pairingEvent)]]" | 146 <paper-button hidden$="[[!showConnect_(pairingEvent)]]" |
| 147 disabled="[[!enableConnect_(pairingEvent, pinOrPass)]]" |
145 on-tap="onConnectTap_">$i18n{bluetoothConnect}</paper-button> | 148 on-tap="onConnectTap_">$i18n{bluetoothConnect}</paper-button> |
146 <paper-button hidden$="[[!showDismiss_(pairingDevice, pairingEvent)]]" | 149 <paper-button hidden$="[[!showDismiss_(pairingDevice, pairingEvent)]]" |
147 on-tap="onDismissTap_">$i18n{bluetoothDismiss}</paper-button> | 150 on-tap="onDismissTap_">$i18n{bluetoothDismiss}</paper-button> |
148 <paper-button hidden$="[[showDismiss_(pairingDevice, pairingEvent)]]" | 151 <paper-button hidden$="[[showDismiss_(pairingDevice, pairingEvent)]]" |
149 on-tap="onCancelTap_"> | 152 on-tap="onCancelTap_"> |
150 $i18n{cancel} | 153 $i18n{cancel} |
151 </paper-button> | 154 </paper-button> |
152 </template> | 155 </template> |
153 </div> | 156 </div> |
154 </cr-dialog> | 157 </cr-dialog> |
155 </template> | 158 </template> |
156 <script src="/bluetooth_page/bluetooth_device_dialog.js"></script> | 159 <script src="/bluetooth_page/bluetooth_device_dialog.js"></script> |
157 </dom-module> | 160 </dom-module> |
OLD | NEW |