mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-03 16:56:54 +00:00
fhemweb.js: shutdown handling (Forum #32960)
git-svn-id: https://svn.fhem.de/fhem/trunk@7785 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
aa4b171e81
commit
166e6954c0
@ -119,6 +119,20 @@ FW_jqueryReadyFn()
|
||||
FW_okDialog('<pre>'+data+'</pre>');
|
||||
});
|
||||
});
|
||||
|
||||
$("form").each(function(){ // shutdown handling
|
||||
var input = $(this).find("input.maininput");
|
||||
if(!input.length)
|
||||
return;
|
||||
$(this).on("submit", function() {
|
||||
if($(input).val().match(/^\s*shutdown/)) {
|
||||
FW_cmd(FW_root+"?XHR=1&cmd="+$(input).val());
|
||||
$(input).val("");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user