pari: branch asterisknow r1907 - /branches/asterisknow/config/digital.html
SVN commits to the Asterisk-GUI project
asterisk-gui-commits at lists.digium.com
Wed Dec 5 13:45:58 CST 2007
Author: pari
Date: Wed Dec 5 13:45:57 2007
New Revision: 1907
URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=1907
Log:
minor improvements to digital/analog detection
Modified:
branches/asterisknow/config/digital.html
Modified: branches/asterisknow/config/digital.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/digital.html?view=diff&rev=1907&r1=1906&r2=1907
==============================================================================
--- branches/asterisknow/config/digital.html (original)
+++ branches/asterisknow/config/digital.html Wed Dec 5 13:45:57 2007
@@ -85,7 +85,7 @@
}
.pageheading{
- padding : 10px 10px 10px 10px;
+ padding : 10px 10px 4px 10px;
font-size: 135%;
text-align: center;
font-weight: bold;
@@ -291,7 +291,19 @@
ASTGUI.domActions.clear_table(tbl);
add_fRow();
- for( var k in SPANS ){ if( SPANS.hasOwnProperty(k) ){ addrow_totable(k); }}
+ var foo_spans =0;
+ for( var k in SPANS ){ if( SPANS.hasOwnProperty(k) ){ foo_spans++; addrow_totable(k); }}
+ if(!foo_spans){
+ ASTGUI.domActions.clear_table(tbl);
+ var newRow = tbl.insertRow(-1);
+ newRow.className = "even";
+
+ var newCell0 = newRow.insertCell(0);
+ newCell0.innerHTML = "No Digital Hardware detected !!";
+
+ _$('save_b').disabled = false;
+ _$('cancel_b').disabled = false;
+ }
}
@@ -310,7 +322,7 @@
setTimeout("_$('status_message').style.display='none';", 1000);
preparemenus();
_$('ListFXSPorts').innerHTML = parent.FXS_PORTS_DETECTED.join(',');
- _$('ListFXSPorts').innerHTML = parent.FXO_PORTS_DETECTED.join(',');
+ _$('ListFXOPorts').innerHTML = parent.FXO_PORTS_DETECTED.join(',');
parent.loadscreen(this);
//loadConfigFiles.readApplyzap();
loadConfigFiles.runZtscan();
@@ -336,7 +348,7 @@
if( n == "ERROR: CONFIG FILE NOT FOUND"){
_$('errmsg').innerHTML = "Please check if <B>ztscan</B> is installed ? <BR> /etc/asterisk/ztscan.conf not found";
_$('errmsg').style.display = '';
- _$('div_digitalcardstable').style.display = 'none';
+ _$('div_maintable').style.display = 'none';
gui_feedback("No Cards/Spans found, No Config File found !!");
//_$('tablecontainer').style.display="none";
return false;
@@ -387,7 +399,7 @@
if( n == "ERROR: CONFIG FILE NOT FOUND"){
_$('errmsg').innerHTML = "/etc/asterisk/users.conf not found";
_$('errmsg').style.display = '';
- _$('div_digitalcardstable').style.display = 'none';
+ _$('div_maintable').style.display = 'none';
gui_feedback("No Users File found !!");
//_$('tablecontainer').style.display="none";
return false;
@@ -422,7 +434,10 @@
for( var l in n ){ if(n.hasOwnProperty(l)){
if( l.beginsWith('span_')) {
tmp = l.split('span_')[1];
- if (!SPANS[tmp]){ SPANS[tmp] = {}; }
+ //if (!SPANS[tmp]){ SPANS[tmp] = {}; }
+ if (!SPANS[tmp]){ //ztscan did not detect any such span as tmp
+ continue;
+ }
SPANS[tmp]['definedchans'] = 0;
for( var k in n[l] ){ if(n[l].hasOwnProperty(k)){
if( k == 'signalling' || k == 'zapchan' || k == 'switchtype' ){ SPANS[tmp][k] = n[l][k]; }
@@ -636,47 +651,49 @@
<span style="cursor: pointer; cursor: hand;" onclick="window.location.href=window.location.href;" > <img src="images/refresh.png" title=" Refresh " border=0 > </span>
</div>
-<div class="pageheading">Digital Card Setup</div>
-
-<div style="overflow:auto;left:40" id="div_digitalcardstable">
- <table class="taglist" id="digitalcardstable" cellpadding=5 cellspacing=1 border=0 align=center></table>
- <table cellpadding=5 cellspacing=1 align=center border=0>
- <tr> <td align="right">LoadZone :
- <select id="loadZone">
- <option value="us">us</option>
- <option value="us-old">us-old</option>
- <option value="gr">gr</option>
- <option value="it">it</option>
- <option value="fr">fr</option>
- <option value="de">de</option>
- <option value="uk">uk</option>
- <option value="fi">fi</option>
- <option value="jp">jp</option>
- <option value="sp">sp</option>
- <option value="hu">hu</option>
- <option value="lt">lt</option>
- <option value="pl">pl</option>
- </select>
+<div id="div_maintable">
+ <div class="pageheading">Digital Hardware</div>
+ <div style="overflow:auto;left:40">
+ <table class="taglist" id="digitalcardstable" cellpadding=5 cellspacing=1 border=0 align=center></table>
+ <table cellpadding=5 cellspacing=1 align=center border=0>
+ <tr> <td align="right">LoadZone :
+ <select id="loadZone">
+ <option value="us">us</option>
+ <option value="us-old">us-old</option>
+ <option value="gr">gr</option>
+ <option value="it">it</option>
+ <option value="fr">fr</option>
+ <option value="de">de</option>
+ <option value="uk">uk</option>
+ <option value="fi">fi</option>
+ <option value="jp">jp</option>
+ <option value="sp">sp</option>
+ <option value="hu">hu</option>
+ <option value="lt">lt</option>
+ <option value="pl">pl</option>
+ </select>
+ </td>
+ </tr>
+ </table>
+ </div>
+ <div class="pageheading">Analog Hardware</div>
+ <div style="overflow:auto;left:40">
+ <table cellpadding=5 cellspacing=1 align=center border=0>
+ <tr>
+ <td align=left>
+ FXS Ports : <span id="ListFXSPorts"></span><BR>
+ FXO Ports : <span id="ListFXOPorts"></span><BR>
</td>
- </tr>
-
- <tr>
- <td align=left>
- <B>Analog Ports :</B><BR>
- FXS : <span id="ListFXSPorts"></span><BR>
- FXO : <span id="ListFXOPorts"></span><BR>
- </td>
- </tr>
-
- <tr>
+ </tr>
+ <tr>
<td>
<input type="button" id="save_b" value="Apply Changes" onclick="applyDigitalSettings()">
<input type="button" id="cancel_b" value="Cancel Changes" onclick="reloadpage()">
</td>
- </tr>
- </table>
+ </tr>
+ </table>
+ </div>
</div>
-
<div id="errmsg" style="display:none"></div>
<div id="mymenu" class="mymenu" style="display:none"></div>
<div id="bg_transparent" STYLE="display:none; position: absolute; left: 0; top: 0; width:100%; height:100%; background-color:#FFFFFF; filter:alpha(opacity=50); -moz-opacity:.50;opacity:.50; border-width: 0px; z-index:4">
More information about the asterisk-gui-commits
mailing list