Browse Source

do not reset original attr every ws message

pull/1182/head
Max Prokhorov 5 years ago
parent
commit
f59d747af1
1 changed files with 11 additions and 3 deletions
  1. +11
    -3
      code/html/custom.js

+ 11
- 3
code/html/custom.js View File

@ -300,10 +300,18 @@ function sendConfig(data) {
websock.send(JSON.stringify({config: data}));
}
function resetOriginals() {
function setOriginalsFromValues(force) {
var force = (true === force);
$("input,select").each(function() {
$(this).attr("original", $(this).val());
var initial = (null === $(this).attr("original"));
if (force || initial) {
$(this).attr("original", $(this).val());
}
});
}
function resetOriginals() {
setOriginalsFromValues(true);
numReboot = numReconnect = numReload = 0;
}
@ -1458,7 +1466,7 @@ function processData(data) {
generateAPIKey();
}
resetOriginals();
setOriginalsFromValues();
}


Loading…
Cancel
Save