DEV: Remove Table HTML usage (#9)
* DEV: Remove Table HTML usage * DEV: Apply ember linting
This commit is contained in:
parent
98a9081e25
commit
d25736adad
|
@ -10,7 +10,7 @@ export default apiInitializer("0.11.1", (api) => {
|
||||||
showTableBuilder() {
|
showTableBuilder() {
|
||||||
showModal("insert-table-modal").setProperties({
|
showModal("insert-table-modal").setProperties({
|
||||||
toolbarEvent: this.toolbarEvent,
|
toolbarEvent: this.toolbarEvent,
|
||||||
tableHtml: null,
|
tableTokens: null,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
@ -33,8 +33,6 @@ export default apiInitializer("0.11.1", (api) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
function generateModal(event) {
|
function generateModal(event) {
|
||||||
const table = event.target.parentNode.lastElementChild;
|
|
||||||
const tempTable = table.cloneNode(true);
|
|
||||||
const tableId = event.target.getAttribute("data-table-id");
|
const tableId = event.target.getAttribute("data-table-id");
|
||||||
|
|
||||||
return ajax(`/posts/${this.id}`, { type: "GET" })
|
return ajax(`/posts/${this.id}`, { type: "GET" })
|
||||||
|
@ -53,7 +51,6 @@ export default apiInitializer("0.11.1", (api) => {
|
||||||
showModal("insert-table-modal", {
|
showModal("insert-table-modal", {
|
||||||
model: post,
|
model: post,
|
||||||
}).setProperties({
|
}).setProperties({
|
||||||
tableHtml: tempTable,
|
|
||||||
tableId,
|
tableId,
|
||||||
tableTokens,
|
tableTokens,
|
||||||
});
|
});
|
||||||
|
|
|
@ -14,7 +14,7 @@ export default class SpreadsheetEditor extends GlimmerComponent {
|
||||||
|
|
||||||
// Getters:
|
// Getters:
|
||||||
get isEditingTable() {
|
get isEditingTable() {
|
||||||
if (this.args.tableHtml) {
|
if (this.args.tableTokens) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
<SpreadsheetEditor
|
<SpreadsheetEditor
|
||||||
@model={{this.model}}
|
@model={{this.model}}
|
||||||
@tableHtml={{this.tableHtml}}
|
|
||||||
@tableTokens={{this.tableTokens}}
|
@tableTokens={{this.tableTokens}}
|
||||||
@tableId={{this.tableId}}
|
@tableId={{this.tableId}}
|
||||||
@triggerModalClose={{action "closeEditModal"}}
|
@triggerModalClose={{action "closeEditModal"}}
|
||||||
|
|
Loading…
Reference in New Issue