Generalised some dialogs

This commit is contained in:
Thaum
2015-02-27 06:14:34 +00:00
parent 56f8e95d81
commit 040d5a514b
50 changed files with 532 additions and 954 deletions

View File

@@ -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>

View File

@@ -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
});
},
});