git-svn-id: https://svn.code.sf.net/p/freetel/code@648 01035d8c-6547-0410-b346-abe4f9...
authorhorse69 <horse69@01035d8c-6547-0410-b346-abe4f91aad63>
Wed, 29 Aug 2012 22:31:32 +0000 (22:31 +0000)
committerhorse69 <horse69@01035d8c-6547-0410-b346-abe4f91aad63>
Wed, 29 Aug 2012 22:31:32 +0000 (22:31 +0000)
mini-asterisk-gui2/minicommon.js
mini-asterisk-gui2/phones.js

index 5a65e849ac093c33579891f7a3a2071a0f2a817d..ccaa53f083eff3c16df30bafa41948c78b8228e8 100644 (file)
@@ -20,7 +20,7 @@ var ip_ext = [];
 
 var network = "no";
 
-
+var reception  = ["6002"];
 
 function loadExtensions() {
 
index 86ed40a3c95d72eabbd73d8669add54b259a9404..089e8698741157ec93c4b09f17810a43c86b449d 100644 (file)
@@ -27,6 +27,7 @@ function initialisePage() {
     var icon = '<img src="tick.png" alt="Analog Phone OK" />';
     var html = '';
 
+
     html += '<table align="right" width=600 cellspacing=2>';
 
     // print out internet connection
@@ -48,10 +49,11 @@ function initialisePage() {
 //         html += "<td>Port" + i  + "<td>" + '<img src="tick.png" />' + "</td>" + "</td></tr>";
            html += "<td>Port" + i  + "</td>";
            //html += "<td>(Reception)</td>";
+
             // the reception checkbox code
-           html += "<td>" + '<input type="checkbox" name="reception' + analog_ext[i] ;
-           // todo ian change zap[i] to array of reception info 
-            if (zap[i] == 'reception') {
+           html += "<td>" + '<input type="checkbox" name="ZAP/' + i ;
+
+            if (reception.indexOf(analog_ext[i])> -1) {
                    html += '" checked/>';
                }
            else {
@@ -76,9 +78,10 @@ function initialisePage() {
            html += "<td>" + ip_ext[j] + "</td>";
 
             // the reception checkbox code
-           html += "<td>" + '<input type="checkbox" name="reception' + ip_ext[j] ;
-           // todo ian change zap[i] to array of reception info 
-            if (ip_ext[j] == 'reception') {
+           html += "<td>" + '<input type="checkbox" name="SIP/' + ip_ext[j] ;
+
+            if (!reception.indexOf(ip_ext[j])) {
                    html += '" checked/>';
                }
            else {