mirror of
https://github.com/wekan/wekan.git
synced 2025-12-17 16:00:13 +01:00
Triggers view
This commit is contained in:
parent
7e4bd4a0a7
commit
93cc7f0232
3 changed files with 170 additions and 10 deletions
|
|
@ -1,12 +1,15 @@
|
|||
|
||||
BlazeComponent.extendComponent({
|
||||
onCreated() {
|
||||
this.subscribe('allRules');
|
||||
this.rulesListVar = new ReactiveVar(true);
|
||||
this.rulesTriggerVar = new ReactiveVar(false);
|
||||
this.ruleName = new ReactiveVar("");
|
||||
},
|
||||
|
||||
rules() {
|
||||
return Rules.find({});
|
||||
setTrigger() {
|
||||
this.rulesListVar.set(false);
|
||||
this.rulesTriggerVar.set(true);
|
||||
},
|
||||
|
||||
events() {
|
||||
return [{'click .js-delete-rule'(event) {
|
||||
const rule = this.currentData();
|
||||
|
|
@ -19,7 +22,26 @@ BlazeComponent.extendComponent({
|
|||
const ruleTitle = this.find('#ruleTitle').value;
|
||||
Rules.insert({title: ruleTitle});
|
||||
this.find('#ruleTitle').value = "";
|
||||
|
||||
this.ruleName.set(ruleTitle)
|
||||
this.setTrigger();
|
||||
|
||||
}}];
|
||||
},
|
||||
|
||||
}).register('rules');
|
||||
|
||||
|
||||
BlazeComponent.extendComponent({
|
||||
onCreated() {
|
||||
this.subscribe('allRules');
|
||||
},
|
||||
|
||||
rules() {
|
||||
return Rules.find({});
|
||||
},
|
||||
events() {
|
||||
return [{}];
|
||||
},
|
||||
}).register('rules');
|
||||
}).register('rulesList');
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue