summaryrefslogtreecommitdiffstats
path: root/client/components/cards/cardDetails.js
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2018-06-14 22:31:26 +0300
committerLauri Ojansivu <x@xet7.org>2018-06-14 22:31:26 +0300
commit0f5322012206df1ff343f44e9cbdc275006ad482 (patch)
treea9ca74a47007e46fbf4722aa74ca9749a5220c45 /client/components/cards/cardDetails.js
parent37817fcaf80e026de3769e2382b84c5bde283b42 (diff)
parent1214af04a9bdaad4390d6f3eb157f5dd430ab48a (diff)
downloadwekan-0f5322012206df1ff343f44e9cbdc275006ad482.tar.gz
wekan-0f5322012206df1ff343f44e9cbdc275006ad482.tar.bz2
wekan-0f5322012206df1ff343f44e9cbdc275006ad482.zip
Merge branch 'devel'
Diffstat (limited to 'client/components/cards/cardDetails.js')
-rw-r--r--client/components/cards/cardDetails.js23
1 files changed, 17 insertions, 6 deletions
diff --git a/client/components/cards/cardDetails.js b/client/components/cards/cardDetails.js
index 6cbc4572..72ed678b 100644
--- a/client/components/cards/cardDetails.js
+++ b/client/components/cards/cardDetails.js
@@ -21,8 +21,12 @@ BlazeComponent.extendComponent({
onCreated() {
this.isLoaded = new ReactiveVar(false);
- this.parentComponent().parentComponent().showOverlay.set(true);
- this.parentComponent().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');
@@ -44,7 +48,8 @@ BlazeComponent.extendComponent({
scrollParentContainer() {
const cardPanelWidth = 510;
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();
@@ -115,7 +120,10 @@ BlazeComponent.extendComponent({
},
onDestroyed() {
- this.parentComponent().parentComponent().showOverlay.set(false);
+ const parentComponent = this.parentComponent().parentComponent();
+ //on mobile view parent is Board, not board body.
+ if (parentComponent === null) return;
+ parentComponent.showOverlay.set(false);
},
events() {
@@ -168,8 +176,11 @@ BlazeComponent.extendComponent({
'click .js-due-date': Popup.open('editCardDueDate'),
'click .js-end-date': Popup.open('editCardEndDate'),
'mouseenter .js-card-details' () {
- this.parentComponent().parentComponent().showOverlay.set(true);
- this.parentComponent().parentComponent().mouseHasEnterCardDetails = true;
+ const parentComponent = this.parentComponent().parentComponent();
+ //on mobile view parent is Board, not BoardBody.
+ if (parentComponent === null) return;
+ parentComponent.showOverlay.set(true);
+ parentComponent.mouseHasEnterCardDetails = true;
},
'click #toggleButton'() {
Meteor.call('toggleSystemMessages');