git-svn-id: https://svn.code.sf.net/p/freetel/code@1013 01035d8c-6547-0410-b346-abe4f...
authorhorse69 <horse69@01035d8c-6547-0410-b346-abe4f91aad63>
Sat, 17 Nov 2012 06:37:49 +0000 (06:37 +0000)
committerhorse69 <horse69@01035d8c-6547-0410-b346-abe4f91aad63>
Sat, 17 Nov 2012 06:37:49 +0000 (06:37 +0000)
mini-asterisk-gui2/voiplines.js

index 5b070a72020cffd1e3ced026b06c52592e8722e9..08b75ac66b8fb602edb686e93c4a5e2af3609996 100644 (file)
@@ -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);                      
-                       }
-
                }
+
+               
        }
 }