Moved views out of private folder
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
<template name="classDialog">
|
||||
{{#with class}}
|
||||
{{#baseDialog title=name class=colorClass startEditing=../startEditing}}
|
||||
<div layout vertical center>
|
||||
<div class="display2">
|
||||
{{level}}
|
||||
</div>
|
||||
<div>
|
||||
level
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{> effectsViewList charId=charId parentId=_id}}
|
||||
{{> proficiencyViewList charId=charId parentId=_id}}
|
||||
{{else}}
|
||||
<!--Name-->
|
||||
<paper-input id="classNameInput" label="Class Name" floatinglabel value={{name}}></paper-input>
|
||||
<!--Level-->
|
||||
<paper-input id="levelValueInput" label="Level" floatinglabel value={{level}}></paper-input>
|
||||
<!--Effects-->
|
||||
{{> effectsEditList parentId=_id parentCollection="Classes" charId=charId}}
|
||||
{{> proficiencyEditList parentId=_id parentCollection="Classes" charId=charId}}
|
||||
{{/baseDialog}}
|
||||
{{/with}}
|
||||
</template>
|
||||
@@ -0,0 +1,28 @@
|
||||
Template.classDialog.onRendered(function(){
|
||||
updatePolymerInputs(this);
|
||||
});
|
||||
|
||||
Template.classDialog.events({
|
||||
"color-change": function(event, instance){
|
||||
Classes.update(instance.data.classId, {$set: {color: event.color}});
|
||||
},
|
||||
"tap #deleteButton": function(event, instance){
|
||||
Classes.softRemoveNode(instance.data.classId);
|
||||
GlobalUI.deletedToast(instance.data.classId, "Classes", "Class");
|
||||
GlobalUI.closeDetail();
|
||||
},
|
||||
"change #classNameInput": function(event){
|
||||
var value = event.currentTarget.value;
|
||||
Classes.update(this._id, {$set: {name: value}});
|
||||
},
|
||||
"change #levelValueInput": function(event){
|
||||
var value = event.currentTarget.value;
|
||||
Classes.update(this._id, {$set: {level: value}});
|
||||
},
|
||||
});
|
||||
|
||||
Template.classDialog.helpers({
|
||||
class: function(){
|
||||
return Classes.findOne(this.classId);
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user