瀏覽代碼

Merge pull request #4071 from mfilser/card_popup_search_and_global_search

Card popup search and global search
Lauri Ojansivu 3 年之前
父節點
當前提交
552e99d460

+ 1 - 1
client/components/activities/activities.js

@@ -269,7 +269,7 @@ Template.addReactionPopup.events({
       const cardComment = CardComments.findOne({_id: commentId});
       const cardComment = CardComments.findOne({_id: commentId});
       cardComment.toggleReaction(codepoint);
       cardComment.toggleReaction(codepoint);
     }
     }
-    Popup.close();
+    Popup.back();
   },
   },
 })
 })
 
 

+ 1 - 1
client/components/boards/boardArchive.js

@@ -34,7 +34,7 @@ BlazeComponent.extendComponent({
           Utils.goBoardId(board._id);
           Utils.goBoardId(board._id);
         },
         },
         'click .js-delete-board': Popup.afterConfirm('boardDelete', function() {
         'click .js-delete-board': Popup.afterConfirm('boardDelete', function() {
-          Popup.close();
+          Popup.back();
           const isSandstorm =
           const isSandstorm =
             Meteor.settings &&
             Meteor.settings &&
             Meteor.settings.public &&
             Meteor.settings.public &&

+ 14 - 14
client/components/boards/boardHeader.js

@@ -7,11 +7,11 @@ Template.boardMenuPopup.events({
   'click .js-rename-board': Popup.open('boardChangeTitle'),
   'click .js-rename-board': Popup.open('boardChangeTitle'),
   'click .js-custom-fields'() {
   'click .js-custom-fields'() {
     Sidebar.setView('customFields');
     Sidebar.setView('customFields');
-    Popup.close();
+    Popup.back();
   },
   },
   'click .js-open-archives'() {
   'click .js-open-archives'() {
     Sidebar.setView('archives');
     Sidebar.setView('archives');
-    Popup.close();
+    Popup.back();
   },
   },
   'click .js-change-board-color': Popup.open('boardChangeColor'),
   'click .js-change-board-color': Popup.open('boardChangeColor'),
   'click .js-change-language': Popup.open('changeLanguage'),
   'click .js-change-language': Popup.open('changeLanguage'),
@@ -24,7 +24,7 @@ Template.boardMenuPopup.events({
   }),
   }),
   'click .js-delete-board': Popup.afterConfirm('deleteBoard', function() {
   'click .js-delete-board': Popup.afterConfirm('deleteBoard', function() {
     const currentBoard = Boards.findOne(Session.get('currentBoard'));
     const currentBoard = Boards.findOne(Session.get('currentBoard'));
-    Popup.close();
+    Popup.back();
     Boards.remove(currentBoard._id);
     Boards.remove(currentBoard._id);
     FlowRouter.go('home');
     FlowRouter.go('home');
   }),
   }),
@@ -47,7 +47,7 @@ Template.boardChangeTitlePopup.events({
     if (newTitle) {
     if (newTitle) {
       this.rename(newTitle);
       this.rename(newTitle);
       this.setDescription(newDesc);
       this.setDescription(newDesc);
-      Popup.close();
+      Popup.back();
     }
     }
     event.preventDefault();
     event.preventDefault();
   },
   },
@@ -173,15 +173,15 @@ Template.boardHeaderBar.helpers({
 Template.boardChangeViewPopup.events({
 Template.boardChangeViewPopup.events({
   'click .js-open-lists-view'() {
   'click .js-open-lists-view'() {
     Utils.setBoardView('board-view-lists');
     Utils.setBoardView('board-view-lists');
-    Popup.close();
+    Popup.back();
   },
   },
   'click .js-open-swimlanes-view'() {
   'click .js-open-swimlanes-view'() {
     Utils.setBoardView('board-view-swimlanes');
     Utils.setBoardView('board-view-swimlanes');
-    Popup.close();
+    Popup.back();
   },
   },
   'click .js-open-cal-view'() {
   'click .js-open-cal-view'() {
     Utils.setBoardView('board-view-cal');
     Utils.setBoardView('board-view-cal');
-    Popup.close();
+    Popup.back();
   },
   },
 });
 });
 
 
@@ -327,7 +327,7 @@ BlazeComponent.extendComponent({
     const currentBoard = Boards.findOne(Session.get('currentBoard'));
     const currentBoard = Boards.findOne(Session.get('currentBoard'));
     const visibility = this.currentData();
     const visibility = this.currentData();
     currentBoard.setVisibility(visibility);
     currentBoard.setVisibility(visibility);
-    Popup.close();
+    Popup.back();
   },
   },
 
 
   events() {
   events() {
@@ -360,7 +360,7 @@ BlazeComponent.extendComponent({
             Session.get('currentBoard'),
             Session.get('currentBoard'),
             level,
             level,
             (err, ret) => {
             (err, ret) => {
-              if (!err && ret) Popup.close();
+              if (!err && ret) Popup.back();
             },
             },
           );
           );
         },
         },
@@ -432,7 +432,7 @@ BlazeComponent.extendComponent({
           const direction = down ? -1 : 1;
           const direction = down ? -1 : 1;
           this.setSortBy([sortby, direction]);
           this.setSortBy([sortby, direction]);
           if (Utils.isMiniScreen) {
           if (Utils.isMiniScreen) {
-            Popup.close();
+            Popup.back();
           }
           }
         },
         },
       },
       },
@@ -451,7 +451,7 @@ BlazeComponent.extendComponent({
           };
           };
           Session.set('sortBy', sortBy);
           Session.set('sortBy', sortBy);
           sortCardsBy.set(TAPi18n.__('due-date'));
           sortCardsBy.set(TAPi18n.__('due-date'));
-          Popup.close();
+          Popup.back();
         },
         },
         'click .js-sort-title'() {
         'click .js-sort-title'() {
           const sortBy = {
           const sortBy = {
@@ -459,7 +459,7 @@ BlazeComponent.extendComponent({
           };
           };
           Session.set('sortBy', sortBy);
           Session.set('sortBy', sortBy);
           sortCardsBy.set(TAPi18n.__('title'));
           sortCardsBy.set(TAPi18n.__('title'));
-          Popup.close();
+          Popup.back();
         },
         },
         'click .js-sort-created-asc'() {
         'click .js-sort-created-asc'() {
           const sortBy = {
           const sortBy = {
@@ -467,7 +467,7 @@ BlazeComponent.extendComponent({
           };
           };
           Session.set('sortBy', sortBy);
           Session.set('sortBy', sortBy);
           sortCardsBy.set(TAPi18n.__('date-created-newest-first'));
           sortCardsBy.set(TAPi18n.__('date-created-newest-first'));
-          Popup.close();
+          Popup.back();
         },
         },
         'click .js-sort-created-desc'() {
         'click .js-sort-created-desc'() {
           const sortBy = {
           const sortBy = {
@@ -475,7 +475,7 @@ BlazeComponent.extendComponent({
           };
           };
           Session.set('sortBy', sortBy);
           Session.set('sortBy', sortBy);
           sortCardsBy.set(TAPi18n.__('date-created-oldest-first'));
           sortCardsBy.set(TAPi18n.__('date-created-oldest-first'));
-          Popup.close();
+          Popup.back();
         },
         },
       },
       },
     ];
     ];

+ 4 - 4
client/components/cards/attachments.js

@@ -4,7 +4,7 @@ Template.attachmentsGalery.events({
     'attachmentDelete',
     'attachmentDelete',
     function() {
     function() {
       Attachments.remove(this._id);
       Attachments.remove(this._id);
-      Popup.close();
+      Popup.back();
     },
     },
   ),
   ),
   // If we let this event bubble, FlowRouter will handle it and empty the page
   // If we let this event bubble, FlowRouter will handle it and empty the page
@@ -53,7 +53,7 @@ Template.attachmentsGalery.helpers({
 
 
 Template.previewAttachedImagePopup.events({
 Template.previewAttachedImagePopup.events({
   'click .js-large-image-clicked'() {
   'click .js-large-image-clicked'() {
-    Popup.close();
+    Popup.back();
   },
   },
 });
 });
 
 
@@ -65,7 +65,7 @@ Template.cardAttachmentsPopup.events({
         if (attachment && attachment._id && attachment.isImage()) {
         if (attachment && attachment._id && attachment.isImage()) {
           card.setCover(attachment._id);
           card.setCover(attachment._id);
         }
         }
-        Popup.close();
+        Popup.back();
       });
       });
     };
     };
 
 
@@ -174,7 +174,7 @@ Template.previewClipboardImagePopup.events({
 
 
       pastedResults = null;
       pastedResults = null;
       $(document.body).pasteImageReader(() => {});
       $(document.body).pasteImageReader(() => {});
-      Popup.close();
+      Popup.back();
     }
     }
   },
   },
 });
 });

+ 12 - 8
client/components/cards/cardDetails.jade

@@ -8,26 +8,30 @@ template(name="cardDetails")
         +editCardTitleForm
         +editCardTitleForm
       else
       else
         unless isMiniScreen
         unless isMiniScreen
-          a.fa.fa-times-thin.close-card-details.js-close-card-details(title="{{_ 'close-card'}}")
-          unless cardMaximized
-            a.fa.fa-window-maximize.maximize-card-details.js-maximize-card-details(title="{{_ 'maximize-card'}}")
-          if cardMaximized
-            a.fa.fa-window-minimize.minimize-card-details.js-minimize-card-details(title="{{_ 'minimize-card'}}")
+          unless isPopup
+            a.fa.fa-times-thin.close-card-details.js-close-card-details(title="{{_ 'close-card'}}")
+            if cardMaximized
+              a.fa.fa-window-minimize.minimize-card-details.js-minimize-card-details(title="{{_ 'minimize-card'}}")
+            else
+              a.fa.fa-window-maximize.maximize-card-details.js-maximize-card-details(title="{{_ 'maximize-card'}}")
           if currentUser.isBoardMember
           if currentUser.isBoardMember
             a.fa.fa-navicon.card-details-menu.js-open-card-details-menu(title="{{_ 'cardDetailsActionsPopup-title'}}")
             a.fa.fa-navicon.card-details-menu.js-open-card-details-menu(title="{{_ 'cardDetailsActionsPopup-title'}}")
-            input.inline-input(type="text" id="cardURL_copy" value="{{ originRelativeUrl }}")
             a.fa.fa-link.card-copy-button.js-copy-link(
             a.fa.fa-link.card-copy-button.js-copy-link(
+              id="cardURL_copy"
               class="fa-link"
               class="fa-link"
               title="{{_ 'copy-card-link-to-clipboard'}}"
               title="{{_ 'copy-card-link-to-clipboard'}}"
+              href="{{ originRelativeUrl }}"
             )
             )
-        if isMiniScreen
+        else
           unless isPopup
           unless isPopup
             a.fa.fa-times-thin.close-card-details.js-close-card-details(title="{{_ 'close-card'}}")
             a.fa.fa-times-thin.close-card-details.js-close-card-details(title="{{_ 'close-card'}}")
           if currentUser.isBoardMember
           if currentUser.isBoardMember
             a.fa.fa-navicon.card-details-menu-mobile-web.js-open-card-details-menu(title="{{_ 'cardDetailsActionsPopup-title'}}")
             a.fa.fa-navicon.card-details-menu-mobile-web.js-open-card-details-menu(title="{{_ 'cardDetailsActionsPopup-title'}}")
-            a.fa.fa-link.card-copy-mobile-button(
+            a.fa.fa-link.card-copy-mobile-button.js-copy-link(
+              id="cardURL_copy"
               class="fa-link"
               class="fa-link"
               title="{{_ 'copy-card-link-to-clipboard'}}"
               title="{{_ 'copy-card-link-to-clipboard'}}"
+              href="{{ originRelativeUrl }}"
             )
             )
         h2.card-details-title.js-card-title(
         h2.card-details-title.js-card-title(
           class="{{#if canModifyCard}}js-open-inlined-form is-editable{{/if}}")
           class="{{#if canModifyCard}}js-open-inlined-form is-editable{{/if}}")

+ 52 - 70
client/components/cards/cardDetails.js

@@ -323,7 +323,8 @@ BlazeComponent.extendComponent({
         'click .js-close-card-details'() {
         'click .js-close-card-details'() {
           Utils.goBoardId(this.data().boardId);
           Utils.goBoardId(this.data().boardId);
         },
         },
-        'click .js-copy-link'() {
+        'click .js-copy-link'(event) {
+          event.preventDefault();
           const StringToCopyElement = document.getElementById('cardURL_copy');
           const StringToCopyElement = document.getElementById('cardURL_copy');
           StringToCopyElement.value =
           StringToCopyElement.value =
             window.location.origin + window.location.pathname;
             window.location.origin + window.location.pathname;
@@ -680,6 +681,7 @@ Template.cardDetailsActionsPopup.events({
         .map((c) => c.sort),
         .map((c) => c.sort),
     );
     );
     this.move(this.boardId, this.swimlaneId, this.listId, minOrder - 1);
     this.move(this.boardId, this.swimlaneId, this.listId, minOrder - 1);
+    Popup.back();
   },
   },
   'click .js-move-card-to-bottom'(event) {
   'click .js-move-card-to-bottom'(event) {
     event.preventDefault();
     event.preventDefault();
@@ -691,7 +693,7 @@ Template.cardDetailsActionsPopup.events({
     this.move(this.boardId, this.swimlaneId, this.listId, maxOrder + 1);
     this.move(this.boardId, this.swimlaneId, this.listId, maxOrder + 1);
   },
   },
   'click .js-archive': Popup.afterConfirm('cardArchive', function () {
   'click .js-archive': Popup.afterConfirm('cardArchive', function () {
-    Popup.close();
+    Popup.back();
     this.archive();
     this.archive();
     Utils.goBoardId(this.boardId);
     Utils.goBoardId(this.boardId);
   }),
   }),
@@ -700,7 +702,7 @@ Template.cardDetailsActionsPopup.events({
     const currentCard = this;
     const currentCard = this;
     const level = currentCard.findWatcher(Meteor.userId()) ? null : 'watching';
     const level = currentCard.findWatcher(Meteor.userId()) ? null : 'watching';
     Meteor.call('watch', 'card', currentCard._id, level, (err, ret) => {
     Meteor.call('watch', 'card', currentCard._id, level, (err, ret) => {
-      if (!err && ret) Popup.close();
+      if (!err && ret) Popup.back();
     });
     });
   },
   },
 });
 });
@@ -819,7 +821,13 @@ Template.moveCardPopup.events({
     const slSelect = $('.js-select-swimlanes')[0];
     const slSelect = $('.js-select-swimlanes')[0];
     const swimlaneId = slSelect.options[slSelect.selectedIndex].value;
     const swimlaneId = slSelect.options[slSelect.selectedIndex].value;
     card.move(boardId, swimlaneId, listId, 0);
     card.move(boardId, swimlaneId, listId, 0);
-    Popup.close();
+
+    // set new id's to card object in case the card is moved to top by the comment "moveCard" after this command (.js-move-card)
+    this.boardId = boardId;
+    this.swimlaneId = swimlaneId;
+    this.listId = listId;
+
+    Popup.back();
   },
   },
 });
 });
 BlazeComponent.extendComponent({
 BlazeComponent.extendComponent({
@@ -887,7 +895,7 @@ Template.copyCardPopup.events({
       // See https://github.com/wekan/wekan/issues/80
       // See https://github.com/wekan/wekan/issues/80
       Filter.addException(_id);
       Filter.addException(_id);
 
 
-      Popup.close();
+      Popup.back();
     }
     }
   },
   },
 });
 });
@@ -914,7 +922,7 @@ Template.convertChecklistItemToCardPopup.events({
       });
       });
       Filter.addException(_id);
       Filter.addException(_id);
 
 
-      Popup.close();
+      Popup.back();
 
 
     }
     }
   },
   },
@@ -970,7 +978,7 @@ Template.copyChecklistToManyCardsPopup.events({
           cmt.copy(_id);
           cmt.copy(_id);
         });
         });
       }
       }
-      Popup.close();
+      Popup.back();
     }
     }
   },
   },
 });
 });
@@ -1000,11 +1008,11 @@ BlazeComponent.extendComponent({
         },
         },
         'click .js-submit'() {
         'click .js-submit'() {
           this.currentCard.setColor(this.currentColor.get());
           this.currentCard.setColor(this.currentColor.get());
-          Popup.close();
+          Popup.back();
         },
         },
         'click .js-remove-color'() {
         'click .js-remove-color'() {
           this.currentCard.setColor(null);
           this.currentCard.setColor(null);
-          Popup.close();
+          Popup.back();
         },
         },
       },
       },
     ];
     ];
@@ -1106,7 +1114,7 @@ BlazeComponent.extendComponent({
           }
           }
         },
         },
         'click .js-delete': Popup.afterConfirm('cardDelete', function () {
         'click .js-delete': Popup.afterConfirm('cardDelete', function () {
-          Popup.close();
+          Popup.back();
           // verify that there are no linked cards
           // verify that there are no linked cards
           if (Cards.find({ linkedId: this._id }).count() === 0) {
           if (Cards.find({ linkedId: this._id }).count() === 0) {
             Cards.remove(this._id);
             Cards.remove(this._id);
@@ -1173,12 +1181,12 @@ BlazeComponent.extendComponent({
           if (endString) {
           if (endString) {
             this.currentCard.setVoteEnd(endString);
             this.currentCard.setVoteEnd(endString);
           }
           }
-          Popup.close();
+          Popup.back();
         },
         },
         'click .js-remove-vote': Popup.afterConfirm('deleteVote', () => {
         'click .js-remove-vote': Popup.afterConfirm('deleteVote', () => {
           event.preventDefault();
           event.preventDefault();
           this.currentCard.unsetVote();
           this.currentCard.unsetVote();
-          Popup.close();
+          Popup.back();
         }),
         }),
         'click a.js-toggle-vote-public'(event) {
         'click a.js-toggle-vote-public'(event) {
           event.preventDefault();
           event.preventDefault();
@@ -1218,7 +1226,7 @@ BlazeComponent.extendComponent({
             // if active vote -  store it
             // if active vote -  store it
             if (this.currentData().getVoteQuestion()) {
             if (this.currentData().getVoteQuestion()) {
               this._storeDate(newDate.toDate());
               this._storeDate(newDate.toDate());
-              Popup.close();
+              Popup.back();
             } else {
             } else {
               this.currentData().vote = { end: newDate.toDate() }; // set vote end temp
               this.currentData().vote = { end: newDate.toDate() }; // set vote end temp
               Popup.back();
               Popup.back();
@@ -1252,86 +1260,77 @@ BlazeComponent.extendComponent({
             // if active poker -  store it
             // if active poker -  store it
             if (this.currentData().getPokerQuestion()) {
             if (this.currentData().getPokerQuestion()) {
               this._storeDate(usaDate.toDate());
               this._storeDate(usaDate.toDate());
-              Popup.close();
             } else {
             } else {
               this.currentData().poker = { end: usaDate.toDate() }; // set poker end temp
               this.currentData().poker = { end: usaDate.toDate() }; // set poker end temp
-              Popup.back();
             }
             }
+            Popup.back();
           } else if (euroAmDate.isValid()) {
           } else if (euroAmDate.isValid()) {
             // if active poker -  store it
             // if active poker -  store it
             if (this.currentData().getPokerQuestion()) {
             if (this.currentData().getPokerQuestion()) {
               this._storeDate(euroAmDate.toDate());
               this._storeDate(euroAmDate.toDate());
-              Popup.close();
             } else {
             } else {
               this.currentData().poker = { end: euroAmDate.toDate() }; // set poker end temp
               this.currentData().poker = { end: euroAmDate.toDate() }; // set poker end temp
-              Popup.back();
             }
             }
+            Popup.back();
           } else if (euro24hDate.isValid()) {
           } else if (euro24hDate.isValid()) {
             // if active poker -  store it
             // if active poker -  store it
             if (this.currentData().getPokerQuestion()) {
             if (this.currentData().getPokerQuestion()) {
               this._storeDate(euro24hDate.toDate());
               this._storeDate(euro24hDate.toDate());
               this.card.setPokerEnd(euro24hDate.toDate());
               this.card.setPokerEnd(euro24hDate.toDate());
-              Popup.close();
             } else {
             } else {
               this.currentData().poker = { end: euro24hDate.toDate() }; // set poker end temp
               this.currentData().poker = { end: euro24hDate.toDate() }; // set poker end temp
-              Popup.back();
             }
             }
+            Popup.back();
           } else if (eurodotDate.isValid()) {
           } else if (eurodotDate.isValid()) {
             // if active poker -  store it
             // if active poker -  store it
             if (this.currentData().getPokerQuestion()) {
             if (this.currentData().getPokerQuestion()) {
               this._storeDate(eurodotDate.toDate());
               this._storeDate(eurodotDate.toDate());
               this.card.setPokerEnd(eurodotDate.toDate());
               this.card.setPokerEnd(eurodotDate.toDate());
-              Popup.close();
             } else {
             } else {
               this.currentData().poker = { end: eurodotDate.toDate() }; // set poker end temp
               this.currentData().poker = { end: eurodotDate.toDate() }; // set poker end temp
-              Popup.back();
             }
             }
+            Popup.back();
           } else if (minusDate.isValid()) {
           } else if (minusDate.isValid()) {
             // if active poker -  store it
             // if active poker -  store it
             if (this.currentData().getPokerQuestion()) {
             if (this.currentData().getPokerQuestion()) {
               this._storeDate(minusDate.toDate());
               this._storeDate(minusDate.toDate());
               this.card.setPokerEnd(minusDate.toDate());
               this.card.setPokerEnd(minusDate.toDate());
-              Popup.close();
             } else {
             } else {
               this.currentData().poker = { end: minusDate.toDate() }; // set poker end temp
               this.currentData().poker = { end: minusDate.toDate() }; // set poker end temp
-              Popup.back();
             }
             }
+            Popup.back();
           } else if (slashDate.isValid()) {
           } else if (slashDate.isValid()) {
             // if active poker -  store it
             // if active poker -  store it
             if (this.currentData().getPokerQuestion()) {
             if (this.currentData().getPokerQuestion()) {
               this._storeDate(slashDate.toDate());
               this._storeDate(slashDate.toDate());
               this.card.setPokerEnd(slashDate.toDate());
               this.card.setPokerEnd(slashDate.toDate());
-              Popup.close();
             } else {
             } else {
               this.currentData().poker = { end: slashDate.toDate() }; // set poker end temp
               this.currentData().poker = { end: slashDate.toDate() }; // set poker end temp
-              Popup.back();
             }
             }
+            Popup.back();
           } else if (dotDate.isValid()) {
           } else if (dotDate.isValid()) {
             // if active poker -  store it
             // if active poker -  store it
             if (this.currentData().getPokerQuestion()) {
             if (this.currentData().getPokerQuestion()) {
               this._storeDate(dotDate.toDate());
               this._storeDate(dotDate.toDate());
               this.card.setPokerEnd(dotDate.toDate());
               this.card.setPokerEnd(dotDate.toDate());
-              Popup.close();
             } else {
             } else {
               this.currentData().poker = { end: dotDate.toDate() }; // set poker end temp
               this.currentData().poker = { end: dotDate.toDate() }; // set poker end temp
-              Popup.back();
             }
             }
+            Popup.back();
           } else if (brezhonegDate.isValid()) {
           } else if (brezhonegDate.isValid()) {
             // if active poker -  store it
             // if active poker -  store it
             if (this.currentData().getPokerQuestion()) {
             if (this.currentData().getPokerQuestion()) {
               this._storeDate(brezhonegDate.toDate());
               this._storeDate(brezhonegDate.toDate());
               this.card.setPokerEnd(brezhonegDate.toDate());
               this.card.setPokerEnd(brezhonegDate.toDate());
-              Popup.close();
             } else {
             } else {
               this.currentData().poker = { end: brezhonegDate.toDate() }; // set poker end temp
               this.currentData().poker = { end: brezhonegDate.toDate() }; // set poker end temp
-              Popup.back();
             }
             }
+            Popup.back();
           } else if (hrvatskiDate.isValid()) {
           } else if (hrvatskiDate.isValid()) {
             // if active poker -  store it
             // if active poker -  store it
             if (this.currentData().getPokerQuestion()) {
             if (this.currentData().getPokerQuestion()) {
               this._storeDate(hrvatskiDate.toDate());
               this._storeDate(hrvatskiDate.toDate());
               this.card.setPokerEnd(hrvatskiDate.toDate());
               this.card.setPokerEnd(hrvatskiDate.toDate());
-              Popup.close();
             } else {
             } else {
               this.currentData().poker = { end: hrvatskiDate.toDate() }; // set poker end temp
               this.currentData().poker = { end: hrvatskiDate.toDate() }; // set poker end temp
               Popup.back();
               Popup.back();
@@ -1341,41 +1340,37 @@ BlazeComponent.extendComponent({
             if (this.currentData().getPokerQuestion()) {
             if (this.currentData().getPokerQuestion()) {
               this._storeDate(latviaDate.toDate());
               this._storeDate(latviaDate.toDate());
               this.card.setPokerEnd(latviaDate.toDate());
               this.card.setPokerEnd(latviaDate.toDate());
-              Popup.close();
             } else {
             } else {
               this.currentData().poker = { end: latviaDate.toDate() }; // set poker end temp
               this.currentData().poker = { end: latviaDate.toDate() }; // set poker end temp
-              Popup.back();
             }
             }
+            Popup.back();
           } else if (nederlandsDate.isValid()) {
           } else if (nederlandsDate.isValid()) {
             // if active poker -  store it
             // if active poker -  store it
             if (this.currentData().getPokerQuestion()) {
             if (this.currentData().getPokerQuestion()) {
               this._storeDate(nederlandsDate.toDate());
               this._storeDate(nederlandsDate.toDate());
               this.card.setPokerEnd(nederlandsDate.toDate());
               this.card.setPokerEnd(nederlandsDate.toDate());
-              Popup.close();
             } else {
             } else {
               this.currentData().poker = { end: nederlandsDate.toDate() }; // set poker end temp
               this.currentData().poker = { end: nederlandsDate.toDate() }; // set poker end temp
-              Popup.back();
             }
             }
+            Popup.back();
           } else if (greekDate.isValid()) {
           } else if (greekDate.isValid()) {
             // if active poker -  store it
             // if active poker -  store it
             if (this.currentData().getPokerQuestion()) {
             if (this.currentData().getPokerQuestion()) {
               this._storeDate(greekDate.toDate());
               this._storeDate(greekDate.toDate());
               this.card.setPokerEnd(greekDate.toDate());
               this.card.setPokerEnd(greekDate.toDate());
-              Popup.close();
             } else {
             } else {
               this.currentData().poker = { end: greekDate.toDate() }; // set poker end temp
               this.currentData().poker = { end: greekDate.toDate() }; // set poker end temp
-              Popup.back();
             }
             }
+            Popup.back();
           } else if (macedonianDate.isValid()) {
           } else if (macedonianDate.isValid()) {
             // if active poker -  store it
             // if active poker -  store it
             if (this.currentData().getPokerQuestion()) {
             if (this.currentData().getPokerQuestion()) {
               this._storeDate(macedonianDate.toDate());
               this._storeDate(macedonianDate.toDate());
               this.card.setPokerEnd(macedonianDate.toDate());
               this.card.setPokerEnd(macedonianDate.toDate());
-              Popup.close();
             } else {
             } else {
               this.currentData().poker = { end: macedonianDate.toDate() }; // set poker end temp
               this.currentData().poker = { end: macedonianDate.toDate() }; // set poker end temp
-              Popup.back();
             }
             }
+            Popup.back();
           } else {
           } else {
             this.error.set('invalid-date');
             this.error.set('invalid-date');
             evt.target.date.focus();
             evt.target.date.focus();
@@ -1384,7 +1379,7 @@ BlazeComponent.extendComponent({
         'click .js-delete-date'(evt) {
         'click .js-delete-date'(evt) {
           evt.preventDefault();
           evt.preventDefault();
           this._deleteDate();
           this._deleteDate();
-          Popup.close();
+          Popup.back();
         },
         },
       },
       },
     ];
     ];
@@ -1422,11 +1417,11 @@ BlazeComponent.extendComponent({
           if (endString) {
           if (endString) {
             this.currentCard.setPokerEnd(endString);
             this.currentCard.setPokerEnd(endString);
           }
           }
-          Popup.close();
+          Popup.back();
         },
         },
         'click .js-remove-poker': Popup.afterConfirm('deletePoker', (event) => {
         'click .js-remove-poker': Popup.afterConfirm('deletePoker', (event) => {
           this.currentCard.unsetPoker();
           this.currentCard.unsetPoker();
-          Popup.close();
+          Popup.back();
         }),
         }),
         'click a.js-toggle-poker-allow-non-members'(event) {
         'click a.js-toggle-poker-allow-non-members'(event) {
           event.preventDefault();
           event.preventDefault();
@@ -1489,7 +1484,7 @@ BlazeComponent.extendComponent({
             // if active poker -  store it
             // if active poker -  store it
             if (this.currentData().getPokerQuestion()) {
             if (this.currentData().getPokerQuestion()) {
               this._storeDate(newDate.toDate());
               this._storeDate(newDate.toDate());
-              Popup.close();
+              Popup.back();
             } else {
             } else {
               this.currentData().poker = { end: newDate.toDate() }; // set poker end temp
               this.currentData().poker = { end: newDate.toDate() }; // set poker end temp
               Popup.back();
               Popup.back();
@@ -1521,130 +1516,117 @@ BlazeComponent.extendComponent({
             // if active poker -  store it
             // if active poker -  store it
             if (this.currentData().getPokerQuestion()) {
             if (this.currentData().getPokerQuestion()) {
               this._storeDate(usaDate.toDate());
               this._storeDate(usaDate.toDate());
-              Popup.close();
             } else {
             } else {
               this.currentData().poker = { end: usaDate.toDate() }; // set poker end temp
               this.currentData().poker = { end: usaDate.toDate() }; // set poker end temp
-              Popup.back();
             }
             }
+            Popup.back();
           } else if (euroAmDate.isValid()) {
           } else if (euroAmDate.isValid()) {
             // if active poker -  store it
             // if active poker -  store it
             if (this.currentData().getPokerQuestion()) {
             if (this.currentData().getPokerQuestion()) {
               this._storeDate(euroAmDate.toDate());
               this._storeDate(euroAmDate.toDate());
-              Popup.close();
             } else {
             } else {
               this.currentData().poker = { end: euroAmDate.toDate() }; // set poker end temp
               this.currentData().poker = { end: euroAmDate.toDate() }; // set poker end temp
-              Popup.back();
             }
             }
+            Popup.back();
           } else if (euro24hDate.isValid()) {
           } else if (euro24hDate.isValid()) {
             // if active poker -  store it
             // if active poker -  store it
             if (this.currentData().getPokerQuestion()) {
             if (this.currentData().getPokerQuestion()) {
               this._storeDate(euro24hDate.toDate());
               this._storeDate(euro24hDate.toDate());
               this.card.setPokerEnd(euro24hDate.toDate());
               this.card.setPokerEnd(euro24hDate.toDate());
-              Popup.close();
             } else {
             } else {
               this.currentData().poker = { end: euro24hDate.toDate() }; // set poker end temp
               this.currentData().poker = { end: euro24hDate.toDate() }; // set poker end temp
-              Popup.back();
             }
             }
+            Popup.back();
           } else if (eurodotDate.isValid()) {
           } else if (eurodotDate.isValid()) {
             // if active poker -  store it
             // if active poker -  store it
             if (this.currentData().getPokerQuestion()) {
             if (this.currentData().getPokerQuestion()) {
               this._storeDate(eurodotDate.toDate());
               this._storeDate(eurodotDate.toDate());
               this.card.setPokerEnd(eurodotDate.toDate());
               this.card.setPokerEnd(eurodotDate.toDate());
-              Popup.close();
             } else {
             } else {
               this.currentData().poker = { end: eurodotDate.toDate() }; // set poker end temp
               this.currentData().poker = { end: eurodotDate.toDate() }; // set poker end temp
-              Popup.back();
             }
             }
+            Popup.back();
           } else if (minusDate.isValid()) {
           } else if (minusDate.isValid()) {
             // if active poker -  store it
             // if active poker -  store it
             if (this.currentData().getPokerQuestion()) {
             if (this.currentData().getPokerQuestion()) {
               this._storeDate(minusDate.toDate());
               this._storeDate(minusDate.toDate());
               this.card.setPokerEnd(minusDate.toDate());
               this.card.setPokerEnd(minusDate.toDate());
-              Popup.close();
             } else {
             } else {
               this.currentData().poker = { end: minusDate.toDate() }; // set poker end temp
               this.currentData().poker = { end: minusDate.toDate() }; // set poker end temp
-              Popup.back();
             }
             }
+            Popup.back();
           } else if (slashDate.isValid()) {
           } else if (slashDate.isValid()) {
             // if active poker -  store it
             // if active poker -  store it
             if (this.currentData().getPokerQuestion()) {
             if (this.currentData().getPokerQuestion()) {
               this._storeDate(slashDate.toDate());
               this._storeDate(slashDate.toDate());
               this.card.setPokerEnd(slashDate.toDate());
               this.card.setPokerEnd(slashDate.toDate());
-              Popup.close();
             } else {
             } else {
               this.currentData().poker = { end: slashDate.toDate() }; // set poker end temp
               this.currentData().poker = { end: slashDate.toDate() }; // set poker end temp
-              Popup.back();
             }
             }
+            Popup.back();
           } else if (dotDate.isValid()) {
           } else if (dotDate.isValid()) {
             // if active poker -  store it
             // if active poker -  store it
             if (this.currentData().getPokerQuestion()) {
             if (this.currentData().getPokerQuestion()) {
               this._storeDate(dotDate.toDate());
               this._storeDate(dotDate.toDate());
               this.card.setPokerEnd(dotDate.toDate());
               this.card.setPokerEnd(dotDate.toDate());
-              Popup.close();
             } else {
             } else {
               this.currentData().poker = { end: dotDate.toDate() }; // set poker end temp
               this.currentData().poker = { end: dotDate.toDate() }; // set poker end temp
-              Popup.back();
             }
             }
+            Popup.back();
           } else if (brezhonegDate.isValid()) {
           } else if (brezhonegDate.isValid()) {
             // if active poker -  store it
             // if active poker -  store it
             if (this.currentData().getPokerQuestion()) {
             if (this.currentData().getPokerQuestion()) {
               this._storeDate(brezhonegDate.toDate());
               this._storeDate(brezhonegDate.toDate());
               this.card.setPokerEnd(brezhonegDate.toDate());
               this.card.setPokerEnd(brezhonegDate.toDate());
-              Popup.close();
             } else {
             } else {
               this.currentData().poker = { end: brezhonegDate.toDate() }; // set poker end temp
               this.currentData().poker = { end: brezhonegDate.toDate() }; // set poker end temp
-              Popup.back();
             }
             }
+            Popup.back();
           } else if (hrvatskiDate.isValid()) {
           } else if (hrvatskiDate.isValid()) {
             // if active poker -  store it
             // if active poker -  store it
             if (this.currentData().getPokerQuestion()) {
             if (this.currentData().getPokerQuestion()) {
               this._storeDate(hrvatskiDate.toDate());
               this._storeDate(hrvatskiDate.toDate());
               this.card.setPokerEnd(hrvatskiDate.toDate());
               this.card.setPokerEnd(hrvatskiDate.toDate());
-              Popup.close();
             } else {
             } else {
               this.currentData().poker = { end: hrvatskiDate.toDate() }; // set poker end temp
               this.currentData().poker = { end: hrvatskiDate.toDate() }; // set poker end temp
-              Popup.back();
             }
             }
+            Popup.back();
           } else if (latviaDate.isValid()) {
           } else if (latviaDate.isValid()) {
             // if active poker -  store it
             // if active poker -  store it
             if (this.currentData().getPokerQuestion()) {
             if (this.currentData().getPokerQuestion()) {
               this._storeDate(latviaDate.toDate());
               this._storeDate(latviaDate.toDate());
               this.card.setPokerEnd(latviaDate.toDate());
               this.card.setPokerEnd(latviaDate.toDate());
-              Popup.close();
             } else {
             } else {
               this.currentData().poker = { end: latviaDate.toDate() }; // set poker end temp
               this.currentData().poker = { end: latviaDate.toDate() }; // set poker end temp
-              Popup.back();
             }
             }
+            Popup.back();
           } else if (nederlandsDate.isValid()) {
           } else if (nederlandsDate.isValid()) {
             // if active poker -  store it
             // if active poker -  store it
             if (this.currentData().getPokerQuestion()) {
             if (this.currentData().getPokerQuestion()) {
               this._storeDate(nederlandsDate.toDate());
               this._storeDate(nederlandsDate.toDate());
               this.card.setPokerEnd(nederlandsDate.toDate());
               this.card.setPokerEnd(nederlandsDate.toDate());
-              Popup.close();
             } else {
             } else {
               this.currentData().poker = { end: nederlandsDate.toDate() }; // set poker end temp
               this.currentData().poker = { end: nederlandsDate.toDate() }; // set poker end temp
-              Popup.back();
             }
             }
+            Popup.back();
           } else if (greekDate.isValid()) {
           } else if (greekDate.isValid()) {
             // if active poker -  store it
             // if active poker -  store it
             if (this.currentData().getPokerQuestion()) {
             if (this.currentData().getPokerQuestion()) {
               this._storeDate(greekDate.toDate());
               this._storeDate(greekDate.toDate());
               this.card.setPokerEnd(greekDate.toDate());
               this.card.setPokerEnd(greekDate.toDate());
-              Popup.close();
             } else {
             } else {
               this.currentData().poker = { end: greekDate.toDate() }; // set poker end temp
               this.currentData().poker = { end: greekDate.toDate() }; // set poker end temp
-              Popup.back();
             }
             }
+            Popup.back();
           } else if (macedonianDate.isValid()) {
           } else if (macedonianDate.isValid()) {
             // if active poker -  store it
             // if active poker -  store it
             if (this.currentData().getPokerQuestion()) {
             if (this.currentData().getPokerQuestion()) {
               this._storeDate(macedonianDate.toDate());
               this._storeDate(macedonianDate.toDate());
               this.card.setPokerEnd(macedonianDate.toDate());
               this.card.setPokerEnd(macedonianDate.toDate());
-              Popup.close();
             } else {
             } else {
               this.currentData().poker = { end: macedonianDate.toDate() }; // set poker end temp
               this.currentData().poker = { end: macedonianDate.toDate() }; // set poker end temp
-              Popup.back();
             }
             }
+            Popup.back();
           } else {
           } else {
             // this.error.set('invalid-date);
             // this.error.set('invalid-date);
             this.error.set('invalid-date' + ' ' + dateString);
             this.error.set('invalid-date' + ' ' + dateString);
@@ -1654,7 +1636,7 @@ BlazeComponent.extendComponent({
         'click .js-delete-date'(evt) {
         'click .js-delete-date'(evt) {
           evt.preventDefault();
           evt.preventDefault();
           this._deleteDate();
           this._deleteDate();
-          Popup.close();
+          Popup.back();
         },
         },
       },
       },
     ];
     ];
@@ -1781,7 +1763,7 @@ Template.cardAssigneePopup.helpers({
 Template.cardAssigneePopup.events({
 Template.cardAssigneePopup.events({
   'click .js-remove-assignee'() {
   'click .js-remove-assignee'() {
     Cards.findOne(this.cardId).unassignAssignee(this.userId);
     Cards.findOne(this.cardId).unassignAssignee(this.userId);
-    Popup.close();
+    Popup.back();
   },
   },
   'click .js-edit-profile': Popup.open('editProfile'),
   'click .js-edit-profile': Popup.open('editProfile'),
 });
 });

+ 0 - 9
client/components/cards/cardDetails.styl

@@ -4,15 +4,6 @@
 
 
 avatar-radius = 50%
 avatar-radius = 50%
 
 
-#cardURL_copy
-  // Have clipboard text not visible by moving it to far left
-  position: absolute
-  left: -2000px
-  top: 0px
-
-#clipboard
-  white-space: normal
-
 .assignee
 .assignee
   border-radius: 3px
   border-radius: 3px
   display: block
   display: block

+ 2 - 2
client/components/cards/cardTime.js

@@ -34,7 +34,7 @@ BlazeComponent.extendComponent({
           }
           }
           if (spentTime >= 0) {
           if (spentTime >= 0) {
             this.storeTime(spentTime, isOvertime);
             this.storeTime(spentTime, isOvertime);
-            Popup.close();
+            Popup.back();
           } else {
           } else {
             this.error.set('invalid-time');
             this.error.set('invalid-time');
             evt.target.time.focus();
             evt.target.time.focus();
@@ -43,7 +43,7 @@ BlazeComponent.extendComponent({
         'click .js-delete-time'(evt) {
         'click .js-delete-time'(evt) {
           evt.preventDefault();
           evt.preventDefault();
           this.deleteTime();
           this.deleteTime();
-          Popup.close();
+          Popup.back();
         },
         },
         'click a.js-toggle-overtime': this.toggleOvertime,
         'click a.js-toggle-overtime': this.toggleOvertime,
       },
       },

+ 1 - 1
client/components/cards/minicard.js

@@ -106,7 +106,7 @@ BlazeComponent.extendComponent({
           if (!Number.isNaN(sort)) {
           if (!Number.isNaN(sort)) {
             let card = this.data();
             let card = this.data();
             card.move(card.boardId, card.swimlaneId, card.listId, sort);
             card.move(card.boardId, card.swimlaneId, card.listId, sort);
-            Popup.close();
+            Popup.back();
           }
           }
         },
         },
       }
       }

+ 1 - 1
client/components/cards/resultCard.jade

@@ -1,6 +1,6 @@
 template(name="resultCard")
 template(name="resultCard")
   .result-card-wrapper
   .result-card-wrapper
-    a.minicard-wrapper.card-title(href=originRelativeUrl)
+    a.minicard-wrapper.js-minicard.card-title(href=originRelativeUrl)
       +minicard(this)
       +minicard(this)
       //= card.title
       //= card.title
     ul.result-card-context-list
     ul.result-card-context-list

+ 17 - 1
client/components/cards/resultCard.js

@@ -5,7 +5,23 @@ Template.resultCard.helpers({
 });
 });
 
 
 BlazeComponent.extendComponent({
 BlazeComponent.extendComponent({
+  clickOnMiniCard(evt) {
+    evt.preventDefault();
+    Session.set('popupCard', this.currentData()._id);
+    this.cardDetailsPopup(evt);
+  },
+
+  cardDetailsPopup(event) {
+    if (!Popup.isOpen()) {
+      Popup.open("cardDetails")(event);
+    }
+  },
+
   events() {
   events() {
-    return [{}];
+    return [
+      {
+        'click .js-minicard': this.clickOnMiniCard,
+      },
+    ];
   },
   },
 }).register('resultCard');
 }).register('resultCard');

+ 6 - 6
client/components/lists/listBody.js

@@ -496,7 +496,7 @@ BlazeComponent.extendComponent({
           evt.preventDefault();
           evt.preventDefault();
           const linkedId = $('.js-select-cards option:selected').val();
           const linkedId = $('.js-select-cards option:selected').val();
           if (!linkedId) {
           if (!linkedId) {
-            Popup.close();
+            Popup.back();
             return;
             return;
           }
           }
           const _id = Cards.insert({
           const _id = Cards.insert({
@@ -511,7 +511,7 @@ BlazeComponent.extendComponent({
             linkedId,
             linkedId,
           });
           });
           Filter.addException(_id);
           Filter.addException(_id);
-          Popup.close();
+          Popup.back();
         },
         },
         'click .js-link-board'(evt) {
         'click .js-link-board'(evt) {
           //LINK BOARD
           //LINK BOARD
@@ -522,7 +522,7 @@ BlazeComponent.extendComponent({
             !impBoardId ||
             !impBoardId ||
             Cards.findOne({ linkedId: impBoardId, archived: false })
             Cards.findOne({ linkedId: impBoardId, archived: false })
           ) {
           ) {
-            Popup.close();
+            Popup.back();
             return;
             return;
           }
           }
           const _id = Cards.insert({
           const _id = Cards.insert({
@@ -537,7 +537,7 @@ BlazeComponent.extendComponent({
             linkedId: impBoardId,
             linkedId: impBoardId,
           });
           });
           Filter.addException(_id);
           Filter.addException(_id);
-          Popup.close();
+          Popup.back();
         },
         },
       },
       },
     ];
     ];
@@ -584,7 +584,7 @@ BlazeComponent.extendComponent({
       });
       });
     }
     }
     if (!board) {
     if (!board) {
-      Popup.close();
+      Popup.back();
       return;
       return;
     }
     }
     const boardId = board._id;
     const boardId = board._id;
@@ -711,7 +711,7 @@ BlazeComponent.extendComponent({
               },
               },
             );
             );
           }
           }
-          Popup.close();
+          Popup.back();
         },
         },
       },
       },
     ];
     ];

+ 6 - 6
client/components/lists/listHeader.js

@@ -145,19 +145,19 @@ Template.listActionPopup.events({
   'click .js-select-cards'() {
   'click .js-select-cards'() {
     const cardIds = this.allCards().map(card => card._id);
     const cardIds = this.allCards().map(card => card._id);
     MultiSelection.add(cardIds);
     MultiSelection.add(cardIds);
-    Popup.close();
+    Popup.back();
   },
   },
   'click .js-toggle-watch-list'() {
   'click .js-toggle-watch-list'() {
     const currentList = this;
     const currentList = this;
     const level = currentList.findWatcher(Meteor.userId()) ? null : 'watching';
     const level = currentList.findWatcher(Meteor.userId()) ? null : 'watching';
     Meteor.call('watch', 'list', currentList._id, level, (err, ret) => {
     Meteor.call('watch', 'list', currentList._id, level, (err, ret) => {
-      if (!err && ret) Popup.close();
+      if (!err && ret) Popup.back();
     });
     });
   },
   },
   'click .js-close-list'(event) {
   'click .js-close-list'(event) {
     event.preventDefault();
     event.preventDefault();
     this.archive();
     this.archive();
-    Popup.close();
+    Popup.back();
   },
   },
   'click .js-set-wip-limit': Popup.open('setWipLimit'),
   'click .js-set-wip-limit': Popup.open('setWipLimit'),
   'click .js-more': Popup.open('listMore'),
   'click .js-more': Popup.open('listMore'),
@@ -233,7 +233,7 @@ BlazeComponent.extendComponent({
 
 
 Template.listMorePopup.events({
 Template.listMorePopup.events({
   'click .js-delete': Popup.afterConfirm('listDelete', function() {
   'click .js-delete': Popup.afterConfirm('listDelete', function() {
-    Popup.close();
+    Popup.back();
     // TODO how can we avoid the fetch call?
     // TODO how can we avoid the fetch call?
     const allCards = this.allCards().fetch();
     const allCards = this.allCards().fetch();
     const allCardIds = _.pluck(allCards, '_id');
     const allCardIds = _.pluck(allCards, '_id');
@@ -299,11 +299,11 @@ BlazeComponent.extendComponent({
         },
         },
         'click .js-submit'() {
         'click .js-submit'() {
           this.currentList.setColor(this.currentColor.get());
           this.currentList.setColor(this.currentColor.get());
-          Popup.close();
+          Popup.back();
         },
         },
         'click .js-remove-color'() {
         'click .js-remove-color'() {
           this.currentList.setColor(null);
           this.currentList.setColor(null);
-          Popup.close();
+          Popup.back();
         },
         },
       },
       },
     ];
     ];

+ 2 - 2
client/components/main/dueCards.js

@@ -38,12 +38,12 @@ BlazeComponent.extendComponent({
       {
       {
         'click .js-due-cards-view-me'() {
         'click .js-due-cards-view-me'() {
           Utils.setDueCardsView('me');
           Utils.setDueCardsView('me');
-          Popup.close();
+          Popup.back();
         },
         },
 
 
         'click .js-due-cards-view-all'() {
         'click .js-due-cards-view-all'() {
           Utils.setDueCardsView('all');
           Utils.setDueCardsView('all');
-          Popup.close();
+          Popup.back();
         },
         },
       },
       },
     ];
     ];

+ 1 - 1
client/components/rules/actions/cardActions.js

@@ -232,7 +232,7 @@ BlazeComponent.extendComponent({
         },
         },
         'click .js-submit'() {
         'click .js-submit'() {
           this.colorButtonValue.set(this.currentColor.get());
           this.colorButtonValue.set(this.currentColor.get());
-          Popup.close();
+          Popup.back();
         },
         },
       },
       },
     ];
     ];

+ 1 - 1
client/components/rules/triggers/boardTriggers.js

@@ -116,6 +116,6 @@ Template.boardCardTitlePopup.events({
       .trim();
       .trim();
     Popup.getOpenerComponent().setNameFilter(title);
     Popup.getOpenerComponent().setNameFilter(title);
     event.preventDefault();
     event.preventDefault();
-    Popup.close();
+    Popup.back();
   },
   },
 });
 });

+ 13 - 13
client/components/settings/peopleBody.js

@@ -562,7 +562,7 @@ Template.editOrgPopup.events({
       );
       );
     }
     }
 
 
-    Popup.close();
+    Popup.back();
   },
   },
 });
 });
 
 
@@ -606,7 +606,7 @@ Template.editTeamPopup.events({
       );
       );
     }
     }
 
 
-    Popup.close();
+    Popup.back();
   },
   },
 });
 });
 
 
@@ -721,7 +721,7 @@ Template.editUserPopup.events({
           } else {
           } else {
             usernameMessageElement.hide();
             usernameMessageElement.hide();
             emailMessageElement.hide();
             emailMessageElement.hide();
-            Popup.close();
+            Popup.back();
           }
           }
         },
         },
       );
       );
@@ -735,7 +735,7 @@ Template.editUserPopup.events({
           }
           }
         } else {
         } else {
           usernameMessageElement.hide();
           usernameMessageElement.hide();
-          Popup.close();
+          Popup.back();
         }
         }
       });
       });
     } else if (isChangeEmail) {
     } else if (isChangeEmail) {
@@ -752,11 +752,11 @@ Template.editUserPopup.events({
             }
             }
           } else {
           } else {
             emailMessageElement.hide();
             emailMessageElement.hide();
-            Popup.close();
+            Popup.back();
           }
           }
         },
         },
       );
       );
-    } else Popup.close();
+    } else Popup.back();
   },
   },
   'click #addUserOrg'(event) {
   'click #addUserOrg'(event) {
     event.preventDefault();
     event.preventDefault();
@@ -891,7 +891,7 @@ Template.newOrgPopup.events({
       orgWebsite,
       orgWebsite,
       orgIsActive,
       orgIsActive,
     );
     );
-    Popup.close();
+    Popup.back();
   },
   },
 });
 });
 
 
@@ -917,7 +917,7 @@ Template.newTeamPopup.events({
       teamWebsite,
       teamWebsite,
       teamIsActive,
       teamIsActive,
     );
     );
-    Popup.close();
+    Popup.back();
   },
   },
 });
 });
 
 
@@ -990,11 +990,11 @@ Template.newUserPopup.events({
         } else {
         } else {
           usernameMessageElement.hide();
           usernameMessageElement.hide();
           emailMessageElement.hide();
           emailMessageElement.hide();
-          Popup.close();
+          Popup.back();
         }
         }
       },
       },
     );
     );
-    Popup.close();
+    Popup.back();
   },
   },
   'click #addUserOrgNewUser'(event) {
   'click #addUserOrgNewUser'(event) {
     event.preventDefault();
     event.preventDefault();
@@ -1048,7 +1048,7 @@ Template.settingsOrgPopup.events({
       return;
       return;
     }
     }
     Org.remove(this.orgId);
     Org.remove(this.orgId);
-    Popup.close();
+    Popup.back();
   }
   }
 });
 });
 
 
@@ -1066,7 +1066,7 @@ Template.settingsTeamPopup.events({
       return;
       return;
     }
     }
     Team.remove(this.teamId);
     Team.remove(this.teamId);
-    Popup.close();
+    Popup.back();
   }
   }
 });
 });
 
 
@@ -1099,7 +1099,7 @@ Template.settingsUserPopup.events({
     //
     //
     //
     //
     */
     */
-    Popup.close();
+    Popup.back();
   },
   },
 });
 });
 
 

+ 15 - 15
client/components/sidebar/sidebar.js

@@ -188,15 +188,15 @@ Template.boardMenuPopup.events({
   'click .js-rename-board': Popup.open('boardChangeTitle'),
   'click .js-rename-board': Popup.open('boardChangeTitle'),
   'click .js-open-rules-view'() {
   'click .js-open-rules-view'() {
     Modal.openWide('rulesMain');
     Modal.openWide('rulesMain');
-    Popup.close();
+    Popup.back();
   },
   },
   'click .js-custom-fields'() {
   'click .js-custom-fields'() {
     Sidebar.setView('customFields');
     Sidebar.setView('customFields');
-    Popup.close();
+    Popup.back();
   },
   },
   'click .js-open-archives'() {
   'click .js-open-archives'() {
     Sidebar.setView('archives');
     Sidebar.setView('archives');
-    Popup.close();
+    Popup.back();
   },
   },
   'click .js-change-board-color': Popup.open('boardChangeColor'),
   'click .js-change-board-color': Popup.open('boardChangeColor'),
   'click .js-change-language': Popup.open('changeLanguage'),
   'click .js-change-language': Popup.open('changeLanguage'),
@@ -209,7 +209,7 @@ Template.boardMenuPopup.events({
   }),
   }),
   'click .js-delete-board': Popup.afterConfirm('deleteBoard', function() {
   'click .js-delete-board': Popup.afterConfirm('deleteBoard', function() {
     const currentBoard = Boards.findOne(Session.get('currentBoard'));
     const currentBoard = Boards.findOne(Session.get('currentBoard'));
-    Popup.close();
+    Popup.back();
     Boards.remove(currentBoard._id);
     Boards.remove(currentBoard._id);
     FlowRouter.go('home');
     FlowRouter.go('home');
   }),
   }),
@@ -252,7 +252,7 @@ Template.boardMenuPopup.helpers({
 Template.memberPopup.events({
 Template.memberPopup.events({
   'click .js-filter-member'() {
   'click .js-filter-member'() {
     Filter.members.toggle(this.userId);
     Filter.members.toggle(this.userId);
-    Popup.close();
+    Popup.back();
   },
   },
   'click .js-change-role': Popup.open('changePermissions'),
   'click .js-change-role': Popup.open('changePermissions'),
   'click .js-remove-member': Popup.afterConfirm('removeMember', function() {
   'click .js-remove-member': Popup.afterConfirm('removeMember', function() {
@@ -266,12 +266,12 @@ Template.memberPopup.events({
       card.unassignAssignee(memberId);
       card.unassignAssignee(memberId);
     });
     });
     Boards.findOne(boardId).removeMember(memberId);
     Boards.findOne(boardId).removeMember(memberId);
-    Popup.close();
+    Popup.back();
   }),
   }),
   'click .js-leave-member': Popup.afterConfirm('leaveBoard', () => {
   'click .js-leave-member': Popup.afterConfirm('leaveBoard', () => {
     const boardId = Session.get('currentBoard');
     const boardId = Session.get('currentBoard');
     Meteor.call('quitBoard', boardId, () => {
     Meteor.call('quitBoard', boardId, () => {
-      Popup.close();
+      Popup.back();
       FlowRouter.go('home');
       FlowRouter.go('home');
     });
     });
   }),
   }),
@@ -460,7 +460,7 @@ BlazeComponent.extendComponent({
               activities: ['all'],
               activities: ['all'],
             });
             });
           }
           }
-          Popup.close();
+          Popup.back();
         },
         },
       },
       },
     ];
     ];
@@ -1229,7 +1229,7 @@ BlazeComponent.extendComponent({
       self.setLoading(false);
       self.setLoading(false);
       if (err) self.setError(err.error);
       if (err) self.setError(err.error);
       else if (ret.email) self.setError('email-sent');
       else if (ret.email) self.setError('email-sent');
-      else Popup.close();
+      else Popup.back();
     });
     });
   },
   },
 
 
@@ -1316,7 +1316,7 @@ BlazeComponent.extendComponent({
             }
             }
           }
           }
 
 
-          Popup.close();
+          Popup.back();
         },
         },
       },
       },
     ];
     ];
@@ -1380,10 +1380,10 @@ BlazeComponent.extendComponent({
 
 
           Meteor.call('setBoardOrgs', boardOrganizations, currentBoard._id);
           Meteor.call('setBoardOrgs', boardOrganizations, currentBoard._id);
 
 
-          Popup.close();
+          Popup.back();
         },
         },
         'click #cancelLeaveBoardBtn'(){
         'click #cancelLeaveBoardBtn'(){
-          Popup.close();
+          Popup.back();
         },
         },
       },
       },
     ];
     ];
@@ -1490,7 +1490,7 @@ BlazeComponent.extendComponent({
             }
             }
           }
           }
 
 
-          Popup.close();
+          Popup.back();
         },
         },
       },
       },
     ];
     ];
@@ -1581,10 +1581,10 @@ BlazeComponent.extendComponent({
 
 
           Meteor.call('setBoardTeams', boardTeams, members, currentBoard._id);
           Meteor.call('setBoardTeams', boardTeams, members, currentBoard._id);
 
 
-          Popup.close();
+          Popup.back();
         },
         },
         'click #cancelLeaveBoardTeamBtn'(){
         'click #cancelLeaveBoardTeamBtn'(){
-          Popup.close();
+          Popup.back();
         },
         },
       },
       },
     ];
     ];

+ 6 - 6
client/components/sidebar/sidebarArchives.js

@@ -94,13 +94,13 @@ BlazeComponent.extendComponent({
         'click .js-delete-card': Popup.afterConfirm('cardDelete', function() {
         'click .js-delete-card': Popup.afterConfirm('cardDelete', function() {
           const cardId = this._id;
           const cardId = this._id;
           Cards.remove(cardId);
           Cards.remove(cardId);
-          Popup.close();
+          Popup.back();
         }),
         }),
         'click .js-delete-all-cards': Popup.afterConfirm('cardDelete', () => {
         'click .js-delete-all-cards': Popup.afterConfirm('cardDelete', () => {
           this.archivedCards().forEach(card => {
           this.archivedCards().forEach(card => {
             Cards.remove(card._id);
             Cards.remove(card._id);
           });
           });
-          Popup.close();
+          Popup.back();
         }),
         }),
 
 
         'click .js-restore-list'() {
         'click .js-restore-list'() {
@@ -115,13 +115,13 @@ BlazeComponent.extendComponent({
 
 
         'click .js-delete-list': Popup.afterConfirm('listDelete', function() {
         'click .js-delete-list': Popup.afterConfirm('listDelete', function() {
           this.remove();
           this.remove();
-          Popup.close();
+          Popup.back();
         }),
         }),
         'click .js-delete-all-lists': Popup.afterConfirm('listDelete', () => {
         'click .js-delete-all-lists': Popup.afterConfirm('listDelete', () => {
           this.archivedLists().forEach(list => {
           this.archivedLists().forEach(list => {
             list.remove();
             list.remove();
           });
           });
-          Popup.close();
+          Popup.back();
         }),
         }),
 
 
         'click .js-restore-swimlane'() {
         'click .js-restore-swimlane'() {
@@ -138,7 +138,7 @@ BlazeComponent.extendComponent({
           'swimlaneDelete',
           'swimlaneDelete',
           function() {
           function() {
             this.remove();
             this.remove();
-            Popup.close();
+            Popup.back();
           },
           },
         ),
         ),
         'click .js-delete-all-swimlanes': Popup.afterConfirm(
         'click .js-delete-all-swimlanes': Popup.afterConfirm(
@@ -147,7 +147,7 @@ BlazeComponent.extendComponent({
             this.archivedSwimlanes().forEach(swimlane => {
             this.archivedSwimlanes().forEach(swimlane => {
               swimlane.remove();
               swimlane.remove();
             });
             });
-            Popup.close();
+            Popup.back();
           },
           },
         ),
         ),
       },
       },

+ 2 - 2
client/components/sidebar/sidebarCustomFields.js

@@ -283,7 +283,7 @@ const CreateCustomFieldPopup = BlazeComponent.extendComponent({
             } else {
             } else {
               CustomFields.remove(customField._id);
               CustomFields.remove(customField._id);
             }
             }
-            Popup.close();
+            Popup.back();
           },
           },
         ),
         ),
       },
       },
@@ -302,6 +302,6 @@ CreateCustomFieldPopup.register('createCustomFieldPopup');
   'submit'(evt) {
   'submit'(evt) {
     const customFieldId = this._id;
     const customFieldId = this._id;
     CustomFields.remove(customFieldId);
     CustomFields.remove(customFieldId);
-    Popup.close();
+    Popup.back();
   }
   }
 });*/
 });*/

+ 4 - 4
client/components/sidebar/sidebarFilters.js

@@ -171,22 +171,22 @@ Template.multiselectionSidebar.helpers({
 Template.disambiguateMultiLabelPopup.events({
 Template.disambiguateMultiLabelPopup.events({
   'click .js-remove-label'() {
   'click .js-remove-label'() {
     mutateSelectedCards('removeLabel', this._id);
     mutateSelectedCards('removeLabel', this._id);
-    Popup.close();
+    Popup.back();
   },
   },
   'click .js-add-label'() {
   'click .js-add-label'() {
     mutateSelectedCards('addLabel', this._id);
     mutateSelectedCards('addLabel', this._id);
-    Popup.close();
+    Popup.back();
   },
   },
 });
 });
 
 
 Template.disambiguateMultiMemberPopup.events({
 Template.disambiguateMultiMemberPopup.events({
   'click .js-unassign-member'() {
   'click .js-unassign-member'() {
     mutateSelectedCards('assignMember', this._id);
     mutateSelectedCards('assignMember', this._id);
-    Popup.close();
+    Popup.back();
   },
   },
   'click .js-assign-member'() {
   'click .js-assign-member'() {
     mutateSelectedCards('unassignMember', this._id);
     mutateSelectedCards('unassignMember', this._id);
-    Popup.close();
+    Popup.back();
   },
   },
 });
 });
 
 

+ 5 - 1
client/components/sidebar/sidebarSearches.jade

@@ -3,10 +3,14 @@ template(name="searchSidebar")
     input(type="text" name="searchTerm" placeholder="{{_ 'search-example'}}" autofocus dir="auto")
     input(type="text" name="searchTerm" placeholder="{{_ 'search-example'}}" autofocus dir="auto")
   .list-body
   .list-body
     .minilists.clearfix.js-minilists
     .minilists.clearfix.js-minilists
+      hr
+      {{_ 'lists' }}
       each (lists)
       each (lists)
         a.minilist-wrapper.js-minilist(href=originRelativeUrl)
         a.minilist-wrapper.js-minilist(href=originRelativeUrl)
           +minilist(this)
           +minilist(this)
     .minicards.clearfix.js-minicards
     .minicards.clearfix.js-minicards
-      each (results)
+      hr
+      {{_ 'cards' }}
+      each (cards)
         a.minicard-wrapper.js-minicard(href=originRelativeUrl)
         a.minicard-wrapper.js-minicard(href=originRelativeUrl)
           +minicard(this)
           +minicard(this)

+ 14 - 1
client/components/sidebar/sidebarSearches.js

@@ -3,7 +3,7 @@ BlazeComponent.extendComponent({
     this.term = new ReactiveVar('');
     this.term = new ReactiveVar('');
   },
   },
 
 
-  results() {
+  cards() {
     const currentBoard = Boards.findOne(Session.get('currentBoard'));
     const currentBoard = Boards.findOne(Session.get('currentBoard'));
     return currentBoard.searchCards(this.term.get());
     return currentBoard.searchCards(this.term.get());
   },
   },
@@ -13,9 +13,22 @@ BlazeComponent.extendComponent({
     return currentBoard.searchLists(this.term.get());
     return currentBoard.searchLists(this.term.get());
   },
   },
 
 
+  clickOnMiniCard(evt) {
+    evt.preventDefault();
+    Session.set('popupCard', this.currentData()._id);
+    this.cardDetailsPopup(evt);
+  },
+
+  cardDetailsPopup(event) {
+    if (!Popup.isOpen()) {
+      Popup.open("cardDetails")(event);
+    }
+  },
+
   events() {
   events() {
     return [
     return [
       {
       {
+        'click .js-minicard': this.clickOnMiniCard,
         'submit .js-search-term-form'(evt) {
         'submit .js-search-term-form'(evt) {
           evt.preventDefault();
           evt.preventDefault();
           this.term.set(evt.target.searchTerm.value);
           this.term.set(evt.target.searchTerm.value);

+ 4 - 4
client/components/swimlanes/swimlaneHeader.js

@@ -39,7 +39,7 @@ Template.swimlaneActionPopup.events({
   'click .js-close-swimlane'(event) {
   'click .js-close-swimlane'(event) {
     event.preventDefault();
     event.preventDefault();
     this.archive();
     this.archive();
-    Popup.close();
+    Popup.back();
   },
   },
   'click .js-move-swimlane': Popup.open('moveSwimlane'),
   'click .js-move-swimlane': Popup.open('moveSwimlane'),
   'click .js-copy-swimlane': Popup.open('copySwimlane'),
   'click .js-copy-swimlane': Popup.open('copySwimlane'),
@@ -88,7 +88,7 @@ BlazeComponent.extendComponent({
           // XXX ideally, we should move the popup to the newly
           // XXX ideally, we should move the popup to the newly
           // created swimlane so a user can add more than one swimlane
           // created swimlane so a user can add more than one swimlane
           // with a minimum of interactions
           // with a minimum of interactions
-          Popup.close();
+          Popup.back();
         },
         },
         'click .js-swimlane-template': Popup.open('searchElement'),
         'click .js-swimlane-template': Popup.open('searchElement'),
       },
       },
@@ -118,11 +118,11 @@ BlazeComponent.extendComponent({
         },
         },
         'click .js-submit'() {
         'click .js-submit'() {
           this.currentSwimlane.setColor(this.currentColor.get());
           this.currentSwimlane.setColor(this.currentColor.get());
-          Popup.close();
+          Popup.back();
         },
         },
         'click .js-remove-color'() {
         'click .js-remove-color'() {
           this.currentSwimlane.setColor(null);
           this.currentSwimlane.setColor(null);
-          Popup.close();
+          Popup.back();
         },
         },
       },
       },
     ];
     ];

+ 1 - 1
client/components/swimlanes/swimlanes.js

@@ -327,7 +327,7 @@ class MoveSwimlaneComponent extends BlazeComponent {
             boardId = bSelect.options[bSelect.selectedIndex].value;
             boardId = bSelect.options[bSelect.selectedIndex].value;
             Meteor.call(this.serverMethod, this.currentSwimlane._id, boardId);
             Meteor.call(this.serverMethod, this.currentSwimlane._id, boardId);
           }
           }
-          Popup.close();
+          Popup.back();
         },
         },
       },
       },
     ];
     ];

+ 1 - 1
client/components/users/userAvatar.js

@@ -290,7 +290,7 @@ Template.cardMemberPopup.helpers({
 Template.cardMemberPopup.events({
 Template.cardMemberPopup.events({
   'click .js-remove-member'() {
   'click .js-remove-member'() {
     Cards.findOne(this.cardId).unassignMember(this.userId);
     Cards.findOne(this.cardId).unassignMember(this.userId);
-    Popup.close();
+    Popup.back();
   },
   },
   'click .js-edit-profile': Popup.open('editProfile'),
   'click .js-edit-profile': Popup.open('editProfile'),
 });
 });

+ 4 - 4
client/components/users/userHeader.js

@@ -34,10 +34,10 @@ Template.memberMenuPopup.helpers({
 
 
 Template.memberMenuPopup.events({
 Template.memberMenuPopup.events({
   'click .js-my-cards'() {
   'click .js-my-cards'() {
-    Popup.close();
+    Popup.back();
   },
   },
   'click .js-due-cards'() {
   'click .js-due-cards'() {
-    Popup.close();
+    Popup.back();
   },
   },
   'click .js-open-archived-board'() {
   'click .js-open-archived-board'() {
     Modal.open('archivedBoards');
     Modal.open('archivedBoards');
@@ -53,7 +53,7 @@ Template.memberMenuPopup.events({
     AccountsTemplates.logout();
     AccountsTemplates.logout();
   },
   },
   'click .js-go-setting'() {
   'click .js-go-setting'() {
-    Popup.close();
+    Popup.back();
   },
   },
 });
 });
 
 
@@ -155,7 +155,7 @@ Template.editProfilePopup.events({
     } else Popup.back();
     } else Popup.back();
   },
   },
   'click #deleteButton': Popup.afterConfirm('userDelete', function() {
   'click #deleteButton': Popup.afterConfirm('userDelete', function() {
-    Popup.close();
+    Popup.back();
     Users.remove(Meteor.userId());
     Users.remove(Meteor.userId());
     AccountsTemplates.logout();
     AccountsTemplates.logout();
   }),
   }),

+ 1 - 1
client/lib/exportHTML.js

@@ -187,7 +187,7 @@ window.ExportHtml = Popup => {
     const boardSlug = getBoardSlug();
     const boardSlug = getBoardSlug();
 
 
     await addJsonExportToZip(zip, boardSlug);
     await addJsonExportToZip(zip, boardSlug);
-    Popup.close();
+    Popup.back();
     closeSidebar();
     closeSidebar();
     cleanBoardHtml();
     cleanBoardHtml();
 
 

+ 1 - 0
server/publications/cards.js

@@ -713,6 +713,7 @@ function findCards(sessionId, query) {
       CustomFields.find({ _id: { $in: customFieldIds } }),
       CustomFields.find({ _id: { $in: customFieldIds } }),
       Users.find({ _id: { $in: users } }, { fields: Users.safeFields }),
       Users.find({ _id: { $in: users } }, { fields: Users.safeFields }),
       Checklists.find({ cardId: { $in: cards.map(c => c._id) } }),
       Checklists.find({ cardId: { $in: cards.map(c => c._id) } }),
+      ChecklistItems.find({ cardId: { $in: cards.map(c => c._id) } }),
       Attachments.find({ cardId: { $in: cards.map(c => c._id) } }),
       Attachments.find({ cardId: { $in: cards.map(c => c._id) } }),
       CardComments.find({ cardId: { $in: cards.map(c => c._id) } }),
       CardComments.find({ cardId: { $in: cards.map(c => c._id) } }),
       SessionData.find({ userId, sessionId }),
       SessionData.find({ userId, sessionId }),