Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated core-list with latest issues #18

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions elements/list-container/list-container.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,19 @@
<core-list style="height: 300px;" id="list" data="{{data}}"
selectionenabled="{{selectionEnabled}}"
selection="{{selection}}">
<!-- <core-ajax id="weeklyRefs" auto url="weekly.json" handleas="json" hidden></core-ajax>-->

<template>

<div class="item {{ {selected: selected} | tokenList }}">
<ul layout horizontal center-center>
<!-- <li>
<img src="/img/web-components.png" alt="Web Components picture">
</li>-->
<ulgst layout horizontal center-center>
<li>
<span>{{model.publishedDate}} - </span>
<a href="{{model.url}}"
title="{{model.name}}"
target="_blank">{{model.name}}</a>
</li>

</ul>
</ulgst>
</div>
</template>
</core-list>
Expand Down
94 changes: 54 additions & 40 deletions elements/list-container/list-container.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,46 +6,60 @@
ready: function() {
var self = this;
this.data = [];
var data = [
{
"name": "Web Components Weekly #1",
"id": "5b537c8ca0"
},
{
"name": "Web Components Weekly #2",
"id": "3d95131149"
},
{
"name": "Web Components Weekly #3",
"id": "6bb0920ff6"
},
{
"name": "Web Components Weekly #4",
"id": "6f50177c1d"
},
{
"name": "Web Components Weekly #5",
"id": "c2d3bdb50a"
},
{
"name": "Web Components Weekly #6",
"id": "8c1807e9dc"
}
];

for (var i = 0; i < data.length; i++) {
var item = data[i];


this.data.push({
id: item.id,
name: item.name,
url: "http://us10.campaign-archive2.com/?u=6cd727a9a0da64b4003caa164&id=" + item.id
});
}

// this.$.weeklyRefs.addEventListener("core-response", this.generateData );
window.list = this.$.list;

var data =
[
{
"name": "Web Components Weekly #1",
"date" : "04/02/2015",
"url": "http://eepurl.com/biB5B5"
},
{
"name": "Web Components Weekly #2",
"date" : "04/08/2015",
"url": "http://eepurl.com/bjdEW9"
},
{
"name": "Web Components Weekly #3",
"date" : "04/17/2015",
"url": "http://eepurl.com/bj-f4j"
},
{
"name": "Web Components Weekly #4",
"date" : "04/22/2015",
"url": "http://eepurl.com/bkwVRD"
},
{
"name": "Web Components Weekly #5",
"date" : "04/29/2015",
"url": "http://eepurl.com/bldYD9"
},
{
"name": "Web Components Weekly #6",
"date" : "05/06/2015",
"url": "http://eepurl.com/blYoi1"
},
{
"name": "Web Components Weekly #7",
"date" : "05/20/2015",
"url" : "http://eepurl.com/bm9RG1"
}

];

data = data.reverse();

for (var i = 0; i < data.length; i++) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here ;)

var item = data[i];

this.data.push({
id: item.id,
name: item.name,
url: item.url,
publishedDate: item.date
});
}
window.list = this.$.list;
}

});
Expand Down
59 changes: 35 additions & 24 deletions elements/list-container/weekly.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,39 @@
{
"weeklys": [
{
"name": "Web Components Weekly #1",
"id": "5b537c8ca0"
},
{
"name": "Web Components Weekly #2",
"id": "3d95131149"
},
{
"name": "Web Components Weekly #3",
"id": "6bb0920ff6"
},
{
"name": "Web Components Weekly #4",
"id": "6f50177c1d"
},
{
"name": "Web Components Weekly #5",
"id": "c2d3bdb50a"
},
{
"name": "Web Components Weekly #6",
"id": "8c1807e9dc"
}
{
"name": "Web Components Weekly #1",
"date" : "04/02/2015",
"url": "http://eepurl.com/biB5B5"
},
{
"name": "Web Components Weekly #2",
"date" : "04/08/2015",
"url": "http://eepurl.com/bjdEW9"
},
{
"name": "Web Components Weekly #3",
"date" : "04/17/2015",
"url": "http://eepurl.com/bj-f4j"
},
{
"name": "Web Components Weekly #4",
"date" : "04/22/2015",
"url": "http://eepurl.com/bkwVRD"
},
{
"name": "Web Components Weekly #5",
"date" : "04/29/2015",
"url": "http://eepurl.com/bldYD9"
},
{
"name": "Web Components Weekly #6",
"date" : "05/06/2015",
"url": "http://eepurl.com/blYoi1"
},
{
"name": "Web Components Weekly #7",
"date" : "05/20/2015",
"url" : "http://eepurl.com/bm9RG1"
}
]
}