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

git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@8623 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig
2015-05-24 08:43:42 +00:00
parent c09a8c8e84
commit c490c28ff5

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") $("#saveCheck")
.css("cursor", "pointer") .css("cursor", "pointer")
.click(function(){ .click(function(){