summaryrefslogtreecommitdiffstats
path: root/client/components/rules/triggers
diff options
context:
space:
mode:
authorAngelo Gallarello <angelo.gallarell@gmail.com>2018-12-30 22:08:34 +0100
committerAngelo Gallarello <angelo.gallarell@gmail.com>2018-12-30 22:08:34 +0100
commita2d756074f05299248944ecce2cc87a9a28ab020 (patch)
tree2c3e61af27e8cce64caea39a3e642a0eae18857c /client/components/rules/triggers
parentb2f23d619d1ff33e899080dca17d018f0e8d0963 (diff)
downloadwekan-a2d756074f05299248944ecce2cc87a9a28ab020.tar.gz
wekan-a2d756074f05299248944ecce2cc87a9a28ab020.tar.bz2
wekan-a2d756074f05299248944ecce2cc87a9a28ab020.zip
Added swimlane trigger
Diffstat (limited to 'client/components/rules/triggers')
-rw-r--r--client/components/rules/triggers/boardTriggers.jade35
-rw-r--r--client/components/rules/triggers/boardTriggers.js37
-rw-r--r--client/components/rules/triggers/cardTriggers.jade10
-rw-r--r--client/components/rules/triggers/checklistTriggers.jade12
4 files changed, 44 insertions, 50 deletions
diff --git a/client/components/rules/triggers/boardTriggers.jade b/client/components/rules/triggers/boardTriggers.jade
index b0f2b44f..abf2ee6d 100644
--- a/client/components/rules/triggers/boardTriggers.jade
+++ b/client/components/rules/triggers/boardTriggers.jade
@@ -3,10 +3,8 @@ template(name="boardTriggers")
div.trigger-content
div.trigger-text
| {{_'r-when-a-card-is'}}
- div.trigger-dropdown
- select(id="gen-action")
- option(value="created") {{_'r-added-to'}}
- option(value="removed") {{_'r-removed-from'}}
+ div.trigger-text
+ | {{_'r-added-to'}}
div.trigger-text
| {{_'r-the-board'}}
div.trigger-button.trigger-button-person.js-show-user-field
@@ -15,7 +13,7 @@ template(name="boardTriggers")
div.trigger-text
| {{_'r-by'}}
div.trigger-dropdown
- input(class="user-name",id="create-list-name",type=text,placeholder="{{_'r-user-name'}}")
+ input(class="user-name",type=text,placeholder="{{_'r-user-name'}}")
div.trigger-button.js-add-gen-trigger.js-goto-action
i.fa.fa-plus
@@ -23,21 +21,23 @@ template(name="boardTriggers")
div.trigger-content
div.trigger-text
| {{_'r-when-a-card-is'}}
- div.trigger-dropdown
- select(id="create-action")
- option(value="created") {{_'r-added-to'}}
- option(value="removed") {{_'r-removed-from'}}
+ div.trigger-text
+ | {{_'r-added-to'}}
div.trigger-text
| {{_'r-list'}}
div.trigger-dropdown
- input(id="create-list-name",type=text,placeholder="{{_'r-list-name'}}")
+ input(id="create-list-name",type=text,placeholder="{{_'r-list-name'}}")
+ div.trigger-text
+ | {{_'r-swimlane'}}
+ div.trigger-dropdown
+ input(id="create-swimlane-name",type=text,placeholder="{{_'r-swimlane-name'}}")
div.trigger-button.trigger-button-person.js-show-user-field
i.fa.fa-user
div.user-details.hide-element
div.trigger-text
| {{_'r-by'}}
div.trigger-dropdown
- input(class="user-name",id="create-list-name",type=text,placeholder="{{_'r-user-name'}}")
+ input(class="user-name",type=text,placeholder="{{_'r-user-name'}}")
div.trigger-button.js-add-create-trigger.js-goto-action
i.fa.fa-plus
@@ -51,7 +51,7 @@ template(name="boardTriggers")
div.trigger-text
| {{_'r-by'}}
div.trigger-dropdown
- input(class="user-name",id="create-list-name",type=text,placeholder="{{_'r-user-name'}}")
+ input(class="user-name",type=text,placeholder="{{_'r-user-name'}}")
div.trigger-button.js-add-gen-moved-trigger.js-goto-action
i.fa.fa-plus
@@ -66,14 +66,19 @@ template(name="boardTriggers")
div.trigger-text
| {{_'r-list'}}
div.trigger-dropdown
- input(id="move-list-name",type=text,placeholder="{{_'r-list-name'}}")
+ input(id="move-list-name",type=text,placeholder="{{_'r-list-name'}}")
+ div.trigger-text
+ | {{_'r-swimlane'}}
+ div.trigger-dropdown
+ input(id="create-swimlane-name",type=text,placeholder="{{_'r-swimlane-name'}}")
+ div.trigger-button.trigger-button-person.js-show-user-field
div.trigger-button.trigger-button-person.js-show-user-field
i.fa.fa-user
div.user-details.hide-element
div.trigger-text
| {{_'r-by'}}
div.trigger-dropdown
- input(class="user-name",id="create-list-name",type=text,placeholder="{{_'r-user-name'}}")
+ input(class="user-name",type=text,placeholder="{{_'r-user-name'}}")
div.trigger-button.js-add-moved-trigger.js-goto-action
i.fa.fa-plus
@@ -91,7 +96,7 @@ template(name="boardTriggers")
div.trigger-text
| {{_'r-by'}}
div.trigger-dropdown
- input(class="user-name",id="create-list-name",type=text,placeholder="{{_'r-user-name'}}")
+ input(class="user-name",type=text,placeholder="{{_'r-user-name'}}")
div.trigger-button.js-add-arch-trigger.js-goto-action
i.fa.fa-plus
diff --git a/client/components/rules/triggers/boardTriggers.js b/client/components/rules/triggers/boardTriggers.js
index 40c5b07e..b822d643 100644
--- a/client/components/rules/triggers/boardTriggers.js
+++ b/client/components/rules/triggers/boardTriggers.js
@@ -8,60 +8,48 @@ BlazeComponent.extendComponent({
'click .js-add-gen-trigger' (event) {
const desc = Utils.getTriggerActionDesc(event, this);
const datas = this.data();
- const actionSelected = this.find('#gen-action').value;
const boardId = Session.get('currentBoard');
- if (actionSelected === 'created') {
- datas.triggerVar.set({
+ datas.triggerVar.set({
activityType: 'createCard',
boardId,
'listName': '*',
desc,
});
- }
- if (actionSelected === 'removed') {
- datas.triggerVar.set({
- activityType: 'removeCard',
- boardId,
- desc,
- });
- }
},
'click .js-add-create-trigger' (event) {
const desc = Utils.getTriggerActionDesc(event, this);
const datas = this.data();
- const actionSelected = this.find('#create-action').value;
const listName = this.find('#create-list-name').value;
+ const swimlaneName = this.find('#create-swimlane-name').value;
+ if(swimlaneName == undefined || swimlaneName == ""){
+ swimlaneName = "*";
+ }
const boardId = Session.get('currentBoard');
- if (actionSelected === 'created') {
- datas.triggerVar.set({
+ datas.triggerVar.set({
activityType: 'createCard',
boardId,
+ swimlaneName,
listName,
desc,
});
- }
- if (actionSelected === 'removed') {
- datas.triggerVar.set({
- activityType: 'removeCard',
- boardId,
- listName,
- desc,
- });
- }
},
'click .js-add-moved-trigger' (event) {
const datas = this.data();
const desc = Utils.getTriggerActionDesc(event, this);
-
+ const swimlaneName = this.find('#create-swimlane-name').value;
const actionSelected = this.find('#move-action').value;
const listName = this.find('#move-list-name').value;
const boardId = Session.get('currentBoard');
+ if(swimlaneName == undefined || swimlaneName == ""){
+ swimlaneName = "*";
+ }
if (actionSelected === 'moved-to') {
datas.triggerVar.set({
activityType: 'moveCard',
boardId,
listName,
+ swimlaneName,
'oldListName': '*',
desc,
});
@@ -70,6 +58,7 @@ BlazeComponent.extendComponent({
datas.triggerVar.set({
activityType: 'moveCard',
boardId,
+ swimlaneName,
'listName': '*',
'oldListName': listName,
desc,
diff --git a/client/components/rules/triggers/cardTriggers.jade b/client/components/rules/triggers/cardTriggers.jade
index 52594986..54133451 100644
--- a/client/components/rules/triggers/cardTriggers.jade
+++ b/client/components/rules/triggers/cardTriggers.jade
@@ -15,7 +15,7 @@ template(name="cardTriggers")
div.trigger-text
| {{_'r-by'}}
div.trigger-dropdown
- input(class="user-name",id="create-list-name",type=text,placeholder="{{_'r-user-name'}}")
+ input(class="user-name",type=text,placeholder="{{_'r-user-name'}}")
div.trigger-button.js-add-gen-label-trigger.js-goto-action
i.fa.fa-plus
@@ -42,7 +42,7 @@ template(name="cardTriggers")
div.trigger-text
| {{_'r-by'}}
div.trigger-dropdown
- input(class="user-name",id="create-list-name",type=text,placeholder="{{_'r-user-name'}}")
+ input(class="user-name",type=text,placeholder="{{_'r-user-name'}}")
div.trigger-button.js-add-spec-label-trigger.js-goto-action
i.fa.fa-plus
@@ -62,7 +62,7 @@ template(name="cardTriggers")
div.trigger-text
| {{_'r-by'}}
div.trigger-dropdown
- input(class="user-name",id="create-list-name",type=text,placeholder="{{_'r-user-name'}}")
+ input(class="user-name",type=text,placeholder="{{_'r-user-name'}}")
div.trigger-button.js-add-gen-member-trigger.js-goto-action
i.fa.fa-plus
@@ -87,7 +87,7 @@ template(name="cardTriggers")
div.trigger-text
| {{_'r-by'}}
div.trigger-dropdown
- input(class="user-name",id="create-list-name",type=text,placeholder="{{_'r-user-name'}}")
+ input(class="user-name",type=text,placeholder="{{_'r-user-name'}}")
div.trigger-button.js-add-spec-member-trigger.js-goto-action
i.fa.fa-plus
@@ -109,6 +109,6 @@ template(name="cardTriggers")
div.trigger-text
| {{_'r-by'}}
div.trigger-dropdown
- input(class="user-name",id="create-list-name",type=text,placeholder="{{_'r-user-name'}}")
+ input(class="user-name",type=text,placeholder="{{_'r-user-name'}}")
div.trigger-button.js-add-attachment-trigger.js-goto-action
i.fa.fa-plus
diff --git a/client/components/rules/triggers/checklistTriggers.jade b/client/components/rules/triggers/checklistTriggers.jade
index a563e93b..8745b364 100644
--- a/client/components/rules/triggers/checklistTriggers.jade
+++ b/client/components/rules/triggers/checklistTriggers.jade
@@ -15,7 +15,7 @@ template(name="checklistTriggers")
div.trigger-text
| {{_'r-by'}}
div.trigger-dropdown
- input(class="user-name",id="create-list-name",type=text,placeholder="{{_'r-user-name'}}")
+ input(class="user-name",type=text,placeholder="{{_'r-user-name'}}")
div.trigger-button.js-add-gen-check-trigger.js-goto-action
i.fa.fa-plus
@@ -40,7 +40,7 @@ template(name="checklistTriggers")
div.trigger-text
| {{_'r-by'}}
div.trigger-dropdown
- input(class="user-name",id="create-list-name",type=text,placeholder="{{_'r-user-name'}}")
+ input(class="user-name",type=text,placeholder="{{_'r-user-name'}}")
div.trigger-button.js-add-spec-check-trigger.js-goto-action
i.fa.fa-plus
@@ -58,7 +58,7 @@ template(name="checklistTriggers")
div.trigger-text
| {{_'r-by'}}
div.trigger-dropdown
- input(class="user-name",id="create-list-name",type=text,placeholder="{{_'r-user-name'}}")
+ input(class="user-name",type=text,placeholder="{{_'r-user-name'}}")
div.trigger-button.js-add-gen-comp-trigger.js-goto-action
i.fa.fa-plus
@@ -80,7 +80,7 @@ template(name="checklistTriggers")
div.trigger-text
| {{_'r-by'}}
div.trigger-dropdown
- input(class="user-name",id="create-list-name",type=text,placeholder="{{_'r-user-name'}}")
+ input(class="user-name",type=text,placeholder="{{_'r-user-name'}}")
div.trigger-button.js-add-spec-comp-trigger.js-goto-action
i.fa.fa-plus
@@ -98,7 +98,7 @@ template(name="checklistTriggers")
div.trigger-text
| {{_'r-by'}}
div.trigger-dropdown
- input(class="user-name",id="create-list-name",type=text,placeholder="{{_'r-user-name'}}")
+ input(class="user-name",type=text,placeholder="{{_'r-user-name'}}")
div.trigger-button.js-add-gen-check-item-trigger.js-goto-action
i.fa.fa-plus
@@ -120,6 +120,6 @@ template(name="checklistTriggers")
div.trigger-text
| {{_'r-by'}}
div.trigger-dropdown
- input(class="user-name",id="create-list-name",type=text,placeholder="{{_'r-user-name'}}")
+ input(class="user-name",type=text,placeholder="{{_'r-user-name'}}")
div.trigger-button.js-add-spec-check-item-trigger.js-goto-action
i.fa.fa-plus