Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
laurion committed Oct 12, 2013
1 parent 306e764 commit 1e96001
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 19 deletions.
18 changes: 9 additions & 9 deletions meteor-hack.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
{{>table}}
</body>
<template name="table">
<table>
{{#each element}}
<tr>
{{#each this}}
<td color="{{color}}">{{title}}</td>
{{/each}}
</tr>
{{/each}}
</table>
<table>
{{#each element}}
<tr>
{{#each this}}
<td style="background: {{color}}">{{title}}</td>
{{/each}}
</tr>
{{/each}}
</table>
</template>
22 changes: 12 additions & 10 deletions meteor-hack.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,30 @@
Items = new Meteor.Collection("items");
// Items.insert({data: []})
if (Meteor.isClient) {
data = [];
for(i=0;i<20;i++){
var row=[];
for(j=0;j<20;j++){
row.push({title:(i+" "+j), body: "test"});
row.push({title:(i+" "+j), color: "aa"});
}
data.push(row);
}
// Items.update({Session.get("data"):data});
Session.set("els",data);
Template.table.element = function(){
console.log("wtf");

return Session.get("els");
}
Template.table.events({
"click td": function(event){
console.log(this);
Template.table.element = function(){
console.log("wtf");

return Session.get("els");
}
Template.table.events({
"click td": function(event){
a = get[]
}
});


}

Items = new Meteor.Collection("items");
if(Meteor.isServer){

}
Expand Down

0 comments on commit 1e96001

Please sign in to comment.