mirror of
https://github.com/wekan/wekan.git
synced 2026-02-14 12:14:21 +01:00
Almost full circle
This commit is contained in:
parent
93cc7f0232
commit
9b0eb0a9f1
24 changed files with 492 additions and 165 deletions
22
client/components/rules/actions/boardActions.jade
Normal file
22
client/components/rules/actions/boardActions.jade
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
template(name="boardActions")
|
||||
div.trigger-item
|
||||
div.trigger-content
|
||||
div.trigger-text
|
||||
| Move card to
|
||||
div.trigger-dropdown
|
||||
select(id="action")
|
||||
option(value="top") Top of
|
||||
option(value="bottom") Bottom of
|
||||
div.trigger-text
|
||||
| list
|
||||
div.trigger-dropdown
|
||||
input(type=text,placeholder="List Name")
|
||||
div.trigger-button.js-add-move-action.js-goto-rules
|
||||
i.fa.fa-plus
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
32
client/components/rules/actions/boardActions.js
Normal file
32
client/components/rules/actions/boardActions.js
Normal file
|
|
@ -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');
|
||||
Loading…
Add table
Add a link
Reference in a new issue