summaryrefslogtreecommitdiffstats
path: root/client/components/lists/list.js
diff options
context:
space:
mode:
authorJustin Reynolds <justinr1234@gmail.com>2019-06-28 12:52:09 -0500
committerJustin Reynolds <justinr1234@gmail.com>2019-06-28 12:56:51 -0500
commit3eb4d2c341b712268bd321173909e0a7b19a88c9 (patch)
tree25a8fcb088f3984e72a5bd3ded9e6a45376e0693 /client/components/lists/list.js
parenta0a482aa8efb3255a523de4524c8e09453d5571f (diff)
downloadwekan-3eb4d2c341b712268bd321173909e0a7b19a88c9.tar.gz
wekan-3eb4d2c341b712268bd321173909e0a7b19a88c9.tar.bz2
wekan-3eb4d2c341b712268bd321173909e0a7b19a88c9.zip
Prettier & eslint project style update
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);