1
0
mirror of synced 2026-08-04 09:17:03 +00:00

DEV: Move jsuites library to separate file

This commit is contained in:
Keegan George
2022-07-14 09:21:22 -07:00
parent 67a27f0ece
commit 40f42a92d2
4 changed files with 13319 additions and 13312 deletions
@@ -13,11 +13,17 @@ export default Component.extend({
// ? TODO move to component (read about not allowing Controllers to do DOM manipulation)
this._super(...arguments);
loadScript(settings.theme_uploads.jspreadsheet).then(() => {
this.loadLibraries().then(() => {
this.buildTable(this.tableHtml);
});
},
loadLibraries() {
return loadScript(settings.theme_uploads.jsuites).then(() => {
return loadScript(settings.theme_uploads.jspreadsheet);
});
},
buildTable(table) {
const tableObject = tableToObj(table);
const headings = [];
@@ -41,6 +47,7 @@ export default Component.extend({
const spreadsheetContainer = document.querySelector("#spreadsheet");
// eslint-disable-next-line no-undef
this.spreadsheet = jspreadsheet(spreadsheetContainer, {
data: tableData,
columns,