diff --git a/www/pgm2/alarm.js b/www/pgm2/alarm.js index 3b427a750..9209bcc1c 100644 --- a/www/pgm2/alarm.js +++ b/www/pgm2/alarm.js @@ -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 + '")}'); + }