mirror of
https://github.com/wekan/wekan.git
synced 2025-12-23 10:50:13 +01:00
Fix lint errors in lint error fix.
Thanks to xet7 !
This commit is contained in:
parent
e7603298d7
commit
9e95c06415
9 changed files with 47 additions and 49 deletions
|
|
@ -7,7 +7,7 @@ BlazeComponent.extendComponent({
|
||||||
return Boards.find(
|
return Boards.find(
|
||||||
{ archived: true },
|
{ archived: true },
|
||||||
{
|
{
|
||||||
sort: { sort: 1 /* boards default sorting */ }
|
sort: { sort: 1 /* boards default sorting */ },
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,9 @@ BlazeComponent.extendComponent({
|
||||||
query['members.userId'] = Meteor.userId();
|
query['members.userId'] = Meteor.userId();
|
||||||
else query.permission = 'public';
|
else query.permission = 'public';
|
||||||
|
|
||||||
return Boards.find(query, { sort: { sort: 1 /* boards default sorting */ } });
|
return Boards.find(query, {
|
||||||
|
sort: { sort: 1 /* boards default sorting */ },
|
||||||
|
});
|
||||||
},
|
},
|
||||||
isStarred() {
|
isStarred() {
|
||||||
const user = Meteor.user();
|
const user = Meteor.user();
|
||||||
|
|
|
||||||
|
|
@ -56,9 +56,8 @@ BlazeComponent.extendComponent({
|
||||||
},
|
},
|
||||||
votePublic() {
|
votePublic() {
|
||||||
const card = this.currentData();
|
const card = this.currentData();
|
||||||
if (card.vote)
|
if (card.vote) return card.vote.public;
|
||||||
return card.vote.public
|
return null;
|
||||||
return null
|
|
||||||
},
|
},
|
||||||
voteCountPositive() {
|
voteCountPositive() {
|
||||||
const card = this.currentData();
|
const card = this.currentData();
|
||||||
|
|
@ -380,7 +379,7 @@ BlazeComponent.extendComponent({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'click .js-go-to-linked-card'() {
|
'click .js-go-to-linked-card'() {
|
||||||
Utils.goCardId(this.data().linkedId)
|
Utils.goCardId(this.data().linkedId);
|
||||||
},
|
},
|
||||||
'click .js-member': Popup.open('cardMember'),
|
'click .js-member': Popup.open('cardMember'),
|
||||||
'click .js-add-members': Popup.open('cardMembers'),
|
'click .js-add-members': Popup.open('cardMembers'),
|
||||||
|
|
|
||||||
|
|
@ -215,17 +215,16 @@ Template.boardMenuPopup.events({
|
||||||
'click .js-card-settings': Popup.open('boardCardSettings'),
|
'click .js-card-settings': Popup.open('boardCardSettings'),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
Template.boardMenuPopup.onCreated(function() {
|
Template.boardMenuPopup.onCreated(function() {
|
||||||
this.apiEnabled = new ReactiveVar(false);
|
this.apiEnabled = new ReactiveVar(false);
|
||||||
Meteor.call('_isApiEnabled', (e, result) => {
|
Meteor.call('_isApiEnabled', (e, result) => {
|
||||||
this.apiEnabled.set(result)
|
this.apiEnabled.set(result);
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
|
|
||||||
Template.boardMenuPopup.helpers({
|
Template.boardMenuPopup.helpers({
|
||||||
withApi() {
|
withApi() {
|
||||||
return Template.instance().apiEnabled.get()
|
return Template.instance().apiEnabled.get();
|
||||||
},
|
},
|
||||||
exportUrl() {
|
exportUrl() {
|
||||||
const params = {
|
const params = {
|
||||||
|
|
|
||||||
|
|
@ -1297,7 +1297,10 @@ if (Meteor.isServer) {
|
||||||
|
|
||||||
// Insert new board at last position in sort order.
|
// Insert new board at last position in sort order.
|
||||||
Boards.before.insert((userId, doc) => {
|
Boards.before.insert((userId, doc) => {
|
||||||
const lastBoard = Boards.findOne({ sort: { $exists: true } }, { sort: { sort: -1 } });
|
const lastBoard = Boards.findOne(
|
||||||
|
{ sort: { $exists: true } },
|
||||||
|
{ sort: { sort: -1 } },
|
||||||
|
);
|
||||||
if (lastBoard && typeof lastBoard.sort !== 'undefined') {
|
if (lastBoard && typeof lastBoard.sort !== 'undefined') {
|
||||||
doc.sort = lastBoard.sort + 1;
|
doc.sort = lastBoard.sort + 1;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1050,13 +1050,13 @@ Cards.helpers({
|
||||||
|
|
||||||
voteMemberPositive() {
|
voteMemberPositive() {
|
||||||
if (this.vote && this.vote.positive)
|
if (this.vote && this.vote.positive)
|
||||||
return Users.find({ _id: { $in: this.vote.positive } })
|
return Users.find({ _id: { $in: this.vote.positive } });
|
||||||
return []
|
return [];
|
||||||
},
|
},
|
||||||
voteMemberNegative() {
|
voteMemberNegative() {
|
||||||
if (this.vote && this.vote.negative)
|
if (this.vote && this.vote.negative)
|
||||||
return Users.find({ _id: { $in: this.vote.negative } })
|
return Users.find({ _id: { $in: this.vote.negative } });
|
||||||
return []
|
return [];
|
||||||
},
|
},
|
||||||
|
|
||||||
getId() {
|
getId() {
|
||||||
|
|
@ -1475,12 +1475,12 @@ Cards.mutations({
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
setVoteQuestion(question, public_) {
|
setVoteQuestion(question, public) {
|
||||||
return {
|
return {
|
||||||
$set: {
|
$set: {
|
||||||
vote: {
|
vote: {
|
||||||
question,
|
question,
|
||||||
public_,
|
public,
|
||||||
positive: [],
|
positive: [],
|
||||||
negative: [],
|
negative: [],
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -338,7 +338,6 @@ if (Meteor.isServer) {
|
||||||
isPasswordLoginDisabled() {
|
isPasswordLoginDisabled() {
|
||||||
return process.env.PASSWORD_LOGIN_ENABLED === 'false';
|
return process.env.PASSWORD_LOGIN_ENABLED === 'false';
|
||||||
},
|
},
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -299,13 +299,13 @@ export class TrelloCreator {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
})
|
});
|
||||||
if (positiveVotes.length > 0) {
|
if (positiveVotes.length > 0) {
|
||||||
cardToCreate.vote = {
|
cardToCreate.vote = {
|
||||||
question: cardToCreate.title,
|
question: cardToCreate.title,
|
||||||
public: true,
|
public: true,
|
||||||
positive: positiveVotes,
|
positive: positiveVotes,
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1037,11 +1037,7 @@ Migrations.add('add-description-text-allowed', () => {
|
||||||
Migrations.add('add-sort-field-to-boards', () => {
|
Migrations.add('add-sort-field-to-boards', () => {
|
||||||
Boards.find().forEach((board, index) => {
|
Boards.find().forEach((board, index) => {
|
||||||
if (!board.hasOwnProperty('sort')) {
|
if (!board.hasOwnProperty('sort')) {
|
||||||
Boards.direct.update(
|
Boards.direct.update(board._id, { $set: { sort: index } }, noValidate);
|
||||||
board._id,
|
|
||||||
{ $set: { sort: index } },
|
|
||||||
noValidate
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue