Moved views out of private folder
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
<template name="raceDialog">
|
||||
{{#baseDialog title="Race" class=color hideColor="true" hideDelete="true" startEditing=startEditing}}
|
||||
<div horizontal layout center-justified class= "display2">
|
||||
{{race}}
|
||||
</div>
|
||||
{{> effectsViewList charId=charId parentId=charId parentGroup="racial"}}
|
||||
{{> proficiencyViewList charId=charId parentId=charId parentGroup="racial"}}
|
||||
{{else}}
|
||||
<paper-input id="raceInput" label="Race" floatinglabel value={{race}}></paper-input>
|
||||
{{> effectsEditList parentId=charId parentCollection="Characters" charId=charId parentGroup="racial"}}
|
||||
{{> proficiencyEditList parentId=charId parentCollection="Characters" charId=charId parentGroup="racial"}}
|
||||
{{/baseDialog}}
|
||||
</template>
|
||||
@@ -0,0 +1,21 @@
|
||||
Template.raceDialog.onRendered(function(){
|
||||
updatePolymerInputs(this);
|
||||
});
|
||||
|
||||
Template.raceDialog.events({
|
||||
"change #raceInput": function(event){
|
||||
var value = event.currentTarget.value;
|
||||
Characters.update(this.charId, {$set: {race: value}});
|
||||
}
|
||||
});
|
||||
|
||||
Template.raceDialog.helpers({
|
||||
race: function(){
|
||||
var char = Characters.findOne(this.charId, {fields: {race: 1}});
|
||||
return char && char.race;
|
||||
},
|
||||
color: function() {
|
||||
var char = Characters.findOne(this.charId, {fields: {color: 1}});
|
||||
if (char) return getColorClass(char.color);
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user