Implemented basic inventory

This commit is contained in:
Thaum
2014-11-12 11:11:45 +00:00
parent acf05ecd78
commit d80fb19dfe
10 changed files with 99 additions and 5 deletions

View File

@@ -0,0 +1,15 @@
Template.itemRow.helpers({
isSelected: function(){
return Session.get('selectedItemRow')=== this._id;
}
});
Template.itemRow.events({
"click": function(e){
if(Session.get('selectedItemRow')=== this._id){
Session.set('selectedItemRow', null);
} else{
Session.set('selectedItemRow', this._id);
}
}
});