summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIgnatzHome <ignatz@maschath.de>2018-06-14 20:26:44 +0200
committerIgnatzHome <ignatz@maschath.de>2018-06-14 20:26:44 +0200
commit61ee6cf09fd4829136c598bcfce25b5e522d0097 (patch)
treef3d26a7b6aa99d3d640a4ff3b4e69eedb12662d7
parent04925f7347b7bb1f4384a96e1d56cd2cf3c351e9 (diff)
downloadwekan-61ee6cf09fd4829136c598bcfce25b5e522d0097.tar.gz
wekan-61ee6cf09fd4829136c598bcfce25b5e522d0097.tar.bz2
wekan-61ee6cf09fd4829136c598bcfce25b5e522d0097.zip
This seems to make more sense.
-rw-r--r--client/components/cards/cardDetails.js29
1 files changed, 15 insertions, 14 deletions
diff --git a/client/components/cards/cardDetails.js b/client/components/cards/cardDetails.js
index a7b18fc3..72ed678b 100644
--- a/client/components/cards/cardDetails.js
+++ b/client/components/cards/cardDetails.js
@@ -21,14 +21,12 @@ BlazeComponent.extendComponent({
onCreated() {
this.isLoaded = new ReactiveVar(false);
- console.log(this.parentComponent());
- console.log(this.parentComponent().parentComponent());
- console.log(JSON.stringify(this.parentComponent()));
- console.log(JSON.stringify(this.parentComponent().parentComponent()));
- let parentComponent = this.parentComponent().parentComponent();
- if (parentComponent === null) parentComponent = this.parentComponent();
- parentComponent.showOverlay.set(true);
- parentComponent.mouseHasEnterCardDetails = false;
+ const boardBody = this.parentComponent().parentComponent();
+ //in Miniview parent is Board, not BoardBody.
+ if (boardBody !== null){
+ boardBody.showOverlay.set(true);
+ boardBody.mouseHasEnterCardDetails = false;
+ }
this.calculateNextPeak();
Meteor.subscribe('unsaved-edits');
@@ -49,8 +47,9 @@ BlazeComponent.extendComponent({
scrollParentContainer() {
const cardPanelWidth = 510;
- let bodyBoardComponent = this.parentComponent().parentComponent();
- if (bodyBoardComponent === null) bodyBoardComponent = this.parentComponent();
+ const bodyBoardComponent = this.parentComponent().parentComponent();
+ //On Mobile View Parent is Board, Not Board Body. I cant see how this funciton should work then.
+ if (bodyBoardComponent === null) return;
const $cardView = this.$(this.firstNode());
const $cardContainer = bodyBoardComponent.$('.js-swimlanes');
const cardContainerScroll = $cardContainer.scrollLeft();
@@ -121,8 +120,9 @@ BlazeComponent.extendComponent({
},
onDestroyed() {
- let parentComponent = this.parentComponent().parentComponent();
- if (parentComponent === null) parentComponent = this.parentComponent();
+ const parentComponent = this.parentComponent().parentComponent();
+ //on mobile view parent is Board, not board body.
+ if (parentComponent === null) return;
parentComponent.showOverlay.set(false);
},
@@ -176,8 +176,9 @@ BlazeComponent.extendComponent({
'click .js-due-date': Popup.open('editCardDueDate'),
'click .js-end-date': Popup.open('editCardEndDate'),
'mouseenter .js-card-details' () {
- let parentComponent = this.parentComponent().parentComponent();
- if (parentComponent === null) parentComponent = this.parentComponent();
+ const parentComponent = this.parentComponent().parentComponent();
+ //on mobile view parent is Board, not BoardBody.
+ if (parentComponent === null) return;
parentComponent.showOverlay.set(true);
parentComponent.mouseHasEnterCardDetails = true;
},