2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 12:49:34 +00:00

fhemweb.js: display results of the detailed view get command in a dialog

git-svn-id: https://svn.fhem.de/fhem/trunk@8623 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2015-05-24 08:43:42 +00:00
parent f0ec2be84c
commit 229f91de51

View File

@ -118,6 +118,18 @@ FW_jqueryReadyFn()
});
*/
$("form input.get[type=submit]").click(function(e) { //"get" via XHR to dialog
e.preventDefault();
var cmd = "", el=this;
$(el).parent().find("input,[name]").each(function() {
cmd += (cmd?"&":"")+$(this).attr("name")+"="+$(this).val();
});
FW_cmd(FW_root+"?"+cmd+"&XHR=1", function(data) {
FW_okDialog('<pre>'+data+'</pre>', el);
});
});
$("#saveCheck")
.css("cursor", "pointer")
.click(function(){