From c490c28ff5588b9f8a894f0b4d2b18fd855af3ec Mon Sep 17 00:00:00 2001 From: rudolfkoenig Date: Sun, 24 May 2015 08:43:42 +0000 Subject: [PATCH] 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 --- fhem/www/pgm2/fhemweb.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/fhem/www/pgm2/fhemweb.js b/fhem/www/pgm2/fhemweb.js index df51884d8..564a88899 100644 --- a/fhem/www/pgm2/fhemweb.js +++ b/fhem/www/pgm2/fhemweb.js @@ -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('
'+data+'
', el); + }); + }); + + $("#saveCheck") .css("cursor", "pointer") .click(function(){