From 45801bc8c2d4986671bfd380bc9f22f84406262a Mon Sep 17 00:00:00 2001 From: horse69 Date: Sat, 17 Nov 2012 06:37:49 +0000 Subject: [PATCH] git-svn-id: https://svn.code.sf.net/p/freetel/code@1013 01035d8c-6547-0410-b346-abe4f91aad63 --- mini-asterisk-gui2/voiplines.js | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/mini-asterisk-gui2/voiplines.js b/mini-asterisk-gui2/voiplines.js index 5b070a72..08b75ac6 100644 --- a/mini-asterisk-gui2/voiplines.js +++ b/mini-asterisk-gui2/voiplines.js @@ -258,21 +258,20 @@ function onClickApply() { } - else { - if ( firsttime == 0) { - // go to uncomment stuff - firsttime = 1; + else if (lastselection=="none") { + // straight into uncomment var url = '/cgi-bin/uncommentkey.cgi?file=/etc/asterisk/sip.conf&key=register-mini-asterisk'; downloadUrl(url,uncommentregReturn); - - } - else { - // comment old stuff + + + } + else { + // comment old stuff out then straight on var url = '/cgi-bin/commentkey.cgi?file=/etc/asterisk/sip.conf&key=register-mini-asterisk'; downloadUrl(url,commentregReturn); - } - } + + } } -- 2.25.1