|
|
@ -101,6 +101,9 @@ export default class SettingsIndex {
|
|
|
|
document
|
|
|
|
document
|
|
|
|
.getElementById("render-toggle")
|
|
|
|
.getElementById("render-toggle")
|
|
|
|
.addEventListener("click", (e) => this.toggleRender(e));
|
|
|
|
.addEventListener("click", (e) => this.toggleRender(e));
|
|
|
|
|
|
|
|
document
|
|
|
|
|
|
|
|
.getElementById("render-toggle-icon")
|
|
|
|
|
|
|
|
.addEventListener("click", (e) => this.toggleRender(e));
|
|
|
|
//handle theme toggle
|
|
|
|
//handle theme toggle
|
|
|
|
let themeBtns = document.querySelectorAll(".theme-select");
|
|
|
|
let themeBtns = document.querySelectorAll(".theme-select");
|
|
|
|
for (var i = 0, length = themeBtns.length; i < length; i++) {
|
|
|
|
for (var i = 0, length = themeBtns.length; i < length; i++) {
|
|
|
@ -140,11 +143,12 @@ export default class SettingsIndex {
|
|
|
|
toggleRender(e) {
|
|
|
|
toggleRender(e) {
|
|
|
|
e.stopPropagation();
|
|
|
|
e.stopPropagation();
|
|
|
|
e.preventDefault();
|
|
|
|
e.preventDefault();
|
|
|
|
if (e.target.getAttribute("data-render") == "false") {
|
|
|
|
let button = document.getElementById("render-toggle");
|
|
|
|
e.target.setAttribute("data-render", "true");
|
|
|
|
if (button.getAttribute("data-render") == "false") {
|
|
|
|
|
|
|
|
button.setAttribute("data-render", "true");
|
|
|
|
//e.target.innerHTML = 'RENDER PAGES ON SAVE';
|
|
|
|
//e.target.innerHTML = 'RENDER PAGES ON SAVE';
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
e.target.setAttribute("data-render", "false");
|
|
|
|
button.setAttribute("data-render", "false");
|
|
|
|
//e.target.innerHTML = "DON'T RENDER PAGES ON SAVE";
|
|
|
|
//e.target.innerHTML = "DON'T RENDER PAGES ON SAVE";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|