diff options
author | Angelo Gallarello <angelo.gallarell@gmail.com> | 2018-08-19 18:53:50 +0200 |
---|---|---|
committer | Angelo Gallarello <angelo.gallarell@gmail.com> | 2018-08-19 18:53:50 +0200 |
commit | 1f5f429fc4535d251d32335eea7e44904a924650 (patch) | |
tree | e9f9b439227392ff5c8373594864890dbe4b1da7 /client/components/rules/triggers/boardTriggers.js | |
parent | 3b62b5ec5dd34eec323c14d466fe07e34287e7b0 (diff) | |
download | wekan-1f5f429fc4535d251d32335eea7e44904a924650.tar.gz wekan-1f5f429fc4535d251d32335eea7e44904a924650.tar.bz2 wekan-1f5f429fc4535d251d32335eea7e44904a924650.zip |
Completed rules
Diffstat (limited to 'client/components/rules/triggers/boardTriggers.js')
-rw-r--r-- | client/components/rules/triggers/boardTriggers.js | 32 |
1 files changed, 8 insertions, 24 deletions
diff --git a/client/components/rules/triggers/boardTriggers.js b/client/components/rules/triggers/boardTriggers.js index 49c00c16..dcc1c187 100644 --- a/client/components/rules/triggers/boardTriggers.js +++ b/client/components/rules/triggers/boardTriggers.js @@ -11,14 +11,10 @@ BlazeComponent.extendComponent({ const actionSelected = this.find('#gen-action').value; const boardId = Session.get('currentBoard') if(actionSelected == "created"){ - Triggers.insert({activityType: "createCard","boardId":boardId,"listName":"*"},function(error,id){ - datas.triggerIdVar.set(id); - }); + datas.triggerVar.set({activityType: "createCard","boardId":boardId,"listName":"*"}); } if(actionSelected == "removed"){ - Triggers.insert({activityType: "removeCard","boardId":boardId},function(error,id){ - datas.triggerIdVar.set(id); - }); + datas.triggerVar.set({activityType: "removeCard","boardId":boardId}); } }, 'click .js-add-create-trigger'(event) { @@ -28,14 +24,10 @@ BlazeComponent.extendComponent({ const listName = this.find('#create-list-name').value; const boardId = Session.get('currentBoard') if(actionSelected == "created"){ - Triggers.insert({activityType: "createCard","boardId":boardId,"listName":listName},function(error,id){ - datas.triggerIdVar.set(id); - }); + datas.triggerVar.set({activityType: "createCard","boardId":boardId,"listName":listName}); } if(actionSelected == "removed"){ - Triggers.insert({activityType: "removeCard","boardId":boardId,"listName":listName},function(error,id){ - datas.triggerIdVar.set(id); - }); + datas.triggerVar.set({activityType: "removeCard","boardId":boardId,"listName":listName}); } }, 'click .js-add-moved-trigger'(event) { @@ -44,14 +36,10 @@ BlazeComponent.extendComponent({ const listName = this.find('#move-list-name').value; const boardId = Session.get('currentBoard') if(actionSelected == "moved-to"){ - Triggers.insert({activityType: "moveCard","boardId":boardId,"listName":listName,"oldListName":"*"},function(error,id){ - datas.triggerIdVar.set(id); - }); + datas.triggerVar.set({activityType: "moveCard","boardId":boardId,"listName":listName,"oldListName":"*"}); } if(actionSelected == "moved-from"){ - Triggers.insert({activityType: "moveCard","boardId":boardId,"listName":"*","oldListName":listName},function(error,id){ - datas.triggerIdVar.set(id); - }); + datas.triggerVar.set({activityType: "moveCard","boardId":boardId,"listName":"*","oldListName":listName}); } }, 'click .js-add-arc-trigger'(event) { @@ -59,14 +47,10 @@ BlazeComponent.extendComponent({ const actionSelected = this.find('#arch-action').value; const boardId = Session.get('currentBoard') if(actionSelected == "archived"){ - Triggers.insert({activityType: "archivedCard","boardId":boardId},function(error,id){ - datas.triggerIdVar.set(id); - }); + datas.triggerVar.set({activityType: "archivedCard","boardId":boardId}); } if(actionSelected == "unarchived"){ - Triggers.insert({activityType: "restoredCard","boardId":boardId},function(error,id){ - datas.triggerIdVar.set(id); - }); + datas.triggerVar.set({activityType: "restoredCard","boardId":boardId}); } } |