summaryrefslogtreecommitdiffstats
path: root/client/components/lists/list.js
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2019-06-29 07:47:57 -0400
committerLauri Ojansivu <x@xet7.org>2019-06-29 07:47:57 -0400
commitb84dc20ded0375d9ab14ec05c78b737398d76b83 (patch)
treec3b91b3657299c779e941a1257df17bb0eade866 /client/components/lists/list.js
parent100288b3e1bce882ab9923a5bff7b5f620f33ee8 (diff)
parent3eb4d2c341b712268bd321173909e0a7b19a88c9 (diff)
downloadwekan-b84dc20ded0375d9ab14ec05c78b737398d76b83.tar.gz
wekan-b84dc20ded0375d9ab14ec05c78b737398d76b83.tar.bz2
wekan-b84dc20ded0375d9ab14ec05c78b737398d76b83.zip
Merge branch 'linting' of https://github.com/justinr1234/wekan into justinr1234-linting
Diffstat (limited to 'client/components/lists/list.js')
-rw-r--r--client/components/lists/list.js42
1 files changed, 32 insertions, 10 deletions
diff --git a/client/components/lists/list.js b/client/components/lists/list.js
index ea0068eb..c2b39be9 100644
--- a/client/components/lists/list.js
+++ b/client/components/lists/list.js
@@ -21,14 +21,18 @@ BlazeComponent.extendComponent({
const boardComponent = this.parentComponent().parentComponent();
function userIsMember() {
- return Meteor.user() && Meteor.user().isBoardMember() && !Meteor.user().isCommentOnly();
+ return (
+ Meteor.user() &&
+ Meteor.user().isBoardMember() &&
+ !Meteor.user().isCommentOnly()
+ );
}
const itemsSelector = '.js-minicard:not(.placeholder, .js-card-composer)';
const $cards = this.$('.js-minicards');
- if(window.matchMedia('(max-width: 1199px)').matches) {
- $( '.js-minicards' ).sortable({
+ if (window.matchMedia('(max-width: 1199px)').matches) {
+ $('.js-minicards').sortable({
handle: '.handle',
});
}
@@ -42,10 +46,16 @@ BlazeComponent.extendComponent({
if (MultiSelection.isActive()) {
const andNOthers = $cards.find('.js-minicard.is-checked').length - 1;
if (andNOthers > 0) {
- helper.append($(Blaze.toHTML(HTML.DIV(
- { 'class': 'and-n-other' },
- TAPi18n.__('and-n-other-card', { count: andNOthers })
- ))));
+ helper.append(
+ $(
+ Blaze.toHTML(
+ HTML.DIV(
+ { class: 'and-n-other' },
+ TAPi18n.__('and-n-other-card', { count: andNOthers }),
+ ),
+ ),
+ ),
+ );
}
}
return helper;
@@ -70,9 +80,16 @@ BlazeComponent.extendComponent({
const currentBoard = Boards.findOne(Session.get('currentBoard'));
let swimlaneId = '';
const boardView = (Meteor.user().profile || {}).boardView;
- if (boardView === 'board-view-swimlanes' || currentBoard.isTemplatesBoard())
+ if (
+ boardView === 'board-view-swimlanes' ||
+ currentBoard.isTemplatesBoard()
+ )
swimlaneId = Blaze.getData(ui.item.parents('.swimlane').get(0))._id;
- else if ((boardView === 'board-view-lists') || (boardView === 'board-view-cal') || !boardView)
+ else if (
+ boardView === 'board-view-lists' ||
+ boardView === 'board-view-cal' ||
+ !boardView
+ )
swimlaneId = currentBoard.getDefaultSwimline()._id;
// Normally the jquery-ui sortable library moves the dragged DOM element
@@ -86,7 +103,12 @@ BlazeComponent.extendComponent({
if (MultiSelection.isActive()) {
Cards.find(MultiSelection.getMongoSelector()).forEach((card, i) => {
- card.move(currentBoard._id, swimlaneId, listId, sortIndex.base + i * sortIndex.increment);
+ card.move(
+ currentBoard._id,
+ swimlaneId,
+ listId,
+ sortIndex.base + i * sortIndex.increment,
+ );
});
} else {
const cardDomElement = ui.item.get(0);