Created
February 6, 2015 04:56
-
-
Save nbortolotti/9b249ceb70397aa0642a to your computer and use it in GitHub Desktop.
polymer-element [nick-collapse-viewer]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<polymer-element name="nick-collapse-viewer" attributes="program details link chart image imagedetails"> | |
<template> | |
<div class="heading" on-click="{{ toggle }}">{{ program }}</div> | |
<core-collapse id="collapse"> | |
<div class="content"> | |
<div>{{ details }}</div> | |
<hr size="1" /> | |
<table border="0"> | |
<tr> | |
<td><img src="{{ image }}" width="100" height="100" /></td> | |
<td VALIGN="TOP"><div>{{ imagedetails }}</div></td> | |
</tr> | |
</table> | |
<hr size="1" /> | |
<chart-pie | |
width="150" | |
height="150" | |
values="{{ chart | arrayize }}"> | |
</chart-pie> | |
<div><a href="{{ link }}"> more details</a></div> | |
</div> | |
</core-collapse> | |
</template> | |
<script> | |
Polymer('nick-collapse-viewer', { | |
toggle: function() { | |
this.$.collapse.toggle(); | |
}, | |
arrayize: function(el) { | |
return JSON.parse(el); | |
}, | |
}); | |
</script> | |
</polymer-element> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment