summaryrefslogtreecommitdiffstats
path: root/client/components/boards
diff options
context:
space:
mode:
Diffstat (limited to 'client/components/boards')
-rw-r--r--client/components/boards/boardBody.js35
-rw-r--r--client/components/boards/boardHeader.jade12
-rw-r--r--client/components/boards/boardHeader.js12
3 files changed, 13 insertions, 46 deletions
diff --git a/client/components/boards/boardBody.js b/client/components/boards/boardBody.js
index 41b6f4ef..55b8c0a1 100644
--- a/client/components/boards/boardBody.js
+++ b/client/components/boards/boardBody.js
@@ -1,3 +1,5 @@
+import { Cookies } from 'meteor/ostrio:cookies';
+const cookies = new Cookies();
const subManager = new SubsManager();
const { calculateIndex, enableClickOnTouch } = Utils;
const swimlaneWhileSortingHeight = 150;
@@ -192,9 +194,6 @@ BlazeComponent.extendComponent({
// ugly touch event hotfix
enableClickOnTouch('.js-swimlane:not(.placeholder)');
- import { Cookies } from 'meteor/ostrio:cookies';
- const cookies = new Cookies();
-
this.autorun(() => {
let showDesktopDragHandles = false;
currentUser = Meteor.user();
@@ -207,8 +206,8 @@ BlazeComponent.extendComponent({
showDesktopDragHandles = false;
}
if (
- Utils.isMiniScreen()
- || (!Utils.isMiniScreen() && showDesktopDragHandles)
+ Utils.isMiniScreen() ||
+ (!Utils.isMiniScreen() && showDesktopDragHandles)
) {
$swimlanesDom.sortable({
handle: '.js-swimlane-header-handle',
@@ -225,9 +224,9 @@ BlazeComponent.extendComponent({
function userIsMember() {
return (
- Meteor.user()
- && Meteor.user().isBoardMember()
- && !Meteor.user().isCommentOnly()
+ Meteor.user() &&
+ Meteor.user().isBoardMember() &&
+ !Meteor.user().isCommentOnly()
);
}
@@ -244,8 +243,6 @@ BlazeComponent.extendComponent({
if (currentUser) {
return (currentUser.profile || {}).boardView === 'board-view-swimlanes';
} else {
- import { Cookies } from 'meteor/ostrio:cookies';
- const cookies = new Cookies();
return cookies.get('boardView') === 'board-view-swimlanes';
}
},
@@ -255,8 +252,6 @@ BlazeComponent.extendComponent({
if (currentUser) {
return (currentUser.profile || {}).boardView === 'board-view-lists';
} else {
- import { Cookies } from 'meteor/ostrio:cookies';
- const cookies = new Cookies();
return cookies.get('boardView') === 'board-view-lists';
}
},
@@ -266,8 +261,6 @@ BlazeComponent.extendComponent({
if (currentUser) {
return (currentUser.profile || {}).boardView === 'board-view-cal';
} else {
- import { Cookies } from 'meteor/ostrio:cookies';
- const cookies = new Cookies();
return cookies.get('boardView') === 'board-view-cal';
}
},
@@ -306,16 +299,16 @@ BlazeComponent.extendComponent({
scrollLeft(position = 0) {
const swimlanes = this.$('.js-swimlanes');
- swimlanes
- && swimlanes.animate({
+ swimlanes &&
+ swimlanes.animate({
scrollLeft: position,
});
},
scrollTop(position = 0) {
const swimlanes = this.$('.js-swimlanes');
- swimlanes
- && swimlanes.animate({
+ swimlanes &&
+ swimlanes.animate({
scrollTop: position,
});
},
@@ -359,8 +352,8 @@ BlazeComponent.extendComponent({
end = end || card.endAt;
title = title || card.title;
const className =
- (extraCls ? `${extraCls} ` : '')
- + (card.color ? `calendar-event-${card.color}` : '');
+ (extraCls ? `${extraCls} ` : '') +
+ (card.color ? `calendar-event-${card.color}` : '');
events.push({
id: card._id,
title,
@@ -430,8 +423,6 @@ BlazeComponent.extendComponent({
if (currentUser) {
return (currentUser.profile || {}).boardView === 'board-view-cal';
} else {
- import { Cookies } from 'meteor/ostrio:cookies';
- const cookies = new Cookies();
return cookies.get('boardView') === 'board-view-cal';
}
},
diff --git a/client/components/boards/boardHeader.jade b/client/components/boards/boardHeader.jade
index 39221778..53a74f76 100644
--- a/client/components/boards/boardHeader.jade
+++ b/client/components/boards/boardHeader.jade
@@ -103,14 +103,9 @@ template(name="boardHeaderBar")
i.fa.fa-trello
if $eq boardView 'board-view-swimlanes'
i.fa.fa-th-large
- // unless collapseSwimlane
- // i.fa.fa-th-large
- // if collapseSwimlane
- // i.fa.fa-play
if $eq boardView 'board-view-cal'
i.fa.fa-calendar
span {{#if boardView}}{{_ boardView}}{{else}}{{_ 'board-view-lists'}}{{/if}}
- //span {{#if collapseSwimlane}}{{_ 'board-view-collapse'}}{{else}}{{#if boardView}}{{_ boardView}}{{else}}{{_ 'board-view-lists'}}{{/if}}{{/if}}
if canModifyBoard
a.board-header-btn.js-multiselection-activate(
@@ -191,13 +186,6 @@ template(name="boardChangeViewPopup")
| {{_ 'board-view-swimlanes'}}
if $eq Utils.boardView "board-view-swimlanes"
i.fa.fa-check
- //li
- // with "board-view-collapse"
- // a.js-open-collapse-view
- // i.fa.fa-play.colorful
- // | {{_ 'board-view-collapse'}}
- // if $eq Utils.boardView "board-view-collapse"
- // i.fa.fa-check
li
with "board-view-cal"
a.js-open-cal-view
diff --git a/client/components/boards/boardHeader.js b/client/components/boards/boardHeader.js
index ffbb9b72..eea43bd3 100644
--- a/client/components/boards/boardHeader.js
+++ b/client/components/boards/boardHeader.js
@@ -175,15 +175,6 @@ Template.boardHeaderBar.helpers({
boardView() {
return Utils.boardView();
},
- //collapseSwimlane() {
- // import { Cookies } from 'meteor/ostrio:cookies';
- // const cookies = new Cookies();
- // if (cookies.has('collapseSwimlane')) {
- // return true;
- // } else {
- // return false;
- // }
- //},
});
Template.boardChangeViewPopup.events({
@@ -195,9 +186,6 @@ Template.boardChangeViewPopup.events({
Utils.setBoardView('board-view-swimlanes');
Popup.close();
},
- //'click .js-open-collapse-view'() {
- // Utils.setBoardView('board-view-collapse');
- //Popup.close();
'click .js-open-cal-view'() {
Utils.setBoardView('board-view-cal');
Popup.close();