diff options
author | Lauri Ojansivu <x@xet7.org> | 2019-01-22 13:02:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-22 13:02:14 +0200 |
commit | 0c5052ebaee74d6357634e28919ff81c52a0a0e8 (patch) | |
tree | 09342c3b76d839c9836d72ae0fb9f0559c2fe9d3 /client/components/rules/actions/cardActions.js | |
parent | d3b2ae1975a72b3be816538059d9c3dc6684a59d (diff) | |
parent | f4f0f489ebf9e23dc8150d5a94239484256b0beb (diff) | |
download | wekan-0c5052ebaee74d6357634e28919ff81c52a0a0e8.tar.gz wekan-0c5052ebaee74d6357634e28919ff81c52a0a0e8.tar.bz2 wekan-0c5052ebaee74d6357634e28919ff81c52a0a0e8.zip |
Merge pull request #2116 from bentiss/color
Add per card color
Diffstat (limited to 'client/components/rules/actions/cardActions.js')
-rw-r--r-- | client/components/rules/actions/cardActions.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/client/components/rules/actions/cardActions.js b/client/components/rules/actions/cardActions.js index b04440bd..b66556b4 100644 --- a/client/components/rules/actions/cardActions.js +++ b/client/components/rules/actions/cardActions.js @@ -112,6 +112,26 @@ BlazeComponent.extendComponent({ boardId, }); }, + 'click .js-set-color-action' (event) { + const ruleName = this.data().ruleName.get(); + const trigger = this.data().triggerVar.get(); + const selectedColor = this.find('#color-action').value; + const boardId = Session.get('currentBoard'); + const desc = Utils.getTriggerActionDesc(event, this); + const triggerId = Triggers.insert(trigger); + const actionId = Actions.insert({ + actionType: 'setColor', + selectedColor, + boardId, + desc, + }); + Rules.insert({ + title: ruleName, + triggerId, + actionId, + boardId, + }); + }, }]; }, |