mirror of
https://github.com/wekan/wekan.git
synced 2025-04-23 13:37:09 -04:00
Global search open the minicard as Popup
This commit is contained in:
parent
4936e580fd
commit
4131dd89d4
2 changed files with 18 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
|||
template(name="resultCard")
|
||||
.result-card-wrapper
|
||||
a.minicard-wrapper.card-title(href=originRelativeUrl)
|
||||
a.minicard-wrapper.js-minicard.card-title(href=originRelativeUrl)
|
||||
+minicard(this)
|
||||
//= card.title
|
||||
ul.result-card-context-list
|
||||
|
|
|
@ -5,7 +5,23 @@ Template.resultCard.helpers({
|
|||
});
|
||||
|
||||
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() {
|
||||
return [{}];
|
||||
return [
|
||||
{
|
||||
'click .js-minicard': this.clickOnMiniCard,
|
||||
},
|
||||
];
|
||||
},
|
||||
}).register('resultCard');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue