mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
alarm.js: Switch "sharp" -> "arm"; Extension of functionalities
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@7138 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
8db9a8088a
commit
55c1af3aef
@ -74,16 +74,22 @@ function alarm_set(name){
|
|||||||
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;
|
||||||
|
|
||||||
|
// saving arm data
|
||||||
|
FW_cmd(url+'?XHR=1&cmd.'+name+'=attr '+name+' armdelay '+document.getElementById('armdelay').value);
|
||||||
|
FW_cmd(url+'?XHR=1&cmd.'+name+'=attr '+name+' armact '+document.getElementById('armaction').value);
|
||||||
|
FW_cmd(url+'?XHR=1&cmd.'+name+'=attr '+name+' disarmact '+document.getElementById('disarmaction').value);
|
||||||
|
FW_cmd(url+'?XHR=1&cmd.'+name+'=attr '+name+' cancelact '+document.getElementById('cancelaction').value);
|
||||||
|
|
||||||
// saving start and end times
|
// saving start and end times
|
||||||
for (var i = 0; i < alarmno; i++){
|
for (var i = 0; i < alarmno; i++){
|
||||||
FW_cmd(url+'?XHR=1&cmd.'+name+'=attr '+name+' level'+i+'start '+document.getElementById('l'+i+'s').value);
|
FW_cmd(url+'?XHR=1&cmd.'+name+'=attr '+name+' level'+i+'start '+document.getElementById('l'+i+'s').value);
|
||||||
FW_cmd(url+'?XHR=1&cmd.'+name+'=attr '+name+' level'+i+'end ' +document.getElementById('l'+i+'e').value);
|
FW_cmd(url+'?XHR=1&cmd.'+name+'=attr '+name+' level'+i+'end ' +document.getElementById('l'+i+'e').value);
|
||||||
FW_cmd(url+'?XHR=1&cmd.'+name+'=attr '+name+' level'+i+'msg ' +document.getElementById('l'+i+'m').value);
|
FW_cmd(url+'?XHR=1&cmd.'+name+'=attr '+name+' level'+i+'msg ' +document.getElementById('l'+i+'m').value);
|
||||||
if (document.getElementById('l'+i+'x').checked == true ){
|
if (document.getElementById('l'+i+'x').checked == true ){
|
||||||
val = "sharp";
|
val = "armed";
|
||||||
}else{
|
}else{
|
||||||
val = "unsharp";
|
val = "disarmed";
|
||||||
}
|
}
|
||||||
FW_cmd(url+'?XHR=1&cmd.'+name+'=attr '+name+' level'+i+'xec ' + val);
|
FW_cmd(url+'?XHR=1&cmd.'+name+'=attr '+name+' level'+i+'xec ' + val);
|
||||||
}
|
}
|
||||||
@ -126,6 +132,7 @@ function alarm_set(name){
|
|||||||
|
|
||||||
// creating notifiers
|
// creating notifiers
|
||||||
FW_cmd(url+'?XHR=1&cmd.' + name + ' ={main::Alarm_CreateNotifiers("' + name + '")}');
|
FW_cmd(url+'?XHR=1&cmd.' + name + ' ={main::Alarm_CreateNotifiers("' + name + '")}');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user