mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-28 17:12:32 +00:00
fhemweb.js: FW_replaceWidgets patch for attr (Forum #38169)
git-svn-id: https://svn.fhem.de/fhem/trunk@8756 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
b6744c9f22
commit
ab0f953829
@ -37,11 +37,13 @@ FW_replaceWidgets(parent)
|
|||||||
var cmd=$(this).attr("cmd");
|
var cmd=$(this).attr("cmd");
|
||||||
var rd=$(this).attr("reading");
|
var rd=$(this).attr("reading");
|
||||||
var params = cmd.split(" ");
|
var params = cmd.split(" ");
|
||||||
|
var type=$(this).attr("type");
|
||||||
|
if( type == undefined ) type = "set";
|
||||||
FW_replaceWidget(this, dev, $(this).attr("arg").split(","),
|
FW_replaceWidget(this, dev, $(this).attr("arg").split(","),
|
||||||
$(this).attr("current"), rd, params[0], params.slice(1),
|
$(this).attr("current"), rd, params[0], params.slice(1),
|
||||||
function(arg) {
|
function(arg) {
|
||||||
FW_cmd(FW_root+"?cmd=set "+dev+(params[0]=="state" ? "":" "+params[0])+
|
FW_cmd(FW_root+"?cmd="+type+" "+dev+
|
||||||
" "+arg+"&XHR=1");
|
(params[0]=="state" ? "":" "+params[0])+" "+arg+"&XHR=1");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user