Skip to content

Instantly share code, notes, and snippets.

@bogdan-nourescu
Created July 4, 2014 09:11
Show Gist options
  • Save bogdan-nourescu/59ffba9317527e58974b to your computer and use it in GitHub Desktop.
Save bogdan-nourescu/59ffba9317527e58974b to your computer and use it in GitHub Desktop.
designer
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-icon/core-icon.html">
<polymer-element name="Anunt" attributes="atasamente">
<template>
<core-ajax id="atasamente" auto url="http://gdata.youtube.com/feeds/api/videos/" params='{"alt":"json", "q":"chrome"}' handleas="json" on-core-response="{{ onLoadAtasamente }}"></core-ajax>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
box-sizing: border-box;
}
#core_card {
border-top-left-radius: 2px;
border-top-right-radius: 2px;
border-bottom-right-radius: 2px;
border-bottom-left-radius: 2px;
box-shadow: rgba(0, 0, 0, 0.0980392) 0px 2px 4px, rgba(0, 0, 0, 0.0980392) 0px 0px 3px;
width: 2170px;
height: 290px;
background-color: rgb(255, 255, 255);
}
#section {
border: 1px;
}
#core_field {
left: 2310px;
top: 670px;
}
#core_selector {
width: 100%;
height: 50px;
}
</style>
<core-card id="core_card" vertical layout>
<section id="sectionTitleContainer" one flex horizontal layout>
<section id="sectionTitle" three flex>{{ titlu }}</section>
<section id="sectionAuthor" one flex horizontal layout>
<core-icon icon="settings" id="core_icon" self-center></core-icon>
<section id="sectionAuthorName" one flex>{{ autor }}</section>
</section>
<section id="sectionDate" one flex horizontal layout>{{ date }}</section>
</section>
<section id="sectionContent" two flex>{{ content }}</section>
<section id="sectionFiles" one flex>
<template id="template" repeat="{{response.feed.entry}}"></template>
<a id="a1" class="atasament" href="/do/ajax/ServeFile?blobKey=test" target="_blank">{{ title.$t }}</a>
</section>
</core-card>
</template>
<script>
Polymer('Anunt', {
titlu: 'test',
autor: 'YO',
date: '20Dec 2014',
content: 'mergeeee',
atasamente: [
{
"blobKey": "test",
"name": "fisier.xls",
"size": "50kb"
},
{
"blobKey": "test2",
"name": "fisier2.xls",
"size": "150kb"
}
],
onLoadAtasamente: function (){
console.log("test");
}
});
</script>
</polymer-element>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment