Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 Polymer('notification-card', (function() { | 5 Polymer({ |
| 6 return { | 6 is: 'notification-card', |
| 7 buttonClicked: function() { | 7 |
| 8 this.fire('buttonclick'); | 8 properties: { |
| 9 buttonLabel: { | |
| 10 type: String, | |
| 11 value: '' | |
|
Roman Sorokin (ftl)
2015/06/19 13:10:31
Won't it be empty by default?
dzhioev (left Google)
2015/06/20 02:01:55
No, it's undefined by default, and if it is undefi
| |
| 9 }, | 12 }, |
| 10 | 13 |
| 11 linkClicked: function(e) { | 14 linkLabel: { |
| 12 this.fire('linkclick'); | 15 type: String, |
| 13 e.preventDefault(); | 16 value: '' |
| 17 }, | |
| 18 | |
| 19 type: { | |
| 20 type: String, | |
| 21 value: '' | |
| 14 } | 22 } |
| 15 }; | 23 }, |
| 16 })()); | 24 |
| 25 iconNameByType_: function(type) { | |
| 26 if (type == 'fail') | |
| 27 return 'warning'; | |
| 28 if (type == 'success') | |
| 29 return 'done'; | |
| 30 console.error('Unknown type "' + type + '".'); | |
| 31 return ''; | |
| 32 }, | |
| 33 | |
| 34 buttonClicked_: function() { | |
| 35 this.fire('buttonclick'); | |
| 36 }, | |
| 37 | |
| 38 linkClicked_: function(e) { | |
| 39 this.fire('linkclick'); | |
| 40 e.preventDefault(); | |
| 41 } | |
| 42 }); | |
| OLD | NEW |