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

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


Author: bkruse
Date: Thu Aug 23 14:37:49 2007
New Revision: 1437

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=1437
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:
    branches/asterisknow/   (props changed)
    branches/asterisknow/config/cfgbasic.html
    branches/asterisknow/config/home.html

Propchange: branches/asterisknow/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Aug 23 14:37:49 2007
@@ -1,1 +1,1 @@
-/branches/1.4:1-1296,1316,1326,1332,1336-1338,1342,1346,1356,1362,1381,1384,1395,1399,1402,1416,1426,1432
+/branches/1.4:1-1296,1316,1326,1332,1336-1338,1342,1346,1356,1362,1381,1384,1395,1399,1402,1416,1426,1432,1435

Modified: branches/asterisknow/config/cfgbasic.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/cfgbasic.html?view=diff&rev=1437&r1=1436&r2=1437
==============================================================================
--- branches/asterisknow/config/cfgbasic.html (original)
+++ branches/asterisknow/config/cfgbasic.html Thu Aug 23 14:37:49 2007
@@ -257,8 +257,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: branches/asterisknow/config/home.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/home.html?view=diff&rev=1437&r1=1436&r2=1437
==============================================================================
--- branches/asterisknow/config/home.html (original)
+++ branches/asterisknow/config/home.html Thu Aug 23 14:37:49 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