DEV: Remove `ajax` request as raw post is not needed
This commit is contained in:
parent
87b91f5a6f
commit
414e7e6a84
|
@ -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) {
|
||||||
|
|
Loading…
Reference in New Issue