From 6a2d79c41c748724c40a32dd91972e6a0006b13e Mon Sep 17 00:00:00 2001 From: horse69 Date: Sat, 1 Dec 2012 02:04:52 +0000 Subject: [PATCH] git-svn-id: https://svn.code.sf.net/p/freetel/code@1096 01035d8c-6547-0410-b346-abe4f91aad63 --- mini-asterisk-gui2/ipphones.html | 2 +- mini-asterisk-gui2/ipphones.js | 46 +++++++++++++++++++++++++++++--- 2 files changed, 43 insertions(+), 5 deletions(-) diff --git a/mini-asterisk-gui2/ipphones.html b/mini-asterisk-gui2/ipphones.html index 261a140e..39cb8d1d 100644 --- a/mini-asterisk-gui2/ipphones.html +++ b/mini-asterisk-gui2/ipphones.html @@ -25,7 +25,7 @@

 
IP Phones

-
Phone list goes here +
Phone list goes here
diff --git a/mini-asterisk-gui2/ipphones.js b/mini-asterisk-gui2/ipphones.js index a6b0499c..b5254815 100644 --- a/mini-asterisk-gui2/ipphones.js +++ b/mini-asterisk-gui2/ipphones.js @@ -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 = 'IP phone detected'; + var cross = 'No phone detected'; + var html = ''; + var j = 0; + + html += '
'; + + html += ''; + + // print out IP phones + // j is 6011,6012 etc + + for (j in ip_ext) { + if (ip_ext[j] != '') { + html += ""; + html += "" + ""; + html += ""; + + html += ""; + + + html += ""; + + // html += ""; + } + } + + // html += ""; + + html += '
" + j + "" + "IP Phone" + "" + ip_ext[j] + "" + tick + "
'; + + html += '
'; + document.getElementById("ipphones_table").innerHTML += html; + +} + +function somefunction() { // var icon = 'Analog Phone OK'; @@ -41,5 +81,3 @@ function initialisePage() { } - - -- 2.25.1