Implemented Features and Items granting effects, actions, attacks and spells
This commit is contained in:
@@ -1,10 +0,0 @@
|
||||
<template name="containerTable">
|
||||
<div>
|
||||
<h3>{{name}}</h3>
|
||||
<table>
|
||||
{{#each items}}
|
||||
{{> itemRow}}
|
||||
{{/each}}
|
||||
</table>
|
||||
</div>
|
||||
</template>
|
||||
@@ -1,5 +0,0 @@
|
||||
Template.containerTable.helpers({
|
||||
items: function(){
|
||||
return Items.find({container: this._id});
|
||||
}
|
||||
});
|
||||
@@ -1,6 +1,20 @@
|
||||
<template name="inventory">
|
||||
<div class="flexItem floatBox">
|
||||
<h2>Inventory</h2>
|
||||
{{> inventoryTables}}
|
||||
<paper-shadow class="equipment">
|
||||
Armor: {{#if equippedArmor}}{{equippedArmor}}{{else}}None{{/if}}
|
||||
</paper-shadow>
|
||||
<div class="containers">
|
||||
{{#each containers}}
|
||||
<paper-shadow>
|
||||
<h3>{{name}}</h3>
|
||||
<table>
|
||||
{{#each items}}
|
||||
<tr class={{#if isSelected}}selected{{/if}}>
|
||||
<td>{{#if stackable}}{{quantity}}{{/if}}</td>
|
||||
<td>{{pluralName}}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</table>
|
||||
</paper-shadow>
|
||||
{{/each}}
|
||||
</div>
|
||||
</template>
|
||||
@@ -1,5 +0,0 @@
|
||||
<template name="inventoryTables">
|
||||
{{#each containers}}
|
||||
{{> containerTable}}
|
||||
{{/each}}
|
||||
</template>
|
||||
@@ -1,5 +0,0 @@
|
||||
Template.inventoryTables.helpers({
|
||||
containers: function(){
|
||||
return Containers.find({owner: this._id});
|
||||
}
|
||||
});
|
||||
@@ -1,3 +0,0 @@
|
||||
tr.selected{
|
||||
background-color: #4182BC;
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
<template name="itemRow">
|
||||
<tr class={{#if isSelected}}selected{{/if}}>
|
||||
<td>{{#if stackable}}{{quantity}}{{/if}}</td>
|
||||
<td>{{pluralName}}</td>
|
||||
</tr>
|
||||
</template>
|
||||
@@ -1,15 +0,0 @@
|
||||
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