bkruse: trunk r1535 - in /trunk: ./ config/digital.html
SVN commits to the Asterisk-GUI project
asterisk-gui-commits at lists.digium.com
Wed Sep 5 16:45:25 CDT 2007
Author: bkruse
Date: Wed Sep 5 16:45:25 2007
New Revision: 1535
URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=1535
Log:
Merged revisions 1534 via svnmerge from
https://origsvn.digium.com/svn/asterisk-gui/branches/1.4
........
r1534 | bkruse | 2007-09-05 16:44:39 -0500 (Wed, 05 Sep 2007) | 7 lines
I have to go, I hope I remember where I left
off tomorrow, I am in the middle of many things:
Add support so that when the page is loaded,
only the spans current config is in the select
box, instead of just reseting to esf/b8zs each time.
Thats the main one, then I can do the rest.
........
Modified:
trunk/ (props changed)
trunk/config/digital.html
Propchange: trunk/
------------------------------------------------------------------------------
--- branch-1.4-merged (original)
+++ branch-1.4-merged Wed Sep 5 16:45:25 2007
@@ -1,1 +1,1 @@
-/branches/1.4:1-1291,1293,1298-1300,1326,1332,1336-1338,1342,1346,1349,1356,1359,1362,1381,1384,1395,1399,1402,1413,1416,1426,1432,1435,1439,1442,1455,1458,1465,1471,1475,1478,1481,1488,1491,1494,1497,1500,1504,1507,1510,1513,1516,1520,1530
+/branches/1.4:1-1291,1293,1298-1300,1326,1332,1336-1338,1342,1346,1349,1356,1359,1362,1381,1384,1395,1399,1402,1413,1416,1426,1432,1435,1439,1442,1455,1458,1465,1471,1475,1478,1481,1488,1491,1494,1497,1500,1504,1507,1510,1513,1516,1520,1530,1534
Modified: trunk/config/digital.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/digital.html?view=diff&rev=1535&r1=1534&r2=1535
==============================================================================
--- trunk/config/digital.html (original)
+++ trunk/config/digital.html Wed Sep 5 16:45:25 2007
@@ -40,8 +40,15 @@
color: black;
text-decoration: underline;
}
-
- .tr0 td, .tr1 td, .tr2 td {
+
+ .tr3 {
+ background-color: red;
+ color: black;
+ text-decoration: underline;
+ }
+
+
+ .tr0 td, .tr1 td, .tr2 td, .tr3 td {
font-size: xx-small;
}
@@ -116,6 +123,7 @@
var sysinfocallbacks = new Object;
var zt_cb = new Object;
+var SPANS = new Object;
var tabs = new Array('tab1', 'tab2', 'tab3');
var divs_tohide = new Array('osversion_div', 'uptime_div', 'asterisk_div', 'today_div','hostname_div','ifconfig_div','df_div','memory_div');
var has_spans = 0; /* Count of our spans we have, incrementing each time. */
@@ -126,6 +134,8 @@
var fieldnames = [ 'active', 'alarms', 'description', 'name', 'totchans', 'fac', 'lbo' ];
var fieldnames_clickable = [ 'active', 'fac', 'lbo' ];
var fieldnames_proper = [ 'Out Of Alarm:', 'Alarms:', 'Card Description:', 'Card Name:', 'Total Channels:', 'Framing/Coding:', 'Line Build Out:' ];
+var fieldnames_zap_opts = [ 'loadzone', 'defaultzone'];
+var framing_and_coding = [ "esf,b8zs", "d4,ami", "cas,ami", "ccs,hdb3", "ccs,crc4,hdb3"];
/* This page is based off of sample.html, the gui tutorial on writing a page */
@@ -234,6 +244,24 @@
return true;
}
+
+function create_table_options() {
+ return true;
+ /* I am not sure what I want to do here yet, whether give the user the option to configure all zaptel.conf related stuff...or not */
+ var box = _$('digitalcardstable');
+ var tr = document.createElement("tr");
+ tr.className="tr3";
+ for(var i=0; i < fieldnames_zap_opts.length; i++) {
+ var td = document.createElement("td");
+ td.appendChild(document.createTextNode(fieldnames_zap_opts[i]));
+ td.setAttribute("id", fieldnames_zap_opts[i]);
+ tr.appendChild(td);
+ }
+ box.appendChild(tr);
+ return true;
+
+}
+
function isInt(x) {
var y=parseInt(x);
if (isNaN(y)) return false;
@@ -256,6 +284,7 @@
var l, h;
var box = _$('digitalcardstable');
if(isrefresh == 1) {
+ /* We want to reset our table, so that we do not append to it. */
box.innerHTML = "";
}
var _class = 0;
@@ -272,6 +301,9 @@
}
if(n[l]['continue'] && n[l]['continue'] == "yes") {
total_spans = (n[l]['totalspans']) ? n[l]['totalspans'] : 'Unknown';
+ for(var z=1; z < total_spans; z++) {
+ SPANS[z] = new Array();
+ }
has_spans=1;
if(n[l]['isnew'] && n[l]['isnew'] == "yes") {
var uri = build_action('update', 0, 'general', 'isnew', 'no', '');
@@ -332,7 +364,7 @@
td.setAttribute("style", 'color:yellow');
break;
default:
- td.setAttribute("style", 'color:red');
+ td.className = "tr3";
break;
}
}
@@ -349,14 +381,37 @@
parent._$('tooltip').innerHTML = "<B>Framing/Coding/Line Build Out:</B><br>To see this requires rev: 2986 of the 1.4 branch of zaptel.";
}
+ create_table_options(); /* create zaptel.conf general options */
_$('tablecontainer').style.display="";
_$('tablecontainer').style.visibility="";
_$('status_message').style.display='none';
_$('save_changes_id').style.display="";
-
- return true;
-}
-
+ append_selectboxes();
+
+ return true;
+}
+
+function append_selectboxes() {
+ for(var i=1; i < (total_spans + 1); i++ ){
+ for(var x=0; x < fieldnames_clickable.length; x++) {
+ if(fieldnames_clickable[x] == "fac") {
+ var tmp_sel = "";
+ for(var y=0; y < framing_and_coding.length; y++) {
+ tmp_sel += '<option value='+framing_and_coding[y]+'>'
+ tmp_sel += framing_and_coding[y];
+ tmp_sel += '</option>'
+ }
+ tmp_sel += '</select>';
+ var tmp_id = i+'-'+fieldnames_clickable[x];
+ var ofid = _$(tmp_id);
+ if(ofid) {
+ ofid.innerHTML = '<select class="input9" id="'+i+'-'+fieldnames_clickable[x]+'-sel">'+tmp_sel;
+ }
+ }
+ }
+ }
+ return true;
+}
function save_changes() {
/* function to grab the values of fields, and call the bash script to apply the changes and run ztcfg */
_$('status_message').style.display="block";
More information about the asterisk-gui-commits
mailing list