mirror of
https://github.com/wekan/wekan.git
synced 2026-03-05 13:20:15 +01:00
Fix lint errors.
This commit is contained in:
parent
b3a752ef34
commit
df84a2be9a
34 changed files with 991 additions and 999 deletions
|
|
@ -2,28 +2,28 @@ template(name="boardActions")
|
|||
div.trigger-item
|
||||
div.trigger-content
|
||||
div.trigger-text
|
||||
| {{{_'r-move-card-to'}}}
|
||||
| {{_'r-move-card-to'}}
|
||||
div.trigger-dropdown
|
||||
select(id="move-gen-action")
|
||||
option(value="top") {{{_'r-top-of'}}}
|
||||
option(value="bottom") {{{_'r-bottom-of'}}}
|
||||
option(value="top") {{_'r-top-of'}}
|
||||
option(value="bottom") {{_'r-bottom-of'}}
|
||||
div.trigger-text
|
||||
| {{{_'r-its-list'}}}
|
||||
| {{_'r-its-list'}}
|
||||
div.trigger-button.js-add-gen-move-action.js-goto-rules
|
||||
i.fa.fa-plus
|
||||
|
||||
div.trigger-item
|
||||
div.trigger-content
|
||||
div.trigger-text
|
||||
| {{{_'r-move-card-to'}}}
|
||||
| {{_'r-move-card-to'}}
|
||||
div.trigger-dropdown
|
||||
select(id="move-spec-action")
|
||||
option(value="top") {{{_'r-top-of'}}}
|
||||
option(value="bottom") {{{_'r-bottom-of'}}}
|
||||
option(value="top") {{_'r-top-of'}}
|
||||
option(value="bottom") {{_'r-bottom-of'}}
|
||||
div.trigger-text
|
||||
| {{{_'r-list'}}}
|
||||
| {{_'r-list'}}
|
||||
div.trigger-dropdown
|
||||
input(id="listName",type=text,placeholder="{{{_'r-name'}}}")
|
||||
input(id="listName",type=text,placeholder="{{_'r-name'}}")
|
||||
div.trigger-button.js-add-spec-move-action.js-goto-rules
|
||||
i.fa.fa-plus
|
||||
|
||||
|
|
@ -31,10 +31,10 @@ template(name="boardActions")
|
|||
div.trigger-content
|
||||
div.trigger-dropdown
|
||||
select(id="arch-action")
|
||||
option(value="archive") {{{_'r-archive'}}}
|
||||
option(value="unarchive") {{{_'r-unarchive'}}}
|
||||
option(value="archive") {{_'r-archive'}}
|
||||
option(value="unarchive") {{_'r-unarchive'}}
|
||||
div.trigger-text
|
||||
| {{{_'r-card'}}}
|
||||
| {{_'r-card'}}
|
||||
div.trigger-button.js-add-arch-action.js-goto-rules
|
||||
i.fa.fa-plus
|
||||
|
||||
|
|
|
|||
|
|
@ -12,34 +12,34 @@ BlazeComponent.extendComponent({
|
|||
const listTitle = this.find('#listName').value;
|
||||
const boardId = Session.get('currentBoard');
|
||||
const desc = Utils.getTriggerActionDesc(event, this);
|
||||
if (actionSelected == "top") {
|
||||
if (actionSelected === 'top') {
|
||||
const triggerId = Triggers.insert(trigger);
|
||||
const actionId = Actions.insert({
|
||||
actionType: "moveCardToTop",
|
||||
"listTitle": listTitle,
|
||||
"boardId": boardId,
|
||||
"desc": desc
|
||||
actionType: 'moveCardToTop',
|
||||
listTitle,
|
||||
boardId,
|
||||
desc,
|
||||
});
|
||||
Rules.insert({
|
||||
title: ruleName,
|
||||
triggerId: triggerId,
|
||||
actionId: actionId,
|
||||
"boardId": boardId
|
||||
triggerId,
|
||||
actionId,
|
||||
boardId,
|
||||
});
|
||||
}
|
||||
if (actionSelected == "bottom") {
|
||||
if (actionSelected === 'bottom') {
|
||||
const triggerId = Triggers.insert(trigger);
|
||||
const actionId = Actions.insert({
|
||||
actionType: "moveCardToBottom",
|
||||
"listTitle": listTitle,
|
||||
"boardId": boardId,
|
||||
"desc": desc
|
||||
actionType: 'moveCardToBottom',
|
||||
listTitle,
|
||||
boardId,
|
||||
desc,
|
||||
});
|
||||
Rules.insert({
|
||||
title: ruleName,
|
||||
triggerId: triggerId,
|
||||
actionId: actionId,
|
||||
"boardId": boardId
|
||||
triggerId,
|
||||
actionId,
|
||||
boardId,
|
||||
});
|
||||
}
|
||||
},
|
||||
|
|
@ -49,34 +49,34 @@ BlazeComponent.extendComponent({
|
|||
const ruleName = this.data().ruleName.get();
|
||||
const trigger = this.data().triggerVar.get();
|
||||
const actionSelected = this.find('#move-gen-action').value;
|
||||
if (actionSelected == "top") {
|
||||
if (actionSelected === 'top') {
|
||||
const triggerId = Triggers.insert(trigger);
|
||||
const actionId = Actions.insert({
|
||||
actionType: "moveCardToTop",
|
||||
"listTitle": "*",
|
||||
"boardId": boardId,
|
||||
"desc": desc
|
||||
actionType: 'moveCardToTop',
|
||||
'listTitle': '*',
|
||||
boardId,
|
||||
desc,
|
||||
});
|
||||
Rules.insert({
|
||||
title: ruleName,
|
||||
triggerId: triggerId,
|
||||
actionId: actionId,
|
||||
"boardId": boardId
|
||||
triggerId,
|
||||
actionId,
|
||||
boardId,
|
||||
});
|
||||
}
|
||||
if (actionSelected == "bottom") {
|
||||
if (actionSelected === 'bottom') {
|
||||
const triggerId = Triggers.insert(trigger);
|
||||
const actionId = Actions.insert({
|
||||
actionType: "moveCardToBottom",
|
||||
"listTitle": "*",
|
||||
"boardId": boardId,
|
||||
"desc": desc
|
||||
actionType: 'moveCardToBottom',
|
||||
'listTitle': '*',
|
||||
boardId,
|
||||
desc,
|
||||
});
|
||||
Rules.insert({
|
||||
title: ruleName,
|
||||
triggerId: triggerId,
|
||||
actionId: actionId,
|
||||
"boardId": boardId
|
||||
triggerId,
|
||||
actionId,
|
||||
boardId,
|
||||
});
|
||||
}
|
||||
},
|
||||
|
|
@ -86,36 +86,37 @@ BlazeComponent.extendComponent({
|
|||
const ruleName = this.data().ruleName.get();
|
||||
const trigger = this.data().triggerVar.get();
|
||||
const actionSelected = this.find('#arch-action').value;
|
||||
if (actionSelected == "archive") {
|
||||
if (actionSelected === 'archive') {
|
||||
const triggerId = Triggers.insert(trigger);
|
||||
const actionId = Actions.insert({
|
||||
actionType: "archive",
|
||||
"boardId": boardId,
|
||||
"desc": desc
|
||||
actionType: 'archive',
|
||||
boardId,
|
||||
desc,
|
||||
});
|
||||
Rules.insert({
|
||||
title: ruleName,
|
||||
triggerId: triggerId,
|
||||
actionId: actionId,
|
||||
"boardId": boardId
|
||||
triggerId,
|
||||
actionId,
|
||||
boardId,
|
||||
});
|
||||
}
|
||||
if (actionSelected == "unarchive") {
|
||||
if (actionSelected === 'unarchive') {
|
||||
const triggerId = Triggers.insert(trigger);
|
||||
const actionId = Actions.insert({
|
||||
actionType: "unarchive",
|
||||
"boardId": boardId,
|
||||
"desc": desc
|
||||
actionType: 'unarchive',
|
||||
boardId,
|
||||
desc,
|
||||
});
|
||||
Rules.insert({
|
||||
title: ruleName,
|
||||
triggerId: triggerId,
|
||||
actionId: actionId,
|
||||
"boardId": boardId
|
||||
triggerId,
|
||||
actionId,
|
||||
boardId,
|
||||
});
|
||||
}
|
||||
},
|
||||
}];
|
||||
},
|
||||
|
||||
}).register('boardActions');
|
||||
}).register('boardActions');
|
||||
/* eslint-no-undef */
|
||||
|
|
|
|||
|
|
@ -6,11 +6,10 @@ BlazeComponent.extendComponent({
|
|||
labels() {
|
||||
const labels = Boards.findOne(Session.get('currentBoard')).labels;
|
||||
for (let i = 0; i < labels.length; i++) {
|
||||
if (labels[i].name == "" || labels[i].name == undefined) {
|
||||
if (labels[i].name === '' || labels[i].name === undefined) {
|
||||
labels[i].name = labels[i].color.toUpperCase();
|
||||
}
|
||||
}
|
||||
console.log(labels);
|
||||
return labels;
|
||||
},
|
||||
|
||||
|
|
@ -23,34 +22,34 @@ BlazeComponent.extendComponent({
|
|||
const labelId = this.find('#label-id').value;
|
||||
const boardId = Session.get('currentBoard');
|
||||
const desc = Utils.getTriggerActionDesc(event, this);
|
||||
if (actionSelected == "add") {
|
||||
if (actionSelected === 'add') {
|
||||
const triggerId = Triggers.insert(trigger);
|
||||
const actionId = Actions.insert({
|
||||
actionType: "addLabel",
|
||||
"labelId": labelId,
|
||||
"boardId": boardId,
|
||||
"desc": desc
|
||||
actionType: 'addLabel',
|
||||
labelId,
|
||||
boardId,
|
||||
desc,
|
||||
});
|
||||
Rules.insert({
|
||||
title: ruleName,
|
||||
triggerId: triggerId,
|
||||
actionId: actionId,
|
||||
"boardId": boardId
|
||||
triggerId,
|
||||
actionId,
|
||||
boardId,
|
||||
});
|
||||
}
|
||||
if (actionSelected == "remove") {
|
||||
if (actionSelected === 'remove') {
|
||||
const triggerId = Triggers.insert(trigger);
|
||||
const actionId = Actions.insert({
|
||||
actionType: "removeLabel",
|
||||
"labelId": labelId,
|
||||
"boardId": boardId,
|
||||
"desc": desc
|
||||
actionType: 'removeLabel',
|
||||
labelId,
|
||||
boardId,
|
||||
desc,
|
||||
});
|
||||
Rules.insert({
|
||||
title: ruleName,
|
||||
triggerId: triggerId,
|
||||
actionId: actionId,
|
||||
"boardId": boardId
|
||||
triggerId,
|
||||
actionId,
|
||||
boardId,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -62,35 +61,35 @@ BlazeComponent.extendComponent({
|
|||
const memberName = this.find('#member-name').value;
|
||||
const boardId = Session.get('currentBoard');
|
||||
const desc = Utils.getTriggerActionDesc(event, this);
|
||||
if (actionSelected == "add") {
|
||||
if (actionSelected === 'add') {
|
||||
const triggerId = Triggers.insert(trigger);
|
||||
const actionId = Actions.insert({
|
||||
actionType: "addMember",
|
||||
"memberName": memberName,
|
||||
"boardId": boardId,
|
||||
"desc": desc
|
||||
actionType: 'addMember',
|
||||
memberName,
|
||||
boardId,
|
||||
desc,
|
||||
});
|
||||
Rules.insert({
|
||||
title: ruleName,
|
||||
triggerId: triggerId,
|
||||
actionId: actionId,
|
||||
"boardId": boardId,
|
||||
"desc": desc
|
||||
triggerId,
|
||||
actionId,
|
||||
boardId,
|
||||
desc,
|
||||
});
|
||||
}
|
||||
if (actionSelected == "remove") {
|
||||
if (actionSelected === 'remove') {
|
||||
const triggerId = Triggers.insert(trigger);
|
||||
const actionId = Actions.insert({
|
||||
actionType: "removeMember",
|
||||
"memberName": memberName,
|
||||
"boardId": boardId,
|
||||
"desc": desc
|
||||
actionType: 'removeMember',
|
||||
memberName,
|
||||
boardId,
|
||||
desc,
|
||||
});
|
||||
Rules.insert({
|
||||
title: ruleName,
|
||||
triggerId: triggerId,
|
||||
actionId: actionId,
|
||||
"boardId": boardId
|
||||
triggerId,
|
||||
actionId,
|
||||
boardId,
|
||||
});
|
||||
}
|
||||
},
|
||||
|
|
@ -101,19 +100,19 @@ BlazeComponent.extendComponent({
|
|||
const desc = Utils.getTriggerActionDesc(event, this);
|
||||
const boardId = Session.get('currentBoard');
|
||||
const actionId = Actions.insert({
|
||||
actionType: "removeMember",
|
||||
"memberName": "*",
|
||||
"boardId": boardId,
|
||||
"desc": desc
|
||||
actionType: 'removeMember',
|
||||
'memberName': '*',
|
||||
boardId,
|
||||
desc,
|
||||
});
|
||||
Rules.insert({
|
||||
title: ruleName,
|
||||
triggerId: triggerId,
|
||||
actionId: actionId,
|
||||
"boardId": boardId
|
||||
triggerId,
|
||||
actionId,
|
||||
boardId,
|
||||
});
|
||||
},
|
||||
}];
|
||||
},
|
||||
|
||||
}).register('cardActions');
|
||||
}).register('cardActions');
|
||||
|
|
|
|||
|
|
@ -11,34 +11,34 @@ BlazeComponent.extendComponent({
|
|||
const checklistName = this.find('#checklist-name').value;
|
||||
const boardId = Session.get('currentBoard');
|
||||
const desc = Utils.getTriggerActionDesc(event, this);
|
||||
if (actionSelected == "add") {
|
||||
if (actionSelected === 'add') {
|
||||
const triggerId = Triggers.insert(trigger);
|
||||
const actionId = Actions.insert({
|
||||
actionType: "addChecklist",
|
||||
"checklistName": checklistName,
|
||||
"boardId": boardId,
|
||||
"desc": desc
|
||||
actionType: 'addChecklist',
|
||||
checklistName,
|
||||
boardId,
|
||||
desc,
|
||||
});
|
||||
Rules.insert({
|
||||
title: ruleName,
|
||||
triggerId: triggerId,
|
||||
actionId: actionId,
|
||||
"boardId": boardId
|
||||
triggerId,
|
||||
actionId,
|
||||
boardId,
|
||||
});
|
||||
}
|
||||
if (actionSelected == "remove") {
|
||||
if (actionSelected === 'remove') {
|
||||
const triggerId = Triggers.insert(trigger);
|
||||
const actionId = Actions.insert({
|
||||
actionType: "removeChecklist",
|
||||
"checklistName": checklistName,
|
||||
"boardId": boardId,
|
||||
"desc": desc
|
||||
actionType: 'removeChecklist',
|
||||
checklistName,
|
||||
boardId,
|
||||
desc,
|
||||
});
|
||||
Rules.insert({
|
||||
title: ruleName,
|
||||
triggerId: triggerId,
|
||||
actionId: actionId,
|
||||
"boardId": boardId
|
||||
triggerId,
|
||||
actionId,
|
||||
boardId,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -50,79 +50,79 @@ BlazeComponent.extendComponent({
|
|||
const checklistName = this.find('#checklist-name2').value;
|
||||
const boardId = Session.get('currentBoard');
|
||||
const desc = Utils.getTriggerActionDesc(event, this);
|
||||
if (actionSelected == "check") {
|
||||
if (actionSelected === 'check') {
|
||||
const triggerId = Triggers.insert(trigger);
|
||||
const actionId = Actions.insert({
|
||||
actionType: "checkAll",
|
||||
"checklistName": checklistName,
|
||||
"boardId": boardId,
|
||||
"desc": desc
|
||||
actionType: 'checkAll',
|
||||
checklistName,
|
||||
boardId,
|
||||
desc,
|
||||
});
|
||||
Rules.insert({
|
||||
title: ruleName,
|
||||
triggerId: triggerId,
|
||||
actionId: actionId,
|
||||
"boardId": boardId
|
||||
triggerId,
|
||||
actionId,
|
||||
boardId,
|
||||
});
|
||||
}
|
||||
if (actionSelected == "uncheck") {
|
||||
if (actionSelected === 'uncheck') {
|
||||
const triggerId = Triggers.insert(trigger);
|
||||
const actionId = Actions.insert({
|
||||
actionType: "uncheckAll",
|
||||
"checklistName": checklistName,
|
||||
"boardId": boardId,
|
||||
"desc": desc
|
||||
actionType: 'uncheckAll',
|
||||
checklistName,
|
||||
boardId,
|
||||
desc,
|
||||
});
|
||||
Rules.insert({
|
||||
title: ruleName,
|
||||
triggerId: triggerId,
|
||||
actionId: actionId,
|
||||
"boardId": boardId
|
||||
triggerId,
|
||||
actionId,
|
||||
boardId,
|
||||
});
|
||||
}
|
||||
},
|
||||
'click .js-add-check-item-action' (event) {
|
||||
const ruleName = this.data().ruleName.get();
|
||||
const trigger = this.data().triggerVar.get();
|
||||
const checkItemName = this.find("#checkitem-name");
|
||||
const checklistName = this.find("#checklist-name3");
|
||||
const checkItemName = this.find('#checkitem-name');
|
||||
const checklistName = this.find('#checklist-name3');
|
||||
const actionSelected = this.find('#check-item-action').value;
|
||||
const boardId = Session.get('currentBoard');
|
||||
const desc = Utils.getTriggerActionDesc(event, this);
|
||||
if (actionSelected == "check") {
|
||||
if (actionSelected === 'check') {
|
||||
const triggerId = Triggers.insert(trigger);
|
||||
const actionId = Actions.insert({
|
||||
actionType: "checkItem",
|
||||
"checklistName": checklistName,
|
||||
"checkItemName": checkItemName,
|
||||
"boardId": boardId,
|
||||
"desc": desc
|
||||
actionType: 'checkItem',
|
||||
checklistName,
|
||||
checkItemName,
|
||||
boardId,
|
||||
desc,
|
||||
});
|
||||
Rules.insert({
|
||||
title: ruleName,
|
||||
triggerId: triggerId,
|
||||
actionId: actionId,
|
||||
"boardId": boardId
|
||||
triggerId,
|
||||
actionId,
|
||||
boardId,
|
||||
});
|
||||
}
|
||||
if (actionSelected == "uncheck") {
|
||||
if (actionSelected === 'uncheck') {
|
||||
const triggerId = Triggers.insert(trigger);
|
||||
const actionId = Actions.insert({
|
||||
actionType: "uncheckItem",
|
||||
"checklistName": checklistName,
|
||||
"checkItemName": checkItemName,
|
||||
"boardId": boardId,
|
||||
"desc": desc
|
||||
actionType: 'uncheckItem',
|
||||
checklistName,
|
||||
checkItemName,
|
||||
boardId,
|
||||
desc,
|
||||
});
|
||||
Rules.insert({
|
||||
title: ruleName,
|
||||
triggerId: triggerId,
|
||||
actionId: actionId,
|
||||
"boardId": boardId
|
||||
triggerId,
|
||||
actionId,
|
||||
boardId,
|
||||
});
|
||||
}
|
||||
},
|
||||
}];
|
||||
},
|
||||
|
||||
}).register('checklistActions');
|
||||
}).register('checklistActions');
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@ template(name="mailActions")
|
|||
div.trigger-item.trigger-item-mail
|
||||
div.trigger-content.trigger-content-mail
|
||||
div.trigger-text.trigger-text-email
|
||||
| {{{_'r-send-email'}}}
|
||||
| {{_'r-send-email'}}
|
||||
div.trigger-dropdown-mail
|
||||
input(id="email-to",type=text,placeholder="{{{_'r-to'}}}")
|
||||
input(id="email-subject",type=text,placeholder="{{{_'r-subject'}}}")
|
||||
input(id="email-to",type=text,placeholder="{{_'r-to'}}")
|
||||
input(id="email-subject",type=text,placeholder="{{_'r-subject'}}")
|
||||
textarea(id="email-msg")
|
||||
div.trigger-button.trigger-button-email.js-mail-action.js-goto-rules
|
||||
i.fa.fa-plus
|
||||
i.fa.fa-plus
|
||||
|
|
|
|||
|
|
@ -15,21 +15,21 @@ BlazeComponent.extendComponent({
|
|||
const boardId = Session.get('currentBoard');
|
||||
const desc = Utils.getTriggerActionDesc(event, this);
|
||||
const actionId = Actions.insert({
|
||||
actionType: "sendEmail",
|
||||
"emailTo": emailTo,
|
||||
"emailSubject": emailSubject,
|
||||
"emailMsg": emailMsg,
|
||||
"boardId": boardId,
|
||||
"desc": desc
|
||||
actionType: 'sendEmail',
|
||||
emailTo,
|
||||
emailSubject,
|
||||
emailMsg,
|
||||
boardId,
|
||||
desc,
|
||||
});
|
||||
Rules.insert({
|
||||
title: ruleName,
|
||||
triggerId: triggerId,
|
||||
actionId: actionId,
|
||||
"boardId": boardId
|
||||
triggerId,
|
||||
actionId,
|
||||
boardId,
|
||||
});
|
||||
},
|
||||
}];
|
||||
},
|
||||
|
||||
}).register('mailActions');
|
||||
}).register('mailActions');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue