git-svn-id: https://svn.code.sf.net/p/freetel/code@656 01035d8c-6547-0410-b346-abe4f9...
authorhorse69 <horse69@01035d8c-6547-0410-b346-abe4f91aad63>
Sun, 2 Sep 2012 22:11:52 +0000 (22:11 +0000)
committerhorse69 <horse69@01035d8c-6547-0410-b346-abe4f91aad63>
Sun, 2 Sep 2012 22:11:52 +0000 (22:11 +0000)
mini-asterisk-gui2/phones.js

index 390a28a3647d6205967d4e92774b09091c0f1a1c..c8404becaa47fb95e2708a148022696d504fc86c 100644 (file)
@@ -75,6 +75,7 @@ function initialisePage() {
 
 
     // print out IP phones
+    //  j is 6011,6012 etc
 
     for (j in ip_ext) {
         if (ip_ext[j] != '') {
@@ -87,7 +88,7 @@ function initialisePage() {
                // Underscore used instead of forward slash to pass thru html request
  
 
-            if (recept_num.indexOf(ip_ext[j])!=-1) {
+            if (recept_num.indexOf(j)!=-1) {
                    html += '" checked/>';
                }
            else {
@@ -95,7 +96,9 @@ function initialisePage() {
            }
 
            // save the reception code
-           recept_code[iancount++]=ext_code[(i-1)+(j-1)];
+           
+           recept_code[iancount++]=ext_code[(i-1)];
+           i++;
 
             html += "</td>";
        
@@ -201,6 +204,6 @@ function onClickApply(e) {
 
        }
 
-       //downloadUrl("/cgi-bin/setring.cgi?"+arg,null);
+       downloadUrl("/cgi-bin/setring.cgi?"+arg,null);
 
 }