DEV: Remove `ajax` request as raw post is not needed

This commit is contained in:
Keegan George 2022-07-13 16:00:42 -07:00
parent 87b91f5a6f
commit 414e7e6a84
1 changed files with 6 additions and 20 deletions

View File

@ -32,27 +32,13 @@ export default apiInitializer("0.11.1", (api) => {
function generateModal(event) { function generateModal(event) {
const table = event.target.parentNode.lastElementChild; const table = event.target.parentNode.lastElementChild;
const tempTable = table.cloneNode(true); const tempTable = table.cloneNode(true);
const postId = this.id;
return ajax(`/posts/${postId}`, { showModal("table-editor-modal", {
type: "GET", model: this,
cache: false, }).setProperties({
}) tableHtml: tempTable,
.then((result) => { submitOnEnter: false,
const attrs = { });
widget: this,
raw: result.raw,
};
showModal("table-editor-modal", {
model: attrs,
}).setProperties({
tableHtml: tempTable,
submitOnEnter: false,
});
return result.raw;
})
.catch(popupAjaxError);
} }
function generatePopups(tables, attrs) { function generatePopups(tables, attrs) {