Fixed issue with saving files

This commit is contained in:
Matthew Welch 2020-12-06 16:11:02 -08:00
parent 989ef96931
commit f5f9667cac

View File

@ -190,7 +190,7 @@ ipcMain.on("save", (event, data, new_file) => {
.append($("<table></table>") .append($("<table></table>")
.attr("id", sanitizeName(table["name"])+"-table") .attr("id", sanitizeName(table["name"])+"-table")
.addClass("table table-hover")) .addClass("table table-hover"))
.html(); .prop("outerHTML");
nav += $("<li></li>") nav += $("<li></li>")
.addClass("nav-item") .addClass("nav-item")
.append($("<a></a>") .append($("<a></a>")
@ -202,7 +202,7 @@ ipcMain.on("save", (event, data, new_file) => {
.attr("aria-controls", sanitizeName(table["name"])) .attr("aria-controls", sanitizeName(table["name"]))
.attr("aria-selected", false) .attr("aria-selected", false)
.html(table["name"])) .html(table["name"]))
.html(); .prop("outerHTML");
added_tables.push(table["name"]); added_tables.push(table["name"]);
} else { } else {
@ -219,7 +219,7 @@ ipcMain.on("save", (event, data, new_file) => {
let div = $("<div></div>") let div = $("<div></div>")
.addClass("dropdown-menu") .addClass("dropdown-menu")
.attr("x-placement", "bottom-start") .attr("x-placement", "bottom-start")
.css({"position": "absolute", "will-change": "transform", "top": "0", "left": "0", "transform": "translate3d(0px, 39px, 0px)"}); .css({"position": "absolute", "will-change": "transform", "top": 0, "left": 0, "transform": "translate3d(0px, 39px, 0px)"});
for (let tab_table of table_tabs[tab_name]) { for (let tab_table of table_tabs[tab_name]) {
tabs += $("<div></div>") tabs += $("<div></div>")
.addClass("tab-pane fade") .addClass("tab-pane fade")
@ -240,19 +240,19 @@ ipcMain.on("save", (event, data, new_file) => {
.append($("<table></table>") .append($("<table></table>")
.attr("id", sanitizeName(tab_table["name"])+"-table") .attr("id", sanitizeName(tab_table["name"])+"-table")
.addClass("table table-hover")) .addClass("table table-hover"))
.html(); .prop("outerHTML");
div.append("<a></a>") div.append($("<a></a>")
.addClass("dropdown-item") .addClass("dropdown-item")
.attr("data-toggle", "tab") .attr("data-toggle", "tab")
.attr("href", "#"+sanitizeName(tab_table["name"])) .attr("href", "#"+sanitizeName(tab_table["name"]))
.attr("aria-expanded", true) .attr("aria-expanded", true)
.html(tab_table["name"]); .html(tab_table["name"]));
added_tables.push(tab_table["name"]); added_tables.push(tab_table["name"]);
} }
let li = $("<li></li>") let li = $("<li></li>")
.addClass("nav-item dropdown"); .addClass("nav-item dropdown");
li.append(a); li.append(a.prop("outerHTML"));
li.append(div); li.append(div.prop("outerHTML"));
nav += li.prop('outerHTML'); nav += li.prop('outerHTML');
} }
} }