implemented UI for new parenting

This commit is contained in:
Thaum
2015-03-20 09:12:38 +00:00
parent ecc43752aa
commit 48f8cef928
23 changed files with 126 additions and 99 deletions

View File

@@ -1,4 +1,4 @@
<!--needs to be given charId, sourceId and type-->
<!--needs to be given charId, parentId, parentCollection and type-->
<template name="effectsEditList">
{{#if effects.count}}
<hr style="margin: 16px 0 16px 0;">

View File

@@ -1,6 +1,6 @@
Template.effectsEditList.helpers({
effects: function(){
var cursor = Effects.find({sourceId: this.sourceId, type: this.type});
var cursor = Effects.find({"parent.id": this.parentId, "parent.collection": this.parentCollection, type: this.type});
return cursor;
}
});
@@ -13,7 +13,10 @@ Template.effectsEditList.events({
Effects.insert({
name: this.name,
charId: this.charId,
sourceId: this.sourceId,
parent: {
id: this.parentId,
collection: this.parentCollection
},
operation: "add",
type: this.type,
enabled: this.enabled