瀏覽代碼

Merge branch 'devel'

Lauri Ojansivu 7 年之前
父節點
當前提交
0f53220122
共有 4 個文件被更改,包括 28 次插入9 次删除
  1. 8 0
      CHANGELOG.md
  2. 17 6
      client/components/cards/cardDetails.js
  3. 1 1
      package.json
  4. 2 2
      sandstorm-pkgdef.capnp

+ 8 - 0
CHANGELOG.md

@@ -1,3 +1,11 @@
+# v1.06 2018-06-14 Wekan release
+
+This release fixes the following bugs:
+
+* [Fix CardDetail of Mobile View](https://github.com/wekan/wekan/pull/1701).
+
+Thanks to GitHub users feuerball11 and xet7 for their contributions.
+
 # v1.05 2018-06-14 Wekan release
 
 This release adds the following new features:

+ 17 - 6
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');

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "wekan",
-  "version": "1.05.0",
+  "version": "1.06.0",
   "description": "The open-source Trello-like kanban",
   "private": true,
   "scripts": {

+ 2 - 2
sandstorm-pkgdef.capnp

@@ -22,10 +22,10 @@ const pkgdef :Spk.PackageDefinition = (
     appTitle = (defaultText = "Wekan"),
     # The name of the app as it is displayed to the user.
 
-    appVersion = 90,
+    appVersion = 91,
     # Increment this for every release.
 
-    appMarketingVersion = (defaultText = "1.05.0~2018-06-14"),
+    appMarketingVersion = (defaultText = "1.06.0~2018-06-14"),
     # Human-readable presentation of the app version.
 
     minUpgradableAppVersion = 0,