FIX: Expand button not working
This commit is contained in:
parent
633109804c
commit
905e553635
|
@ -30,7 +30,7 @@ export default apiInitializer("0.11.1", (api) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
function generateModal(event) {
|
function generateModal(event) {
|
||||||
const table = event.target.nextElementSibling;
|
const table = event.target.parentNode.lastElementChild;
|
||||||
const tempTable = table.cloneNode(true);
|
const tempTable = table.cloneNode(true);
|
||||||
const postId = this.id;
|
const postId = this.id;
|
||||||
|
|
||||||
|
@ -60,7 +60,13 @@ export default apiInitializer("0.11.1", (api) => {
|
||||||
|
|
||||||
const popupBtn = createButton();
|
const popupBtn = createButton();
|
||||||
table.parentNode.classList.add("fullscreen-table-wrapper");
|
table.parentNode.classList.add("fullscreen-table-wrapper");
|
||||||
|
const expandBtn = document.querySelector(".open-popup-link");
|
||||||
|
|
||||||
|
if (table.parentNode.contains(expandBtn)) {
|
||||||
|
expandBtn.parentNode.insertBefore(popupBtn, expandBtn);
|
||||||
|
} else {
|
||||||
table.parentNode.insertBefore(popupBtn, table);
|
table.parentNode.insertBefore(popupBtn, table);
|
||||||
|
}
|
||||||
popupBtn.addEventListener("click", generateModal.bind(attrs), false);
|
popupBtn.addEventListener("click", generateModal.bind(attrs), false);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue