mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
fhemweb.js: make #FHEMWEB: eval more flexible (Forum #87583)
git-svn-id: https://svn.fhem.de/fhem/trunk@16697 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
918395b418
commit
53705f24b0
@ -989,10 +989,9 @@ FW_doUpdate(evt)
|
|||||||
if(d.length != 3)
|
if(d.length != 3)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if( d[0].match(/^#FHEMWEB:/) ) {
|
function
|
||||||
eval(d[1]);
|
setValue(d) // is Callable from eval below
|
||||||
|
{
|
||||||
} else {
|
|
||||||
$("[informId='"+d[0]+"']").each(function(){
|
$("[informId='"+d[0]+"']").each(function(){
|
||||||
if(this.setValueFn) { // change the select/etc value
|
if(this.setValueFn) { // change the select/etc value
|
||||||
this.setValueFn(d[1].replace(/\n/g, '\u2424'));
|
this.setValueFn(d[1].replace(/\n/g, '\u2424'));
|
||||||
@ -1016,6 +1015,13 @@ FW_doUpdate(evt)
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( d[0].match(/^#FHEMWEB:/) ) {
|
||||||
|
eval(d[1]);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
setValue(d);
|
||||||
|
}
|
||||||
|
|
||||||
// updateLine is deprecated, use setValueFn
|
// updateLine is deprecated, use setValueFn
|
||||||
for(var w in FW_widgets)
|
for(var w in FW_widgets)
|
||||||
if(FW_widgets[w].updateLine && !FW_widgets[w].second)
|
if(FW_widgets[w].updateLine && !FW_widgets[w].second)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user