Implemented basic inventory
This commit is contained in:
15
rpg-docs/client/views/inventory/itemRow/itemRow.js
Normal file
15
rpg-docs/client/views/inventory/itemRow/itemRow.js
Normal 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);
|
||||
}
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user