mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-03 10:46:53 +00:00
Alarm.pm: Fixed bug in alarm.js
git-svn-id: https://svn.fhem.de/fhem/trunk@8442 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
8434e1a4be
commit
c22b4573c6
@ -52,6 +52,7 @@ function alarm_setAttribute(name, attr, val) {//set Alarm Attribute
|
|||||||
var location = document.location.pathname;
|
var location = document.location.pathname;
|
||||||
if (location.substr(location.length-1,1) == '/') {location = location.substr(0,location.length-1);}
|
if (location.substr(location.length-1,1) == '/') {location = location.substr(0,location.length-1);}
|
||||||
var url = document.location.protocol+"//"+document.location.host+location;
|
var url = document.location.protocol+"//"+document.location.host+location;
|
||||||
|
attr = attr.replace('+', '%2B');
|
||||||
FW_cmd(url+'?XHR=1&cmd.'+name+'=attr '+name+' '+attr+' '+val);
|
FW_cmd(url+'?XHR=1&cmd.'+name+'=attr '+name+' '+attr+' '+val);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -127,6 +128,7 @@ function alarm_set(name){
|
|||||||
val += "|"+sarr[k].children[2].children[0].value;
|
val += "|"+sarr[k].children[2].children[0].value;
|
||||||
val += "|"+sarr[k].children[2].children[1].value;
|
val += "|"+sarr[k].children[2].children[1].value;
|
||||||
val += "|"+sarr[k].children[3].children[0].options[sarr[k].children[3].children[0].selectedIndex].value;
|
val += "|"+sarr[k].children[3].children[0].options[sarr[k].children[3].children[0].selectedIndex].value;
|
||||||
|
val = val.replace('+', '%2B');
|
||||||
FW_cmd(url+'?XHR=1&cmd.'+nam+'=attr '+nam+' alarmSettings ' + val);
|
FW_cmd(url+'?XHR=1&cmd.'+nam+'=attr '+nam+' alarmSettings ' + val);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -144,6 +146,7 @@ function alarm_set(name){
|
|||||||
val += "|"+aarr[k].children[2].children[0].value;
|
val += "|"+aarr[k].children[2].children[0].value;
|
||||||
val += "|"+aarr[k].children[2].children[1].value;
|
val += "|"+aarr[k].children[2].children[1].value;
|
||||||
val += "|"+aarr[k].children[3].children[0].value;
|
val += "|"+aarr[k].children[3].children[0].value;
|
||||||
|
val = val.replace('+', '%2B');
|
||||||
FW_cmd(url+'?XHR=1&cmd.'+nam+'=attr '+nam+' alarmSettings ' + val);
|
FW_cmd(url+'?XHR=1&cmd.'+nam+'=attr '+nam+' alarmSettings ' + val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user