OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** 'add-printers-list' is the list of discovered printers. */ | 5 /** 'add-printers-list' is the list of discovered printers. */ |
6 Polymer({ | 6 Polymer({ |
7 is: 'add-printer-list', | 7 is: 'add-printer-list', |
8 | 8 |
9 properties: { | 9 properties: { |
10 /** @type {!Array<!CupsPrinterInfo>} */ | 10 /** @type {!Array<!CupsPrinterInfo>} */ |
11 printers: { | 11 printers: { |
12 type: Array, | 12 type: Array, |
13 notify: true, | 13 notify: true, |
14 }, | 14 }, |
15 | 15 |
16 /** @type {!CupsPrinterInfo} */ | 16 /** @type {!CupsPrinterInfo} */ |
17 selectedPrinter: { | 17 newPrinter: { |
18 type: Object, | 18 type: Object, |
19 notify: true, | 19 notify: true, |
20 }, | 20 }, |
21 }, | 21 }, |
22 | 22 |
23 /** | 23 /** |
24 * @param {{model:Object}} event | 24 * @param {{model:Object}} event |
25 * @private | 25 * @private |
26 */ | 26 */ |
27 onSelect_: function(event) { | 27 onSelect_: function(event) { |
28 this.selectedPrinter = event.model.item; | 28 this.newPrinter = event.model.item; |
29 }, | 29 }, |
30 }); | 30 }); |
31 | 31 |
32 /** 'drop-down-search-box' implements a search box with suggestions dropdown. */ | 32 /** 'drop-down-search-box' implements a search box with suggestions dropdown. */ |
33 Polymer({ | 33 Polymer({ |
34 is: 'drop-down-search-box', | 34 is: 'drop-down-search-box', |
35 | 35 |
36 properties: { | 36 properties: { |
37 /** @type {!Array<string>} */ | 37 /** @type {!Array<string>} */ |
38 items: { | 38 items: { |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 | 107 |
108 /** @private */ | 108 /** @private */ |
109 attached: function() { | 109 attached: function() { |
110 this.$.dialog.showModal(); | 110 this.$.dialog.showModal(); |
111 }, | 111 }, |
112 | 112 |
113 close: function() { | 113 close: function() { |
114 this.$.dialog.close(); | 114 this.$.dialog.close(); |
115 }, | 115 }, |
116 }); | 116 }); |
OLD | NEW |