|
@@ -49,6 +49,16 @@ BlazeComponent.extendComponent({
|
|
|
return false;
|
|
|
},
|
|
|
|
|
|
+ /** opens the card label popup only if clicked onto a label
|
|
|
+ * <li> this is necessary to have the data context of the minicard.
|
|
|
+ * if .js-card-label is used at click event, then only the data context of the label itself is available at this.currentData()
|
|
|
+ */
|
|
|
+ cardLabelsPopup(event) {
|
|
|
+ if (this.find('.js-card-label:hover')) {
|
|
|
+ Popup.open("cardLabels")(event, this.currentData());
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
events() {
|
|
|
return [
|
|
|
{
|
|
@@ -57,8 +67,6 @@ BlazeComponent.extendComponent({
|
|
|
else if (this.data().isLinkedBoard())
|
|
|
Utils.goBoardId(this.data().linkedId);
|
|
|
},
|
|
|
- },
|
|
|
- {
|
|
|
'click .js-toggle-minicard-label-text'() {
|
|
|
if (window.localStorage.getItem('hiddenMinicardLabelText')) {
|
|
|
window.localStorage.removeItem('hiddenMinicardLabelText'); //true
|
|
@@ -66,9 +74,8 @@ BlazeComponent.extendComponent({
|
|
|
window.localStorage.setItem('hiddenMinicardLabelText', 'true'); //true
|
|
|
}
|
|
|
},
|
|
|
- },
|
|
|
- {
|
|
|
'click span.badge-icon.fa.fa-sort, click span.badge-text.check-list-sort' : Popup.open("editCardSortOrder"),
|
|
|
+ 'click .minicard-labels' : this.cardLabelsPopup,
|
|
|
}
|
|
|
];
|
|
|
},
|