quick patch for #66
This commit is contained in:
parent
3994e97829
commit
7e38b4edb8
3 changed files with 13 additions and 9 deletions
|
@ -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>
|
||||
|
|
8
public/assets/scripts/dash.min.js
vendored
8
public/assets/scripts/dash.min.js
vendored
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…
Reference in a new issue