Editor: disable "Save" button when content is unmodified

This commit is contained in:
tophf 2015-08-30 19:16:41 +03:00
parent 0c30be4544
commit 256177844b

View File

@ -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;
} }