FIX: Post height issues (#34)
This commit is contained in:
parent
850e31c83d
commit
5d7a126403
|
@ -0,0 +1 @@
|
||||||
|
3.1.0.beta2: 850e31c83d310a1b52e6105fe201eb96f9e33deb
|
|
@ -59,13 +59,21 @@ export default apiInitializer("0.11.1", (api) => {
|
||||||
if (table.parentNode.contains(expandBtn)) {
|
if (table.parentNode.contains(expandBtn)) {
|
||||||
expandBtn.parentNode.insertBefore(popupBtn, expandBtn);
|
expandBtn.parentNode.insertBefore(popupBtn, expandBtn);
|
||||||
} else {
|
} else {
|
||||||
table.parentNode.insertBefore(popupBtn, table);
|
const buttonWrapper = document.createElement("div");
|
||||||
|
buttonWrapper.classList.add("fullscreen-table-wrapper--buttons");
|
||||||
|
buttonWrapper.append(popupBtn);
|
||||||
|
table.parentNode.insertBefore(buttonWrapper, table);
|
||||||
}
|
}
|
||||||
|
|
||||||
popupBtn.addEventListener("click", generateModal.bind(attrs), false);
|
popupBtn.addEventListener("click", generateModal.bind(attrs), false);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function cleanupPopupBtns() {
|
||||||
|
const popupBtns = document.querySelectorAll("button.open-popup-link");
|
||||||
|
popupBtns.forEach((btn) => btn.removeEventListener("click", generateModal));
|
||||||
|
}
|
||||||
|
|
||||||
api.decorateCookedElement(
|
api.decorateCookedElement(
|
||||||
(post, helper) => {
|
(post, helper) => {
|
||||||
const canEdit = helper.widget.attrs.canEdit;
|
const canEdit = helper.widget.attrs.canEdit;
|
||||||
|
@ -84,4 +92,6 @@ export default apiInitializer("0.11.1", (api) => {
|
||||||
id: "edit-table",
|
id: "edit-table",
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
api.cleanupStream(cleanupPopupBtns);
|
||||||
});
|
});
|
||||||
|
|
|
@ -31,8 +31,10 @@
|
||||||
table {
|
table {
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-edit-table {
|
.btn-edit-table {
|
||||||
display: block;
|
display: block;
|
||||||
|
z-index: 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue