Editor: disable "Save" button when content is unmodified
This commit is contained in:
parent
0c30be4544
commit
256177844b
1
edit.js
1
edit.js
|
@ -100,6 +100,7 @@ function setCleanItem(node, isClean) {
|
||||||
function isCleanGlobal() {
|
function isCleanGlobal() {
|
||||||
var clean = Object.keys(dirty).length == 0;
|
var clean = Object.keys(dirty).length == 0;
|
||||||
setDirtyClass(document.body, !clean);
|
setDirtyClass(document.body, !clean);
|
||||||
|
document.getElementById("save-button").disabled = clean;
|
||||||
return clean;
|
return clean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user