implemented UI for new parenting
This commit is contained in:
@@ -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;">
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user