mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-16 10:46:03 +00:00
alarm.js: Switch "sharp" -> "arm"; Extension of functionalities
git-svn-id: https://svn.fhem.de/fhem/trunk@7138 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
96b50a0927
commit
f111f92505
@ -74,16 +74,22 @@ function alarm_set(name){
|
||||
var location = document.location.pathname;
|
||||
if (location.substr(location.length-1,1) == '/') {location = location.substr(0,location.length-1);}
|
||||
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
|
||||
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+'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);
|
||||
if (document.getElementById('l'+i+'x').checked == true ){
|
||||
val = "sharp";
|
||||
val = "armed";
|
||||
}else{
|
||||
val = "unsharp";
|
||||
val = "disarmed";
|
||||
}
|
||||
FW_cmd(url+'?XHR=1&cmd.'+name+'=attr '+name+' level'+i+'xec ' + val);
|
||||
}
|
||||
@ -126,6 +132,7 @@ function alarm_set(name){
|
||||
|
||||
// creating notifiers
|
||||
FW_cmd(url+'?XHR=1&cmd.' + name + ' ={main::Alarm_CreateNotifiers("' + name + '")}');
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user