diff options
author | Angelo Gallarello <angelo.gallarell@gmail.com> | 2018-08-15 18:47:09 +0200 |
---|---|---|
committer | Angelo Gallarello <angelo.gallarell@gmail.com> | 2018-08-15 18:47:09 +0200 |
commit | 9b0eb0a9f1973e05df7199cf2bff7518f2fa98dc (patch) | |
tree | a8a8aac97c9c8103f30d9ec2cd0c4cb0c0fc2396 /client/components/rules/triggers/boardTriggers.js | |
parent | 93cc7f0232ee456aff07e456b9c4601264f47ab4 (diff) | |
download | wekan-9b0eb0a9f1973e05df7199cf2bff7518f2fa98dc.tar.gz wekan-9b0eb0a9f1973e05df7199cf2bff7518f2fa98dc.tar.bz2 wekan-9b0eb0a9f1973e05df7199cf2bff7518f2fa98dc.zip |
Almost full circle
Diffstat (limited to 'client/components/rules/triggers/boardTriggers.js')
-rw-r--r-- | client/components/rules/triggers/boardTriggers.js | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/client/components/rules/triggers/boardTriggers.js b/client/components/rules/triggers/boardTriggers.js new file mode 100644 index 00000000..4c8594d3 --- /dev/null +++ b/client/components/rules/triggers/boardTriggers.js @@ -0,0 +1,28 @@ +BlazeComponent.extendComponent({ + onCreated() { + + }, + + events() { + return [ + {'click .js-add-gen-trigger'(event) { + + let datas = this.data(); + const actionSelected = this.find('#action').value; + const boardId = Session.get('currentBoard') + if(actionSelected == "created"){ + Triggers.insert({activityType: "createCard","boardId":boardId},function(error,id){ + datas.triggerIdVar.set(id); + }); + } + if(actionSelected == "removed"){ + Triggers.insert({activityType: "removeCard","boardId":boardId},function(error,id){ + datas.triggerIdVar.set(id); + }); + } + + }, + }]; + }, + +}).register('boardTriggers');
\ No newline at end of file |