summaryrefslogtreecommitdiffstats
path: root/client/components/rules/triggers
diff options
context:
space:
mode:
authorAngelo Gallarello <angelo.gallarell@gmail.com>2018-08-15 18:47:09 +0200
committerAngelo Gallarello <angelo.gallarell@gmail.com>2018-08-15 18:47:09 +0200
commit9b0eb0a9f1973e05df7199cf2bff7518f2fa98dc (patch)
treea8a8aac97c9c8103f30d9ec2cd0c4cb0c0fc2396 /client/components/rules/triggers
parent93cc7f0232ee456aff07e456b9c4601264f47ab4 (diff)
downloadwekan-9b0eb0a9f1973e05df7199cf2bff7518f2fa98dc.tar.gz
wekan-9b0eb0a9f1973e05df7199cf2bff7518f2fa98dc.tar.bz2
wekan-9b0eb0a9f1973e05df7199cf2bff7518f2fa98dc.zip
Almost full circle
Diffstat (limited to 'client/components/rules/triggers')
-rw-r--r--client/components/rules/triggers/boardTriggers.jade45
-rw-r--r--client/components/rules/triggers/boardTriggers.js28
-rw-r--r--client/components/rules/triggers/cardTriggers.jade10
-rw-r--r--client/components/rules/triggers/checklistTriggers.jade10
4 files changed, 93 insertions, 0 deletions
diff --git a/client/components/rules/triggers/boardTriggers.jade b/client/components/rules/triggers/boardTriggers.jade
new file mode 100644
index 00000000..8b0b9489
--- /dev/null
+++ b/client/components/rules/triggers/boardTriggers.jade
@@ -0,0 +1,45 @@
+template(name="boardTriggers")
+ div.trigger-item
+ div.trigger-content
+ div.trigger-text
+ | When a card is
+ div.trigger-dropdown
+ select(id="action")
+ option(value="created") Added to
+ option(value="removed") Removed from
+ div.trigger-text
+ | the board
+ div.trigger-button.js-add-gen-trigger.js-goto-action
+ i.fa.fa-plus
+
+ div.trigger-item
+ div.trigger-content
+ div.trigger-text
+ | When a card is
+ div.trigger-dropdown
+ select
+ option Moved to
+ div.trigger-text
+ | to list
+ div.trigger-dropdown
+ input(type=text,placeholder="List Name")
+ div.trigger-button.js-add-spec-trigger.js-goto-action
+ i.fa.fa-plus
+
+ div.trigger-item
+ div.trigger-content
+ div.trigger-text
+ | When a card is
+ div.trigger-dropdown
+ select
+ option Archived
+ option Unarchived
+ div.trigger-button.js-add-arc-trigger.js-goto-action
+ i.fa.fa-plus
+
+
+
+
+
+
+
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
diff --git a/client/components/rules/triggers/cardTriggers.jade b/client/components/rules/triggers/cardTriggers.jade
new file mode 100644
index 00000000..c1a42ab5
--- /dev/null
+++ b/client/components/rules/triggers/cardTriggers.jade
@@ -0,0 +1,10 @@
+template(name="cardTriggers")
+ div.trigger-item
+ div.trigger-content
+ div.trigger-text
+ | When a label is
+ div.trigger-dropdown
+ select
+ option Moved to
+ div.trigger-button
+ i.fa.fa-plus \ No newline at end of file
diff --git a/client/components/rules/triggers/checklistTriggers.jade b/client/components/rules/triggers/checklistTriggers.jade
new file mode 100644
index 00000000..7364bfa7
--- /dev/null
+++ b/client/components/rules/triggers/checklistTriggers.jade
@@ -0,0 +1,10 @@
+template(name="checklistTriggers")
+ div.trigger-item
+ div.trigger-content
+ div.trigger-text
+ | When a check is
+ div.trigger-dropdown
+ select
+ option Checked
+ div.trigger-button
+ i.fa.fa-plus \ No newline at end of file