bkruse: branch asterisknow r1405 - in /branches/asterisknow: ./ config/

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Mon Aug 20 18:16:01 CDT 2007


Author: bkruse
Date: Mon Aug 20 18:16:00 2007
New Revision: 1405

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=1405
Log:
Merged revisions 1399 via svnmerge from 
https://origsvn.digium.com/svn/asterisk-gui/branches/1.4

........
r1399 | bkruse | 2007-08-20 17:11:36 -0500 (Mon, 20 Aug 2007) | 3 lines

[1] Ability to check if ztscan has found new digital cards.
[2] Based on that, alert the user with the option to go to the setup page.

........

Modified:
    branches/asterisknow/   (props changed)
    branches/asterisknow/config/cfgbasic.html

Propchange: branches/asterisknow/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Aug 20 18:16:00 2007
@@ -1,1 +1,1 @@
-/branches/1.4:1-1296,1316,1326,1332,1336-1338,1342,1346,1356,1362,1381,1384,1395,1402
+/branches/1.4:1-1296,1316,1326,1332,1336-1338,1342,1346,1356,1362,1381,1384,1395,1399,1402

Modified: branches/asterisknow/config/cfgbasic.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/cfgbasic.html?view=diff&rev=1405&r1=1404&r2=1405
==============================================================================
--- branches/asterisknow/config/cfgbasic.html (original)
+++ branches/asterisknow/config/cfgbasic.html Mon Aug 20 18:16:00 2007
@@ -33,6 +33,16 @@
 var asterisk_guitools_inextconf = 0;
 eventeater.pingstatus = false;
 var keepPinging;
+var has_digital = 0;
+var int_handle;
+var MainScreenPanels = [];
+var newMSpanel = function(s){
+	var r = {};
+	r.PanelName = s[0];
+	r.FileName = s[1];
+	r.PanelDesc = s[2];
+	MainScreenPanels.push(r);
+};
 
 
 function fit_toScreen(){
@@ -229,7 +239,40 @@
 
 }
 
+function check_digital(n) {
+
+	var l, h;
+	for( l in n ){	if(n.hasOwnProperty(l)){
+		if( l =='general') { 
+			if(n[l]['continue'] == "no") {
+				has_digital = 0; /* ztscan.conf was NOT found */
+				/* Maybe check to see if isnew is set to one, then redirect them on a setup wizard about modprobing the drivers and what not */
+				return false;
+			}
+			if(n[l]['continue'] == "yes") {
+				has_digital = 1;
+				var tot_spans = n[l]['totalspans'];
+				if(n[l]['isnew'] == "yes") {
+					_$('status_message').style.display="block";
+					_$('status_message').innerHTML = '<TABLE border=0 cellpadding=0 cellspacing=4 align=center>' +
+		                        '<TR><TD><img src="/asterisk/static/config/images/loading.gif"></TD>' +
+		                        '<TD><div id=message_text></div></TD></TR></TABLE>';
+
+					_$('message_text').innerHTML = "Time: <div id='counter'>10</div> Digital Cards Detected! Total Spans: " + tot_spans + "<BR><A href=\"#\" class=\"splbutton\" onclick=\"_$('status_message').style.display='none'; _$('mainscreen').src = 'digital.html';\">Click Here</A><br>To go to the Digital Card Setup Wizard <br>";
+					setTimeout("_$('status_message').style.display='none';", 10000);
+					int_handle = setInterval("_$('counter').innerHTML = (_$('counter').innerHTML - 1);", 1000);
+					setTimeout("clearInterval(int_handle);", 10000);
+					return true;
+				}
+			}
+		} 
+
+	}}
+	return true;
+
+}
 function registerajax() {
+	showdiv_statusmessage();
 	fit_toScreen();
 	ASTGUI.events.add( window , 'resize', fit_toScreen );
 	pao();
@@ -237,6 +280,11 @@
 	astmanEngine.setURL(asterisk_rawmanPath );
 
 	createpanels();
+	/* If ztscan is not installed, the config file will not be generated. */
+	if(!config2json("ztscan.conf", 1, check_digital)) {
+			has_digital = 0; /* ztscan.conf was NOT found */
+	}
+	
 	_$('mainscreen').src = "home.html" ;
 	if( navigator.userAgent.indexOf("MSIE") != -1 || navigator.userAgent.indexOf("Konqueror") != -1 || navigator.userAgent.indexOf("Safari") != -1 ){
 		gui_feedback(browser_alert, 'green');




More information about the asterisk-gui-commits mailing list