quick patch for #66

pull/84/head
Ro 3 years ago
parent 3994e97829
commit 7e38b4edb8

@ -22,8 +22,8 @@
</svg>
</button>
<button id="render-toggle" title="render on save toggle" data-render="{{ renderOnSave }}">
<svg id="render-toggle" class="icons">
<use id="submit-update" xlink:href="/assets/images/global/sprite.svg#entypo-circular-graph"/>
<svg id="render-toggle-icon" class="icons">
<use xlink:href="/assets/images/global/sprite.svg#entypo-circular-graph"/>
</svg>
</button>
</div>

File diff suppressed because one or more lines are too long

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

Loading…
Cancel
Save