summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2020-05-25 21:33:38 +0300
committerLauri Ojansivu <x@xet7.org>2020-05-25 21:33:38 +0300
commitf9018fc3a87080d8d97c371e29a8f3f0a20ca932 (patch)
treea812f2fd2cdc9a21b83cd8097a741be6744b1657
parent252c4b19f9dddd5b51933b2148b188daec69d80c (diff)
downloadwekan-f9018fc3a87080d8d97c371e29a8f3f0a20ca932.tar.gz
wekan-f9018fc3a87080d8d97c371e29a8f3f0a20ca932.tar.bz2
wekan-f9018fc3a87080d8d97c371e29a8f3f0a20ca932.zip
Sorry marc1006, I had to revert deepcode.ai arrow function fixes because
Python API docs generator does not work all when code has arrow functions. Thanks to xet7 !
-rw-r--r--client/components/boards/boardBody.js8
-rw-r--r--client/components/cards/cardDetails.js4
-rw-r--r--client/components/sidebar/sidebar.js2
-rw-r--r--models/checklists.js8
-rw-r--r--server/rulesHelper.js2
5 files changed, 12 insertions, 12 deletions
diff --git a/client/components/boards/boardBody.js b/client/components/boards/boardBody.js
index e70faa49..4e473f18 100644
--- a/client/components/boards/boardBody.js
+++ b/client/components/boards/boardBody.js
@@ -365,12 +365,12 @@ BlazeComponent.extendComponent({
};
currentBoard
.cardsInInterval(start.toDate(), end.toDate())
- .forEach(card => {
+ .forEach(function(card) {
pushEvent(card);
});
currentBoard
.cardsDueInBetween(start.toDate(), end.toDate())
- .forEach(card => {
+ .forEach(function(card) {
pushEvent(
card,
`${card.title} ${TAPi18n.__('card-due')}`,
@@ -378,8 +378,8 @@ BlazeComponent.extendComponent({
new Date(card.dueAt.getTime() + 36e5),
);
});
- events.sort((first, second) => {
- return first.id === second.id ? 0 : first.id > second.id ? 1 : -1;
+ events.sort(function(first, second) {
+ return first.id > second.id ? 1 : -1;
});
callback(events);
},
diff --git a/client/components/cards/cardDetails.js b/client/components/cards/cardDetails.js
index d877421c..11e010d4 100644
--- a/client/components/cards/cardDetails.js
+++ b/client/components/cards/cardDetails.js
@@ -812,9 +812,9 @@ Template.copyChecklistToManyCardsPopup.events({
// copy subtasks
cursor = Cards.find({ parentId: oldId });
- cursor.forEach(cur => {
+ cursor.forEach(function() {
'use strict';
- const subtask = cur;
+ const subtask = arguments[0];
subtask.parentId = _id;
subtask._id = null;
/* const newSubtaskId = */ Cards.insert(subtask);
diff --git a/client/components/sidebar/sidebar.js b/client/components/sidebar/sidebar.js
index b36ee6a7..7dfee78d 100644
--- a/client/components/sidebar/sidebar.js
+++ b/client/components/sidebar/sidebar.js
@@ -653,7 +653,7 @@ BlazeComponent.extendComponent({
'subtext-with-parent',
'no-parent',
];
- options.forEach(element => {
+ options.forEach(function(element) {
if (element !== value) {
$(`#${element} ${MCB}`).toggleClass(CKCLS, false);
$(`#${element}`).toggleClass(CKCLS, false);
diff --git a/models/checklists.js b/models/checklists.js
index 62c71d5f..831779b7 100644
--- a/models/checklists.js
+++ b/models/checklists.js
@@ -70,7 +70,7 @@ Checklists.helpers({
this._id = null;
this.cardId = newCardId;
const newChecklistId = Checklists.insert(this);
- ChecklistItems.find({ checklistId: oldChecklistId }).forEach(item => {
+ ChecklistItems.find({ checklistId: oldChecklistId }).forEach(function(item) {
item._id = null;
item.checklistId = newChecklistId;
item.cardId = newCardId;
@@ -100,13 +100,13 @@ Checklists.helpers({
},
checkAllItems() {
const checkItems = ChecklistItems.find({ checklistId: this._id });
- checkItems.forEach(item => {
+ checkItems.forEach(function(item) {
item.check();
});
},
uncheckAllItems() {
const checkItems = ChecklistItems.find({ checklistId: this._id });
- checkItems.forEach(item => {
+ checkItems.forEach(function(item) {
item.uncheck();
});
},
@@ -307,7 +307,7 @@ if (Meteor.isServer) {
items = [items];
}
}
- items.forEach((item, idx) => {
+ items.forEach(function(item, idx) {
ChecklistItems.insert({
cardId: paramCardId,
checklistId: id,
diff --git a/server/rulesHelper.js b/server/rulesHelper.js
index 1dc7b5d3..63e330ab 100644
--- a/server/rulesHelper.js
+++ b/server/rulesHelper.js
@@ -17,7 +17,7 @@ RulesHelper = {
const matchingMap = this.buildMatchingFieldsMap(activity, matchingFields);
const matchingTriggers = Triggers.find(matchingMap);
const matchingRules = [];
- matchingTriggers.forEach(trigger => {
+ matchingTriggers.forEach(function(trigger) {
const rule = trigger.getRule();
// Check that for some unknown reason there are some leftover triggers
// not connected to any rules