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/actions/boardActions.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/actions/boardActions.js')
-rw-r--r-- | client/components/rules/actions/boardActions.js | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/client/components/rules/actions/boardActions.js b/client/components/rules/actions/boardActions.js new file mode 100644 index 00000000..53325ca0 --- /dev/null +++ b/client/components/rules/actions/boardActions.js @@ -0,0 +1,32 @@ +BlazeComponent.extendComponent({ + onCreated() { + + }, + + + + events() { + return [ + {'click .js-add-move-action'(event) { + + console.log(this.data()); + console.log(this.data().triggerIdVar.get()); + const ruleName = this.data().ruleName.get(); + const triggerId = this.data().triggerIdVar.get(); + const actionSelected = this.find('#action').value; + + if(actionSelected == "top"){ + Actions.insert({actionType: "moveCardToTop"},function(err,id){ + Rules.insert({title: ruleName, triggerId: triggerId, actionId: id}); + }); + } + if(actionSelected == "bottom"){ + Actions.insert({actionType: "moveCardToBottom"},function(err,id){ + Rules.insert({title: ruleName, triggerId: triggerId, actionId: id}); + }); + } + }, + }]; +}, + +}).register('boardActions');
\ No newline at end of file |