From ab0f953829ad6397e91b0ce2b9cc488e348c14ed Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Tue, 16 Jun 2015 09:14:47 +0000 Subject: [PATCH] fhemweb.js: FW_replaceWidgets patch for attr (Forum #38169) git-svn-id: https://svn.fhem.de/fhem/trunk@8756 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/www/pgm2/fhemweb.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fhem/www/pgm2/fhemweb.js b/fhem/www/pgm2/fhemweb.js index 6a4b87480..0e301fca1 100644 --- a/fhem/www/pgm2/fhemweb.js +++ b/fhem/www/pgm2/fhemweb.js @@ -37,11 +37,13 @@ FW_replaceWidgets(parent) var cmd=$(this).attr("cmd"); var rd=$(this).attr("reading"); var params = cmd.split(" "); + var type=$(this).attr("type"); + if( type == undefined ) type = "set"; FW_replaceWidget(this, dev, $(this).attr("arg").split(","), $(this).attr("current"), rd, params[0], params.slice(1), function(arg) { - FW_cmd(FW_root+"?cmd=set "+dev+(params[0]=="state" ? "":" "+params[0])+ - " "+arg+"&XHR=1"); + FW_cmd(FW_root+"?cmd="+type+" "+dev+ + (params[0]=="state" ? "":" "+params[0])+" "+arg+"&XHR=1"); }); }); }