mirror of
https://github.com/discourse/discourse-table-builder.git
synced 2025-07-10 00:43:27 +00:00
FIX: Post height issues (#34)
This commit is contained in:
parent
850e31c83d
commit
5d7a126403
1
.discourse-compatibility
Normal file
1
.discourse-compatibility
Normal file
@ -0,0 +1 @@
|
||||
3.1.0.beta2: 850e31c83d310a1b52e6105fe201eb96f9e33deb
|
@ -59,13 +59,21 @@ export default apiInitializer("0.11.1", (api) => {
|
||||
if (table.parentNode.contains(expandBtn)) {
|
||||
expandBtn.parentNode.insertBefore(popupBtn, expandBtn);
|
||||
} 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);
|
||||
});
|
||||
}
|
||||
|
||||
function cleanupPopupBtns() {
|
||||
const popupBtns = document.querySelectorAll("button.open-popup-link");
|
||||
popupBtns.forEach((btn) => btn.removeEventListener("click", generateModal));
|
||||
}
|
||||
|
||||
api.decorateCookedElement(
|
||||
(post, helper) => {
|
||||
const canEdit = helper.widget.attrs.canEdit;
|
||||
@ -84,4 +92,6 @@ export default apiInitializer("0.11.1", (api) => {
|
||||
id: "edit-table",
|
||||
}
|
||||
);
|
||||
|
||||
api.cleanupStream(cleanupPopupBtns);
|
||||
});
|
||||
|
@ -31,8 +31,10 @@
|
||||
table {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.btn-edit-table {
|
||||
display: block;
|
||||
z-index: 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user