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) {
const table = event.target.parentNode.lastElementChild;
const tempTable = table.cloneNode(true);
const postId = this.id;
return ajax(`/posts/${postId}`, {
type: "GET",
cache: false,
})
.then((result) => {
const attrs = {
widget: this,
raw: result.raw,
};
showModal("table-editor-modal", {
model: attrs,
}).setProperties({
tableHtml: tempTable,
submitOnEnter: false,
});
return result.raw;
})
.catch(popupAjaxError);
showModal("table-editor-modal", {
model: this,
}).setProperties({
tableHtml: tempTable,
submitOnEnter: false,
});
}
function generatePopups(tables, attrs) {