diff --git a/meteor-hack.html b/meteor-hack.html index 5579cbc..a939b1c 100644 --- a/meteor-hack.html +++ b/meteor-hack.html @@ -6,13 +6,13 @@ {{>table}} diff --git a/meteor-hack.js b/meteor-hack.js index 4f800a5..069b205 100644 --- a/meteor-hack.js +++ b/meteor-hack.js @@ -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){ }