Files
DiceCloud/rpg-docs/client/views/character/proficiencies/proficiencyListItem/proficiencyListItem.js
2017-01-31 09:58:35 +02:00

25 lines
621 B
JavaScript

Template.proficiencyListItem.helpers({
profIcon: function(){
var prof = this.value;
if (prof > 0 && prof < 1) return "image:brightness-2";
if (prof === 1) return "image:brightness-1";
if (prof > 1) return "av:album";
return "radio-button-off";
},
getName: function(){
if (this.type === "skill") return skills[this.name];
if (this.type === "save") return saves[this.name];
return this.name;
},
});
Template.proficiencyListItem.events({
"click .proficiency": function(event, instance){
openParentDialog({
parent: this.parent,
charId: this.charId,
element: event.currentTarget,
});
}
});