Changed item detail to a detail view with the option to edit

This commit is contained in:
Thaum
2015-04-16 09:00:48 +00:00
parent 690eea4f29
commit 638209719e
9 changed files with 194 additions and 79 deletions

View File

@@ -71,10 +71,10 @@ var stats = {
};
var operations = {
base: {name: "Base Value"},
base: {name: "Base Value"},
proficiency: {name: "Proficiency"},
add: {name: "Add"},
mul: {name: "Multiply"},
add: {name: "+"},
mul: {name: "x"},
min: {name: "Min"},
max: {name: "Max"},
advantage: {name: "Advantage"},
@@ -100,16 +100,16 @@ Template.effectView.helpers({
case "Characters":
return Characters.findOne(this.charId, {fields: {race: 1}}).race;
default:
return "Inate"
return "Inate";
}
},
statName: function(){
return stats[this.stat] && stats[this.stat].name || "No Stat"
return stats[this.stat] && stats[this.stat].name || "No Stat";
},
operationName: function(){
if(this.operation === "proficiency") return null;
if(stats[this.stat].group === "Weakness/Resistance") return null;
return operations[this.operation] && operations[this.operation].name || "No Operation"
return operations[this.operation] && operations[this.operation].name || "No Operation";
},
statValue: function(){
if(this.operation === "advantage" ||