Skip to content

Instantly share code, notes, and snippets.

@JamesWP
Created June 28, 2014 22:20
Show Gist options
  • Save JamesWP/06198203a3914bb9758f to your computer and use it in GitHub Desktop.
Save JamesWP/06198203a3914bb9758f to your computer and use it in GitHub Desktop.
designer
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html">
<link rel="import" href="../aha-table/src/aha-table.html">
<link rel="import" href="../core-splitter/core-splitter.html">
<polymer-element name="my-element">
<template>
<style>
:host {
box-sizing: border-box;
}
#core_drawer_panel {
right: 0px;
bottom: 0px;
left: 0px;
top: 0px;
position: absolute;
}
#section {
box-shadow: rgba(0, 0, 0, 0.0980392) 0px 2px 4px, rgba(0, 0, 0, 0.0980392) 0px 0px 3px;
background-color: rgb(250, 250, 250);
}
#section1 {
height: 100%;
box-sizing: border-box;
background-color: rgb(221, 221, 221);
}
</style>
<core-drawer-panel id="core_drawer_panel" one flex>
<section id="section" drawer></section>
<section id="section1" main vertical layout>
<div class="container" one flex vertical layout>
<div>
<aha-table id="table1"></aha-table>
</div>
<core-splitter direction="up" class="horizontal"></core-splitter>
<div>
<aha-table id="table2"></aha-table>
</div>
</div>
</section>
</core-drawer-panel>
</template>
<script>
Polymer('my-element', {
ready: function (){
this.$.table1.data = [
{ title: "gym", date: new Date().toISOString().slice(0, 10), type: "private", content: "5*20 situps, 5 miles running, 5 minutes planks", enabled: true },
{ title: "breakfast", date: new Date().toISOString().slice(0, 10), type: "private", enabled: true },
{ title: "work", date: new Date().toISOString().slice(0, 10), type: "public", content: "implement aha-table plymer element", enabled: true },
{ title: "lunch", date: new Date().toISOString().slice(0, 10), type: "public", content: null, enabled: false },
{ title: "work", date: new Date().toISOString().slice(0, 10), type: "public", content: "implement aha-table plymer element" },
{ title: "lunch", date: new Date().toISOString().slice(0, 10), type: "public", content: null },
{ title: "work", date: new Date().toISOString().slice(0, 10), type: "public", content: "implement aha-table plymer element", enabled: true },
{ title: "", date: new Date().toISOString().slice(0, 10), type: "public", content: null },
{ title: "work", date: new Date().toISOString().slice(0, 10), type: "public", content: "implement aha-table plymer element", enabled: true },
{ title: "", date: new Date().toISOString().slice(0, 10), type: "public", content: null },
{ title: "meeting", date: new Date().toISOString().slice(0, 10), type: "public", content: "introduce web components to the team" },
{ title: "dinner", date: new Date().toISOString().slice(0, 10), type: "private" }
]
}
});
</script>
</polymer-element>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment