bkruse: trunk r1436 - in /trunk: ./ config/cfgbasic.html config/home.html

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Thu Aug 23 14:36:54 CDT 2007


Author: bkruse
Date: Thu Aug 23 14:36:54 2007
New Revision: 1436

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

........
r1435 | bkruse | 2007-08-23 14:36:29 -0500 (Thu, 23 Aug 2007) | 4 lines

Fixed so that digital detection checks on both login and refresh of the page.

Gives the user the option to continue and close out of the popup box.

........

Modified:
    trunk/   (props changed)
    trunk/config/cfgbasic.html
    trunk/config/home.html

Propchange: trunk/
------------------------------------------------------------------------------
--- branch-1.4-merged (original)
+++ branch-1.4-merged Thu Aug 23 14:36:54 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
+/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

Modified: trunk/config/cfgbasic.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/cfgbasic.html?view=diff&rev=1436&r1=1435&r2=1436
==============================================================================
--- trunk/config/cfgbasic.html (original)
+++ trunk/config/cfgbasic.html Thu Aug 23 14:36:54 2007
@@ -259,8 +259,7 @@
 					_$('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>";
+					_$('message_text').innerHTML = "Time: <div id='counter'>10</div> Digital Cards Detected! Total Spans: " + tot_spans + "<BR>Options:<br>1. <A href=\"#\" class=\"splbutton\" onclick=\"_$('status_message').style.display='none'; _$('mainscreen').src = 'digital.html';\">Digital Card Setup Wizard</A><br>2. <A href=\"#\" class=\"splbutton\" onclick=\"_$('status_message').style.display='none';>Continue<br></a>";
 					setTimeout("_$('status_message').style.display='none';", 10000);
 					int_handle = setInterval("_$('counter').innerHTML = (_$('counter').innerHTML - 1);", 1000);
 					setTimeout("clearInterval(int_handle);", 10000);

Modified: trunk/config/home.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/home.html?view=diff&rev=1436&r1=1435&r2=1436
==============================================================================
--- trunk/config/home.html (original)
+++ trunk/config/home.html Thu Aug 23 14:36:54 2007
@@ -20,6 +20,7 @@
  *
 -->
 <script src="scripts/prototype.js"></script>
+<script src="scripts/astman.js"></script>
 <link href="stylesheets/schwing.css" media="all" rel="Stylesheet" type="text/css" />
 <script>
 var localloggedon = -1;
@@ -36,6 +37,7 @@
 }
 
 function localinit() {
+	showdiv_statusmessage();
 	top.document.title = "Asterisk GUI (Beta) -- Home";
 	var tmp;
 	var opt = {
@@ -134,12 +136,47 @@
 	parent.astmanEngine.sendRequest('action=login&username=' + encodeURIComponent( _$('username').value ) + "&secret=" + encodeURIComponent(_$('secret').value), afterlogin);
 }
 
+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>Options:<br>1. <A href=\"#\" class=\"splbutton\" onclick=\"_$('status_message').style.display='none'; parent._$('mainscreen').src = 'digital.html';\">Digital Card Setup Wizard</A><br>2. <A href=\"#\" class=\"splbutton\" onclick=\"_$('status_message').style.display='none';>Continue<br></a>";
+					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;
+
+}
+
 afterlogin = function(msgs) {
 	_$('statusbar').innerHTML = msgs[0].headers['message'];
 	if ( msgs[0].headers['response'] == "Success" ){
 		parent.gui_feedback("Login Successful",'blue',6000);
 		_$('statusbar').innerHTML = "<img src='images/tick.gif'><i>Connected!</i>";
 		//parent.astmanEngine.pollEvents();
+		if(!config2json("ztscan.conf", 1, check_digital)) {
+			has_digital = 0; /* ztscan.conf was NOT found */
+		}
 		loggedOn();
 	}else if( msgs[0].headers['message'] == "Authentication failed" ){
 		parent.gui_feedback("Invalid Username/Password",'default',6000);




More information about the asterisk-gui-commits mailing list