summaryrefslogtreecommitdiffstats
path: root/client/lib
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2019-11-20 21:10:11 +0200
committerLauri Ojansivu <x@xet7.org>2019-11-20 21:10:11 +0200
commit788dd0a81a06efee165007a92780f9e8c2c754ac (patch)
treed792bf13b001a1903e03a485bc7577a30afda71d /client/lib
parent82d76e55e5d989d387a85d1e3bb7787355d434af (diff)
downloadwekan-788dd0a81a06efee165007a92780f9e8c2c754ac.tar.gz
wekan-788dd0a81a06efee165007a92780f9e8c2c754ac.tar.bz2
wekan-788dd0a81a06efee165007a92780f9e8c2c754ac.zip
Fix lint errors.
Diffstat (limited to 'client/lib')
-rw-r--r--client/lib/utils.js42
1 files changed, 20 insertions, 22 deletions
diff --git a/client/lib/utils.js b/client/lib/utils.js
index ab5e3597..c90dd749 100644
--- a/client/lib/utils.js
+++ b/client/lib/utils.js
@@ -5,17 +5,15 @@ Utils = {
currentUser = Meteor.user();
if (currentUser) {
Meteor.user().setBoardView(view);
- } else {
- if (view === 'board-view-lists') {
- cookies.set('boardView', 'board-view-lists'); //true
- } else if (view === 'board-view-swimlanes') {
- cookies.set('boardView', 'board-view-swimlanes'); //true
- //} else if (view === 'board-view-collapse') {
- // cookies.set('boardView', 'board-view-swimlane'); //true
- // cookies.set('collapseSwimlane', 'true'); //true
- } else if (view === 'board-view-cal') {
- cookies.set('boardView', 'board-view-cal'); //true
- }
+ } else if (view === 'board-view-lists') {
+ cookies.set('boardView', 'board-view-lists'); //true
+ } else if (view === 'board-view-swimlanes') {
+ cookies.set('boardView', 'board-view-swimlanes'); //true
+ //} else if (view === 'board-view-collapse') {
+ // cookies.set('boardView', 'board-view-swimlane'); //true
+ // cookies.set('collapseSwimlane', 'true'); //true
+ } else if (view === 'board-view-cal') {
+ cookies.set('boardView', 'board-view-cal'); //true
}
},
@@ -54,8 +52,8 @@ Utils = {
goBoardId(_id) {
const board = Boards.findOne(_id);
return (
- board &&
- FlowRouter.go('board', {
+ board
+ && FlowRouter.go('board', {
id: board._id,
slug: board.slug,
})
@@ -66,8 +64,8 @@ Utils = {
const card = Cards.findOne(_id);
const board = Boards.findOne(card.boardId);
return (
- board &&
- FlowRouter.go('card', {
+ board
+ && FlowRouter.go('card', {
cardId: card._id,
boardId: board._id,
slug: board.slug,
@@ -238,8 +236,8 @@ Utils = {
};
if (
- 'ontouchstart' in window ||
- (window.DocumentTouch && document instanceof window.DocumentTouch)
+ 'ontouchstart' in window
+ || (window.DocumentTouch && document instanceof window.DocumentTouch)
) {
return true;
}
@@ -260,8 +258,8 @@ Utils = {
calculateTouchDistance(touchA, touchB) {
return Math.sqrt(
- Math.pow(touchA.screenX - touchB.screenX, 2) +
- Math.pow(touchA.screenY - touchB.screenY, 2),
+ Math.pow(touchA.screenX - touchB.screenX, 2)
+ + Math.pow(touchA.screenY - touchB.screenY, 2),
);
},
@@ -278,9 +276,9 @@ Utils = {
});
$(document).on('touchend', selector, function(e) {
if (
- touchStart &&
- lastTouch &&
- Utils.calculateTouchDistance(touchStart, lastTouch) <= 20
+ touchStart
+ && lastTouch
+ && Utils.calculateTouchDistance(touchStart, lastTouch) <= 20
) {
e.preventDefault();
const clickEvent = document.createEvent('MouseEvents');