git-svn-id: https://svn.code.sf.net/p/freetel/code@1096 01035d8c-6547-0410-b346-abe4f...
authorhorse69 <horse69@01035d8c-6547-0410-b346-abe4f91aad63>
Sat, 1 Dec 2012 02:04:52 +0000 (02:04 +0000)
committerhorse69 <horse69@01035d8c-6547-0410-b346-abe4f91aad63>
Sat, 1 Dec 2012 02:04:52 +0000 (02:04 +0000)
mini-asterisk-gui2/ipphones.html
mini-asterisk-gui2/ipphones.js

index 261a140eee7c5d37af0185a3c07a259802da8bf7..39cb8d1d2e5c706511f790f90bcbcc0cc22fda6a 100644 (file)
@@ -25,7 +25,7 @@
       <h2>&nbsp;<br>IP Phones</h2>
                <table>
          <tr><td>
-            <div id="ipphones"></div> Phone list goes here
+            <div id="ipphones_table"></div> Phone list goes here
                </td></tr>
 
                <tr><td>
index a6b0499ce82a7c4b491be1072c4908186d03141a..b52548158ee2d8615531ddbda269e975362fb584 100644 (file)
@@ -14,11 +14,51 @@ var update_time = 10;
 function initialise() {
     mainMenu();
 
-    initialisePage();
-}
+    // kick off cascading CGIs, initialisePage() will be called when complete
 
+    loadExtensions();
+}
 
 function initialisePage() {
+    // 
+     var tick = '<img src="tick.png" alt="IP phone detected" />';
+     var cross = '<img src="cross.png" alt="No phone detected" />';
+    var html = '';
+    var j = 0;
+       
+    html += '<form name="phones" method="get">';
+
+    html += '<table align="right" width=600 cellspacing=2>';
+
+    // print out IP phones
+    //  j is 6011,6012 etc
+
+    for (j in ip_ext) {
+        if (ip_ext[j] != '') {
+            html += "<tr>";
+               html += "<td>" + j + "</td>" + "<td>" + "IP Phone" + "</td>";
+               html += "<td>" + ip_ext[j] + "</td>";
+
+            html += "<td>" + tick + "</td>";
+
+
+            html += "</td>";
+
+ //           html += "</tr>";
+           }
+    }
+
+ //   html += "</tr>";
+
+    html += '</table>';
+       
+    html += '</form>';
+    document.getElementById("ipphones_table").innerHTML += html;
+
+}
+
+function somefunction() {
     // 
     
     var icon = '<img src="tick.png" alt="Analog Phone OK" />';
@@ -41,5 +81,3 @@ function initialisePage() {
 
 }
 
-
-