From: horse69 Date: Sat, 17 Nov 2012 06:37:49 +0000 (+0000) Subject: git-svn-id: https://svn.code.sf.net/p/freetel/code@1013 01035d8c-6547-0410-b346-abe4f... X-Git-Url: http://git.whiteaudio.com/gitweb/?a=commitdiff_plain;h=45801bc8c2d4986671bfd380bc9f22f84406262a;p=freetel-svn-tracking.git git-svn-id: https://svn.code.sf.net/p/freetel/code@1013 01035d8c-6547-0410-b346-abe4f91aad63 --- 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); - } - } + + } }