mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 15:30:13 +01:00
28 lines
No EOL
690 B
JavaScript
28 lines
No EOL
690 B
JavaScript
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'); |