Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 /** 'add-printers-list' is the list of discovered printers. */ | |
| 6 Polymer({ | |
| 7 is: 'add-printer-list', | |
| 8 | |
| 9 properties: { | |
| 10 /** @type {!Array<!CupsPrinterInfo>} */ | |
| 11 printers: { | |
| 12 type: Array, | |
| 13 notify: true, | |
| 14 }, | |
| 15 | |
| 16 /** @type {!CupsPrinterInfo} */ | |
| 17 selectedPrinter: { | |
| 18 type: Object, | |
| 19 notify: true, | |
| 20 }, | |
| 21 }, | |
| 22 | |
| 23 /** | |
| 24 * @param {{model:Object}} event | |
| 25 * @private | |
| 26 */ | |
| 27 onSelect_: function(event) { | |
| 28 this.selectedPrinter = event.model.item; | |
| 29 }, | |
| 30 }); | |
| 31 | |
| 32 /** 'add-printer-dialog-template' is the template of the Add Printer dialog. */ | |
| 33 Polymer({ | |
| 34 is: 'add-printer-dialog-template', | |
|
michaelpg
2016/08/29 17:10:33
please find another name -- <template> has a very
xdai1
2016/08/29 18:45:45
Done.
| |
| 35 | |
| 36 /** @private */ | |
| 37 attached: function() { | |
| 38 this.$$('#dialog').showModal(); | |
|
michaelpg
2016/08/29 17:10:33
this.$.dialog
xdai1
2016/08/29 18:45:45
Done.
| |
| 39 }, | |
| 40 | |
| 41 close: function() { | |
| 42 this.$$('#dialog').close(); | |
|
michaelpg
2016/08/29 17:10:33
same
xdai1
2016/08/29 18:45:45
Done.
| |
| 43 }, | |
| 44 }); | |
| OLD | NEW |