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/html/cr.html"> | 3 <link rel="import" href="chrome://resources/html/cr.html"> |
3 <link rel="import" href="chrome://resources/html/polymer.html"> | 4 <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"> | 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-selector/iron-sele ctor.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/paper-button/paper-butt on.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-icon-button/paper -icon-button.html"> | 8 <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"> | 9 <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"> | 10 <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"> | 11 <link rel="import" href="/bluetooth_page/bluetooth_device_list_item.html"> |
11 <link rel="import" href="/icons.html"> | 12 <link rel="import" href="/icons.html"> |
12 <link rel="import" href="/settings_shared_css.html"> | 13 <link rel="import" href="/settings_shared_css.html"> |
13 | 14 |
14 <dom-module id="bluetooth-device-dialog"> | 15 <dom-module id="bluetooth-device-dialog"> |
15 <template> | 16 <template> |
16 <style include="settings-shared"> | 17 <style include="settings-shared"> |
17 #pairing { | 18 #pairing { |
18 margin-bottom: 10px; | 19 margin-bottom: 10px; |
19 } | 20 } |
20 | 21 |
21 #pairing paper-input { | 22 #pairing paper-input { |
22 text-align: center; | 23 text-align: center; |
23 } | 24 } |
24 | 25 |
25 #pinDiv { | 26 #pinDiv { |
26 margin-top: 10px; | 27 margin-top: 10px; |
27 } | 28 } |
28 | 29 |
29 iron-selector { | |
30 width: 100%; | |
31 } | |
32 | |
33 paper-spinner { | 30 paper-spinner { |
34 height: 20px; | 31 height: 20px; |
35 margin: 0 10px; | 32 margin: 0 10px; |
36 width: 20px; | 33 width: 20px; |
37 } | 34 } |
38 | 35 |
39 .dialog-message { | 36 .dialog-message { |
40 margin-bottom: 10px; | 37 margin-bottom: 10px; |
41 } | 38 } |
42 | 39 |
43 div.contents { | 40 div.contents { |
44 max-height: 250px; | 41 height: 250px; |
45 min-height: 250px; | |
46 } | 42 } |
47 | 43 |
48 /* .display indicates a displayed pin code or passkey. */ | 44 /* .display indicates a displayed pin code or passkey. */ |
49 span.display { | 45 span.display { |
50 border: 1px solid #ccc; | 46 border: 1px solid #ccc; |
51 border-radius: 4px; | 47 border-radius: 4px; |
52 box-shadow: 0 0 0 1px #222; | 48 box-shadow: 0 0 0 1px #222; |
53 color: #222; | 49 color: #222; |
54 font-size: 16px; | 50 font-size: 16px; |
55 height: 38px; | 51 height: 38px; |
(...skipping 22 matching lines...) Expand all Loading... | |
78 color: #999; | 74 color: #999; |
79 font-size: 20px; | 75 font-size: 20px; |
80 font-weight: 600; /* semibold */ | 76 font-weight: 600; /* semibold */ |
81 margin: 0 20px; | 77 margin: 0 20px; |
82 } | 78 } |
83 </style> | 79 </style> |
84 <dialog is="cr-dialog" id="dialog" on-cancel="onDialogCanceled_"> | 80 <dialog is="cr-dialog" id="dialog" on-cancel="onDialogCanceled_"> |
85 <div class="title">[[getTitle_(dialogId)]]</div> | 81 <div class="title">[[getTitle_(dialogId)]]</div> |
86 <div class="body"> | 82 <div class="body"> |
87 <div class="contents layout vertical center center-justified"> | 83 <div class="contents layout vertical center center-justified"> |
88 <template is="dom-if" if="[[isDialogType_(dialogId, 'addDevice')]]"> | 84 <!-- Note: dialog + dom-if + iron-list makes sizing complicated so use |
dschuyler
2016/08/23 22:16:29
Thanks for this comment
| |
89 <div id="dialogDeviceList" | 85 hidden here; this is almost always the first dialog shown. --> |
90 class="layout vertical flex start self-stretch" | 86 <div id="dialogDeviceList" |
91 on-device-event="onDeviceEvent_"> | 87 hidden$="[[!isDialogType_(dialogId, 'addDevice')]]" |
92 <span class="no-devices" hidden$="[[haveDevices_(deviceList)]]"> | 88 class="layout vertical flex start self-stretch"> |
93 $i18n{bluetoothNoDevices} | 89 <span class="no-devices" hidden$="[[haveUnpaired_(deviceList.*)]]"> |
94 </span> | 90 $i18n{bluetoothNoDevices} |
95 <iron-selector class="flex"> | 91 </span> |
96 <template is="dom-repeat" items="[[deviceList]]" | 92 <div id="container" class="layout vertical flex self-stretch" |
97 filter="deviceNotPaired_" observe="paired"> | 93 scrollable> |
98 <bluetooth-device-list-item device="[[item]]"> | 94 <iron-list items="[[getUnpaired_(deviceList.*)]]" |
95 selection-enabled selected-item="{{selectedItem}}" | |
96 scroll-target="container" tabindex$="0"> | |
97 <template> | |
98 <bluetooth-device-list-item device="[[item]]" | |
99 tabindex$="[[tabIndex]]"> | |
99 </bluetooth-device-list-item> | 100 </bluetooth-device-list-item> |
100 </template> | 101 </template> |
101 </iron-selector> | 102 </iron-list> |
102 </div> | 103 </div> |
103 </template> | 104 </div> |
104 <template is="dom-if" if="[[isDialogType_(dialogId, 'pairDevice')]]"> | 105 <template is="dom-if" if="[[isDialogType_(dialogId, 'pairDevice')]]"> |
105 <div id="pairing" class="settings-box first layout vertical center | 106 <div id="pairing" class="settings-box first layout vertical center |
106 center-justified"> | 107 center-justified"> |
107 <div class="dialog-message"> | 108 <div class="dialog-message"> |
108 [[getMessage_(pairingDevice, pairingEvent)]] | 109 [[getMessage_(pairingDevice, pairingEvent)]] |
109 </div> | 110 </div> |
110 <div hidden$="[[!showEnterPincode_(pairingEvent)]]"> | 111 <div hidden$="[[!showEnterPincode_(pairingEvent)]]"> |
111 <paper-input id="pincode" minlength="1" maxlength="16" | 112 <paper-input id="pincode" minlength="1" maxlength="16" |
112 type="text" auto-validate value="{{pinOrPass}}"> | 113 type="text" auto-validate value="{{pinOrPass}}"> |
113 </paper-input> | 114 </paper-input> |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
169 </template> | 170 </template> |
170 <template is="dom-if" if="[[isDialogType_('connectError', dialogId)]]"> | 171 <template is="dom-if" if="[[isDialogType_('connectError', dialogId)]]"> |
171 <paper-button on-tap="close">$i18n{bluetoothDismiss} | 172 <paper-button on-tap="close">$i18n{bluetoothDismiss} |
172 </paper-button> | 173 </paper-button> |
173 </template> | 174 </template> |
174 </div> | 175 </div> |
175 </dialog> | 176 </dialog> |
176 </template> | 177 </template> |
177 <script src="/bluetooth_page/bluetooth_device_dialog.js"></script> | 178 <script src="/bluetooth_page/bluetooth_device_dialog.js"></script> |
178 </dom-module> | 179 </dom-module> |
OLD | NEW |