Generalised some dialogs
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
<!--needs to be given charId, sourceId and type-->
|
||||
<template name="effectsEditList">
|
||||
{{#if effects}}
|
||||
<hr style="margin: 16px 0 16px 0;">
|
||||
<div id="effects">
|
||||
<h2>Effects</h2>
|
||||
{{#each effects}}
|
||||
{{>effectEdit}}
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/if}}
|
||||
<div layout horizontal end-justified>
|
||||
<paper-button id="addEffectButton" raised>Add Effect</paper-button>
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,17 @@
|
||||
Template.effectsEditList.helpers({
|
||||
effects: function(){
|
||||
var cursor = Effects.find({sourceId: this.sourceId});
|
||||
return cursor;
|
||||
}
|
||||
});
|
||||
|
||||
Template.effectsEditList.events({
|
||||
"tap #addEffectButton": function(){
|
||||
Effects.insert({
|
||||
charId: this.charId,
|
||||
sourceId: this.sourceId,
|
||||
operation: "add",
|
||||
type: this.type
|
||||
});
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user