pari: trunk r452 - in /trunk/config: ./ scripts/ stylesheets/

asterisk-gui-commits at lists.digium.com asterisk-gui-commits at lists.digium.com
Mon Mar 19 18:26:49 MST 2007


Author: pari
Date: Mon Mar 19 20:26:49 2007
New Revision: 452

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=452
Log:
*** Optimizing code throughout the GUI **** Work in Progress -  More commits will follow soon. I strongly  recommend not to use this version

Modified:
    trunk/config/backup.html
    trunk/config/cfgadvanced.html
    trunk/config/cfgbasic.html
    trunk/config/guialert.html
    trunk/config/home.html
    trunk/config/iax.html
    trunk/config/incoming.html
    trunk/config/localexts.html
    trunk/config/meetme.html
    trunk/config/menus.html
    trunk/config/numberplan.html
    trunk/config/scripts/astman.js
    trunk/config/scripts/prototype.js
    trunk/config/scripts/tooltip.js
    trunk/config/stylesheets/schwing.css

Modified: trunk/config/backup.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/backup.html?view=diff&rev=452&r1=451&r2=452
==============================================================================
--- trunk/config/backup.html (original)
+++ trunk/config/backup.html Mon Mar 19 20:26:49 2007
@@ -32,8 +32,9 @@
 	showdiv_statusmessage();
 	setWindowTitle("Backup");
 	parent.loadscreen(this);
-	$('status_message').style.top  = 	100;
-	$('status_message').style.left  = 	100;
+	var d = _$('status_message'); 
+	d.style.top = 100;
+	d.style.left = 100;
 }
 
 

Modified: trunk/config/cfgadvanced.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/cfgadvanced.html?view=diff&rev=452&r1=451&r2=452
==============================================================================
--- trunk/config/cfgadvanced.html (original)
+++ trunk/config/cfgadvanced.html Mon Mar 19 20:26:49 2007
@@ -1,7 +1,7 @@
 <!--
  * Asterisk-GUI	-	an Asterisk configuration interface
  *
- * Top level for configuration file  (with some additional advanced tabs )
+ * Top level for configuration file (with some advanced options)
  *
  * Copyright (C) 2006-2007, Digium, Inc.
  *
@@ -21,9 +21,6 @@
 -->
 <script>
 var browser_alert = "Asterisk Configuration GUI is currently supported in Firefox (recommended 1.5 or above) \n SeaMonkey (1.0 or above), Netscape (8.0 or above) and Opera (9.0 or above) \n\n" +	"Support for other browsers is under development \n" + 	" and will be supported in future versions";
-if( navigator.userAgent.indexOf("MSIE") != -1 || navigator.userAgent.indexOf("Konqueror") != -1 || navigator.userAgent.indexOf("Safari") != -1 ){
-	gui_alert(browser_alert);
-}
 </script>
 <script src="scripts/prototype.js"></script>
 <script src="scripts/rico.js"></script>
@@ -45,13 +42,16 @@
 	var loggedon = -1;
 	var started = 0;
 	var accordion;
-	var copyright = "Copyright &copy;2006 Digium, Inc.  All Rights Reserved. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
+	var copyright = "Copyright &copy;2006-2007 Digium, Inc.  All Rights Reserved. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
 	var tooltip_default = "Move the mouse over to a field to see tooltips";
+	var asterisk_guitools_inextconf = 0;
 
 	eventeater.eventcb = function(msgs) {
-		if (loggedon == 1)
+		if (loggedon == 1){
 			astmanEngine.pollEvents();
-	}
+		}
+	}
+
 
 	panels.push( 
 
@@ -98,8 +98,8 @@
 
 		new PanelDef("jingle", "Jingle", "accordion-icon.gif", "Jingle configuration lets users connect to google talk networks"),
 
-//		new PanelDef("zapata", "Zap Channel", "accordion-icon.gif", "Zapata telephony interface configuration"),
-
+		new PanelDef("zapata", "Zap Channel", "accordion-icon.gif", "Zapata telephony interface configuration"),
+		
 		new PanelDef("status", "Active Channels", "accordion-icon.gif", "Monitor active channels."),
 
 		new PanelDef("sysinfo", "System Info", "accordion-icon.gif", "System Information."),
@@ -112,87 +112,73 @@
 
 	function setLoggedOn(onoff) {
 		loggedon = onoff;
-		if (loggedon == 1) {
-			for (var i = 0; i < panels.length; i++) {
-				if (panels[i].name == 'home'){
-					continue;
-				}
-				$(panels[i].name).onclick = $(panels[i].name).realonclick;
-				$(panels[i].name).onmouseover = $(panels[i].name).realonmouseover;
-				$(panels[i].name).style.visibility = 'inherit';
-			}
-		} else {
-			for (var i = 0; i < panels.length; i++) {
-				if (panels[i].name == 'home'){
-					// class :: accordionTabContentBox panelHeight = 474;
-					continue;
-				}
-				$(panels[i].name).onClick = false;
-				$(panels[i].name).onMouseOver = false;
-				$(panels[i].name).style.visibility = 'hidden';
-
-			}
+		for (var i = 0; i < panels.length; i++) {
+			if (panels[i].name == 'home'){continue;}
+			var w = _$(panels[i].name); 
+			w.onClick = (loggedon == 1)?$(panels[i].name).realonclick: false;
+			w.onMouseOver = (loggedon == 1)?$(panels[i].name).realonmouseover:false;
+			w.style.visibility = (loggedon == 1)?'inherit':'hidden';
 		}
 	}
 	
 	function loadscreen(srcbody) {
-		$('mainscreen').style.display = '';
-		new Rico.Effect.FadeTo($('mainscreen'), 1, 100, 1);
-		if (loggedon == 1)
-			astmanEngine.pollEvents();
-	}
-	function finishfade(page) {	$('mainscreen').style.display = "none"; 	}
-	function setstatus(status) {	$('status').innerHTML = copyright + status;	}
+		_$('mainscreen').style.display = '';
+		if (loggedon == 1){ astmanEngine.pollEvents(); }
+	}
+	
+	function setstatus(status) {	_$('status').innerHTML = copyright + status;	}
 	function showmainscreen(page) {
 		if (started) {
 			var opt = {
 				method: 'get',
 				asynchronous: true,
 				onComplete: function (originalRequest){
-						if ( originalRequest.responseText.match("Error") ) {
-							window.location.href=window.location.href;
-							return ;
-						}
-						if ( originalRequest.responseText.match("Pong") ) {
-								$('mainscreen').src = page.titleBar.id + ".html";
-						}
+					if ( originalRequest.responseText.match("Error") ) {
+						window.location.href=window.location.href;
+						return ;
 					}
+					if ( originalRequest.responseText.match("Pong") ) {
+							_$('mainscreen').src = page.titleBar.id + ".html";
+					}
+				}
 			};
 			opt.parameters="action=ping" ;
 			var tmp = new Ajax.Request("../../rawman" , opt);
-		}
-	}
+			//$('mainscreen').src = page.titleBar.id + ".html";
+		}
+	}
+
+	
 
 	function fademainscreen(page, newpage) {
 		// Confirm Discard Changes goes here 
-		$('tooltip').innerHTML = tooltip_default;
-		new Rico.Effect.FadeTo($('mainscreen'), 0, 100, 5, {complete:finishfade(page)});
+		_$('tooltip').innerHTML = tooltip_default;
+		_$('mainscreen').style.display = "none";
 	}
 
 	function show_Acctooltip(name, tip){
 		if( loggedon != 1){ return; }
-			new Rico.Effect.FadeTo( 'tooltip_round', .01, 100, 10, {
-			complete:function() { 
-				$('tooltip').innerHTML = 	tip ; 
-				new Rico.Effect.FadeTo( 'tooltip_round', 1, 10, 1, {complete:function() { } } );		
-			} 
-		} );
+		_$('tooltip').innerHTML = tip ;
 	}
 
 	function registerajax() {
 		Rico.Corner.round('tooltip_round', {compact:true});
+		if( navigator.userAgent.indexOf("MSIE") != -1 || navigator.userAgent.indexOf("Konqueror") != -1 || navigator.userAgent.indexOf("Safari") != -1 ){
+			gui_alert(browser_alert);
+		}
 		var pnameheight = 22;
 		var pheight = (503  - (pnameheight*panels.length) ) ;
 		accordion = new Rico.Accordion( $('configpanel'), { panelHeight: pheight,onHideTab:fademainscreen,onShowTab:showmainscreen });
 		//$('borderbox').style.height = $('screenholder').clientHeight;
 		//$('titlebar').style.width = $('borderbox').clientWidth - 12;
 		for (var i = 0; i < panels.length; i++) {
+			var w = _$(panels[i].name) ;
 			if (panels[i].name == 'home'){
-				$(panels[i].name).style.height = "19px";
+				w.style.height =  "19px";
 				continue;
 			}
-			$(panels[i].name).realonclick = $(panels[i].name).onclick;
-			$(panels[i].name).realonmouseover = $(panels[i].name).onmouseover;
+			w.realonclick = w.onclick;
+			w.realonmouseover = w.onmouseover;
 		}
 		started = 1;
 	}
@@ -201,15 +187,15 @@
 	astmanEngine.setEventCallback(eventeater.eventcb);
 
 	function Logoff() {
-		var t=confirm("Are you sure ?");
-		if(t == false)
-			return true;
+		if(!confirm("Are you sure ?")){ return true; }
 		var opt2 = {
 			method: 'get',
 			asynchronous: true,
 			onSuccess: function() {	 
-					// reload the browser URL
-					window.location.href=window.location.href;
+				setLoggedOn(0);
+				loggedon == -1;
+				// reload the browser URL
+				window.location.href=window.location.href;
 			},
 			onFailure: function(t) {
 				gui_alert("Config Error: " + t.status + ": " + t.statusText);
@@ -223,51 +209,53 @@
 		var newwindow_href = location.protocol + '//' + location.hostname + ':8003';
 		window.open(newwindow_href ,'mainwindow','width=1024,height=768,resizable=no, scrollbars=no, toolbar=no, location=no,status=yes, menubar=no')
 	}
+
 </script>
 <head>
 	<title>Asterisk Configuration GUI (Beta)</title>
 	<link rel="shortcut icon" href="images/favicon.ico" />
 </head>
-<body onload="javascript:registerajax()" topmargin=1>
+<body onload="registerajax( )" topmargin=1>
 <table border="0" align="center" cellspacing="0" cellpadding="0" bgcolor="#dddddd" width=950 height=570>
-<tr height=47><td valign="bottom" align='right' bgcolor='white' height=47><img align='left' src="images/digiumlogo.gif" align="left"></td>
-							<td valign='bottom' align='right' bgcolor='white' colspan=2>
-							<!-- <a href="#" onclick=" system_link()">System Configuration</a>&nbsp;|&nbsp; -->
-							<a target='_extern' href="http://www.digium.com/en/company/profile/">About Digium</a>&nbsp;|&nbsp;
-							<a target='_extern' href="http://www.asterisknow.org/bugs">Report a Bug</a>&nbsp;|&nbsp;
-							<a target='_extern' href="http://www.asterisknow.org/help">Help</a>&nbsp;
-							<input type="hidden" id="login_name">
-							</td>
+<tr height=47>
+	<td valign="bottom" align='right' bgcolor='white' height=47><img align='left' src="images/digiumlogo.gif" align="left"></td>
+	<td valign='bottom' align='right' bgcolor='white' colspan=2>
+			<!-- <a href="#" onclick=" system_link()">System Configuration</a>&nbsp;|&nbsp; -->
+			<a target='_extern' href="http://www.digium.com/en/company/profile/">About Digium</a>&nbsp;|&nbsp;
+			<a target='_extern' href="http://www.asterisknow.org/bugs">Report a Bug</a>&nbsp;|&nbsp;
+			<a target='_extern' href="http://www.asterisknow.org/help">Help</a>&nbsp;
+			<input type="hidden" id="login_name">
+	</td>
 </tr>
-<tr><td height="505"><div id="configpanel" style="width:150px; height: 505px;">
-										<script>
-												for (var i = 0; i < panels.length; i++) {
-													document.write("<div onmouseover='show_Acctooltip(\""+ panels[i].name +"\", \""+ panels[i].content +"\")'  onmouseout='show_Acctooltip(\""+ panels[i].name +"\", \"" + tooltip_default +"\")'>");
-													document.write("	<div id='" + panels[i].name + "' class='accordionTabTitleBar'>");
-													document.write("		<nobr><img style='vertical-align:middle' src='images/" + panels[i].icon + "'>");
-													document.write("		<span style='margin-left: 0px;font-weight:bold'>" + panels[i].label + "</span></nobr>");
-													document.write("    </div>");
-													document.write("	<div class='accordionTabContentBox' style='background-image:url(images/panel.png)'>");
-													document.write(panels[i].content);
-													document.write("	</div>");
-													document.write("</div>");
-												}
-										</script>
-									</div>
-		</td>
-		<td width="550" height="505" bgcolor="#EFEFEF" valign="top" id="screenholder">
-				<div id="titlebar" class="mainscreenTitleBar" style="position:absolute;top:48px">
-						<span style="margin-left: 4px;font-weight:bold">Loading Screen&nbsp;<img src='images/dots.gif'></span>
-				</div>
-				<div id="borderbox" class="mainscreenBorderBox" height="100%"></div>
-				<iframe width="540" height="505" frameborder="0" border="0" marginheight="0" marginwidth="0" src="home.html" id="mainscreen" style="position:absolute;top:48px;" SCROLLING=no></iframe>
-		</td>
-		<td valign=top width=250 height="505">
-			<div id="logoutlink" class="mainscreenTooltipBar" align=right style="font-weight:bold;cursor: pointer; cursor: hand;">&nbsp;</div>
-			<div id="tooltip_round" class="tooltip_round">
-			<div id='tooltip' style="margin-left:4px; font-family : Trebuchet MS, Arial, Helvetica, sans-serif;font-size: 11px; "><script>document.write(tooltip_default);</script></div>
-			</div>
-		</td>
+<tr><td height="505">
+	<div id="configpanel" style="width:150px; height: 505px;">
+	<script>
+	for (var i = 0; i < panels.length; i++) {
+		var t = "<div onmouseover='show_Acctooltip(\""+ panels[i].name +"\", \""+ panels[i].content +"\")'  onmouseout='show_Acctooltip(\""+ panels[i].name +"\", \"" + tooltip_default +"\")'>";
+		t += "	<div id='" + panels[i].name + "' class='accordionTabTitleBar'>";
+		t += "		<nobr><img style='vertical-align:middle' src='images/" + panels[i].icon + "'>";
+		t += "		<span style='margin-left: 0px;font-weight:bold'>" + panels[i].label + "</span></nobr>";
+		t += "  </div>";
+		t += "  <div class='accordionTabContentBox' style='background-image:url(images/panel.png)'>" +  panels[i].content + "</div>";
+		t += "</div>";
+		document.write(t);
+	}
+	</script>
+	</div>
+	</td>
+	<td width="550" height="505" bgcolor="#EFEFEF" valign="top" id="screenholder">
+		<div id="titlebar" class="mainscreenTitleBar" style="position:absolute;top:48px">
+			<span style="margin-left: 4px;font-weight:bold">Loading Screen&nbsp;<img src='images/dots.gif'></span>
+		</div>
+		<div id="borderbox" class="mainscreenBorderBox" height="100%"></div>
+		<iframe width="540" height="505" frameborder="0" border="0" marginheight="0" marginwidth="0" src="home.html" id="mainscreen" style="position:absolute;top:48px;" SCROLLING=no></iframe>
+	</td>
+	<td valign=top width=250 height="505">
+		<div id="logoutlink" class="mainscreenTooltipBar" align=right style="font-weight:bold;cursor: pointer; cursor: hand;">&nbsp;</div>
+		<div id="tooltip_round" class="tooltip_round">
+		<div id='tooltip' style="margin-left:4px; font-family : Trebuchet MS, Arial, Helvetica, sans-serif;font-size: 11px; "><script>document.write(tooltip_default);</script></div>
+		</div>
+	</td>
 </tr>
 <tr><td colspan="3" align=center height=18>
 		<div id="status" class="statusbar">Copyright &copy;2006-2007 Digium, Inc.  Digium&reg; and Asterisk&reg; are registered <a href="http://www.digium.com/en/company/profile/trademarkpolicy.php">trademarks</a> of Digium, Inc.  All Rights Reserved. <i><a href="#">Legal Information</a></i></div>

Modified: trunk/config/cfgbasic.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/cfgbasic.html?view=diff&rev=452&r1=451&r2=452
==============================================================================
--- trunk/config/cfgbasic.html (original)
+++ trunk/config/cfgbasic.html Mon Mar 19 20:26:49 2007
@@ -42,7 +42,7 @@
 	var loggedon = -1;
 	var started = 0;
 	var accordion;
-	var copyright = "Copyright &copy;2006 Digium, Inc.  All Rights Reserved. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
+	var copyright = "Copyright &copy;2006-2007 Digium, Inc.  All Rights Reserved. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
 	var tooltip_default = "Move the mouse over to a field to see tooltips";
 	var asterisk_guitools_inextconf = 0;
 
@@ -82,14 +82,23 @@
 		new PanelDef("incoming", "Incoming Calls", "accordion-icon.gif",
 			"Define how your incoming calls should be handled & configure DID (Direct inward Dialing)"),
 
-//		new PanelDef("musiconhold", "Music On Hold", "accordion-icon.gif",
-//			"Music on hold sometimes keeps people less angry while they wait for an answer."),
-
 		new PanelDef("menus", "Voice Menus", "accordion-icon.gif",
 			"Menus allow for more efficient routing of calls from incoming callers. Also known as IVR (Interactive Voice Response) menus or Digital Receptionist"),
 
 		new PanelDef("record", "Record a Menu", "accordion-icon.gif",
 			"Allows you to record custom voicemenus over a phone"),
+
+//		new PanelDef("moh", "Music On Hold", "accordion-icon.gif", " Music on hold sometimes keeps people less angry while they wait for an answer"),
+
+//		new PanelDef("sip", "SIP", "accordion-icon.gif", "SIP (Session Initiation Protocol) Configuration"),
+
+//		new PanelDef("iax", "IAX", "accordion-icon.gif", "IAX (Inter-Asterisk eXchange Protocol) Configuration"),
+
+//		new PanelDef("jabber", "Jabber", "accordion-icon.gif", "Jabber users configuration"),
+
+//		new PanelDef("jingle", "Jingle", "accordion-icon.gif", "Jingle configuration lets users connect to google talk networks"),
+
+//		new PanelDef("zapata", "Zap Channel", "accordion-icon.gif", "Zapata telephony interface configuration"),
 		
 		new PanelDef("status", "Active Channels", "accordion-icon.gif", "Monitor active channels."),
 
@@ -103,51 +112,35 @@
 
 	function setLoggedOn(onoff) {
 		loggedon = onoff;
-		if (loggedon == 1) {
-			for (var i = 0; i < panels.length; i++) {
-				if (panels[i].name == 'home'){
-					continue;
-				}
-				$(panels[i].name).onclick = $(panels[i].name).realonclick;
-				$(panels[i].name).onmouseover = $(panels[i].name).realonmouseover;
-				$(panels[i].name).style.visibility = 'inherit';
-			}
-		} else {
-			for (var i = 0; i < panels.length; i++) {
-				if (panels[i].name == 'home'){
-					// class :: accordionTabContentBox panelHeight = 474;
-					continue;
-				}
-				$(panels[i].name).onClick = false;
-				$(panels[i].name).onMouseOver = false;
-				$(panels[i].name).style.visibility = 'hidden';
-
-			}
+		for (var i = 0; i < panels.length; i++) {
+			if (panels[i].name == 'home'){continue;}
+			var w = _$(panels[i].name); 
+			w.onClick = (loggedon == 1)?$(panels[i].name).realonclick: false;
+			w.onMouseOver = (loggedon == 1)?$(panels[i].name).realonmouseover:false;
+			w.style.visibility = (loggedon == 1)?'inherit':'hidden';
 		}
 	}
 	
 	function loadscreen(srcbody) {
-		$('mainscreen').style.display = '';
-		new Rico.Effect.FadeTo($('mainscreen'), 1, 100, 1);
-		if (loggedon == 1)
-			astmanEngine.pollEvents();
-	}
-	function finishfade(page) {	$('mainscreen').style.display = "none"; 	}
-	function setstatus(status) {	$('status').innerHTML = copyright + status;	}
+		_$('mainscreen').style.display = '';
+		if (loggedon == 1){ astmanEngine.pollEvents(); }
+	}
+	
+	function setstatus(status) {	_$('status').innerHTML = copyright + status;	}
 	function showmainscreen(page) {
 		if (started) {
 			var opt = {
 				method: 'get',
 				asynchronous: true,
 				onComplete: function (originalRequest){
-						if ( originalRequest.responseText.match("Error") ) {
-							window.location.href=window.location.href;
-							return ;
-						}
-						if ( originalRequest.responseText.match("Pong") ) {
-								$('mainscreen').src = page.titleBar.id + ".html";
-						}
+					if ( originalRequest.responseText.match("Error") ) {
+						window.location.href=window.location.href;
+						return ;
 					}
+					if ( originalRequest.responseText.match("Pong") ) {
+							_$('mainscreen').src = page.titleBar.id + ".html";
+					}
+				}
 			};
 			opt.parameters="action=ping" ;
 			var tmp = new Ajax.Request("../../rawman" , opt);
@@ -159,18 +152,14 @@
 
 	function fademainscreen(page, newpage) {
 		// Confirm Discard Changes goes here 
-		$('tooltip').innerHTML = tooltip_default;
-		new Rico.Effect.FadeTo($('mainscreen'), 0, 100, 5, {complete:finishfade(page)});
+		_$('tooltip').innerHTML = tooltip_default;
+		_$('mainscreen').style.display = "none";
 	}
 
 	function show_Acctooltip(name, tip){
 		if( loggedon != 1){ return; }
-			new Rico.Effect.FadeTo( 'tooltip_round', .01, 100, 10, {
-			complete:function() { 
-				$('tooltip').innerHTML = 	tip ; 
-				new Rico.Effect.FadeTo( 'tooltip_round', 1, 10, 1, {complete:function() { } } );		
-			} 
-		} );
+		_$('tooltip').innerHTML = tip ;
+
 	}
 
 	function registerajax() {
@@ -184,12 +173,13 @@
 		//$('borderbox').style.height = $('screenholder').clientHeight;
 		//$('titlebar').style.width = $('borderbox').clientWidth - 12;
 		for (var i = 0; i < panels.length; i++) {
+			var w = _$(panels[i].name) ;
 			if (panels[i].name == 'home'){
-				$(panels[i].name).style.height =  "19px";
+				w.style.height =  "19px";
 				continue;
 			}
-			$(panels[i].name).realonclick = $(panels[i].name).onclick;
-			$(panels[i].name).realonmouseover = $(panels[i].name).onmouseover;
+			w.realonclick = w.onclick;
+			w.realonmouseover = w.onmouseover;
 		}
 		started = 1;
 	}
@@ -197,19 +187,16 @@
 	astmanEngine.setURL('../../rawman');
 	astmanEngine.setEventCallback(eventeater.eventcb);
 
-
 	function Logoff() {
-		var t=confirm("Are you sure ?");
-		if(t == false)
-			return true;
+		if(!confirm("Are you sure ?")){ return true; }
 		var opt2 = {
 			method: 'get',
 			asynchronous: true,
 			onSuccess: function() {	 
-					setLoggedOn(0);
-					loggedon == -1;
-					// reload the browser URL
-					window.location.href=window.location.href;
+				setLoggedOn(0);
+				loggedon == -1;
+				// reload the browser URL
+				window.location.href=window.location.href;
 			},
 			onFailure: function(t) {
 				gui_alert("Config Error: " + t.status + ": " + t.statusText);
@@ -231,44 +218,45 @@
 </head>
 <body onload="registerajax( )" topmargin=1>
 <table border="0" align="center" cellspacing="0" cellpadding="0" bgcolor="#dddddd" width=950 height=570>
-<tr height=47><td valign="bottom" align='right' bgcolor='white' height=47><img align='left' src="images/digiumlogo.gif" align="left"></td>
-							<td valign='bottom' align='right' bgcolor='white' colspan=2>
-									<!-- <a href="#" onclick=" system_link()">System Configuration</a>&nbsp;|&nbsp; -->
-									<a target='_extern' href="http://www.digium.com/en/company/profile/">About Digium</a>&nbsp;|&nbsp;
-									<a target='_extern' href="http://www.asterisknow.org/bugs">Report a Bug</a>&nbsp;|&nbsp;
-									<a target='_extern' href="http://www.asterisknow.org/help">Help</a>&nbsp;
-									<input type="hidden" id="login_name">
-							</td>
+<tr height=47>
+	<td valign="bottom" align='right' bgcolor='white' height=47><img align='left' src="images/digiumlogo.gif" align="left"></td>
+	<td valign='bottom' align='right' bgcolor='white' colspan=2>
+			<!-- <a href="#" onclick=" system_link()">System Configuration</a>&nbsp;|&nbsp; -->
+			<a target='_extern' href="http://www.digium.com/en/company/profile/">About Digium</a>&nbsp;|&nbsp;
+			<a target='_extern' href="http://www.asterisknow.org/bugs">Report a Bug</a>&nbsp;|&nbsp;
+			<a target='_extern' href="http://www.asterisknow.org/help">Help</a>&nbsp;
+			<input type="hidden" id="login_name">
+	</td>
 </tr>
-<tr><td height="505"><div id="configpanel" style="width:150px; height: 505px;">
-										<script>
-												for (var i = 0; i < panels.length; i++) {
-													document.write("<div onmouseover='show_Acctooltip(\""+ panels[i].name +"\", \""+ panels[i].content +"\")'  onmouseout='show_Acctooltip(\""+ panels[i].name +"\", \"" + tooltip_default +"\")'>");
-													document.write("	<div id='" + panels[i].name + "' class='accordionTabTitleBar'>");
-													document.write("		<nobr><img style='vertical-align:middle' src='images/" + panels[i].icon + "'>");
-													document.write("		<span style='margin-left: 0px;font-weight:bold'>" + panels[i].label + "</span></nobr>");
-													document.write("    </div>");
-													document.write("	<div class='accordionTabContentBox' style='background-image:url(images/panel.png)'>");
-													document.write(panels[i].content);
-													document.write("	</div>");
-													document.write("</div>");
-												}
-										</script>
-									</div>
-		</td>
-		<td width="550" height="505" bgcolor="#EFEFEF" valign="top" id="screenholder">
-				<div id="titlebar" class="mainscreenTitleBar" style="position:absolute;top:48px">
-						<span style="margin-left: 4px;font-weight:bold">Loading Screen&nbsp;<img src='images/dots.gif'></span>
-				</div>
-				<div id="borderbox" class="mainscreenBorderBox" height="100%"></div>
-				<iframe width="540" height="505" frameborder="0" border="0" marginheight="0" marginwidth="0" src="home.html" id="mainscreen" style="position:absolute;top:48px;" SCROLLING=no></iframe>
-		</td>
-		<td valign=top width=250 height="505">
-			<div id="logoutlink" class="mainscreenTooltipBar" align=right style="font-weight:bold;cursor: pointer; cursor: hand;">&nbsp;</div>
-			<div id="tooltip_round" class="tooltip_round">
-			<div id='tooltip' style="margin-left:4px; font-family : Trebuchet MS, Arial, Helvetica, sans-serif;font-size: 11px; "><script>document.write(tooltip_default);</script></div>
-			</div>
-		</td>
+<tr><td height="505">
+	<div id="configpanel" style="width:150px; height: 505px;">
+	<script>
+	for (var i = 0; i < panels.length; i++) {
+		var t = "<div onmouseover='show_Acctooltip(\""+ panels[i].name +"\", \""+ panels[i].content +"\")'  onmouseout='show_Acctooltip(\""+ panels[i].name +"\", \"" + tooltip_default +"\")'>";
+		t += "	<div id='" + panels[i].name + "' class='accordionTabTitleBar'>";
+		t += "		<nobr><img style='vertical-align:middle' src='images/" + panels[i].icon + "'>";
+		t += "		<span style='margin-left: 0px;font-weight:bold'>" + panels[i].label + "</span></nobr>";
+		t += "  </div>";
+		t += "  <div class='accordionTabContentBox' style='background-image:url(images/panel.png)'>" +  panels[i].content + "</div>";
+		t += "</div>";
+		document.write(t);
+	}
+	</script>
+	</div>
+	</td>
+	<td width="550" height="505" bgcolor="#EFEFEF" valign="top" id="screenholder">
+		<div id="titlebar" class="mainscreenTitleBar" style="position:absolute;top:48px">
+			<span style="margin-left: 4px;font-weight:bold">Loading Screen&nbsp;<img src='images/dots.gif'></span>
+		</div>
+		<div id="borderbox" class="mainscreenBorderBox" height="100%"></div>
+		<iframe width="540" height="505" frameborder="0" border="0" marginheight="0" marginwidth="0" src="home.html" id="mainscreen" style="position:absolute;top:48px;" SCROLLING=no></iframe>
+	</td>
+	<td valign=top width=250 height="505">
+		<div id="logoutlink" class="mainscreenTooltipBar" align=right style="font-weight:bold;cursor: pointer; cursor: hand;">&nbsp;</div>
+		<div id="tooltip_round" class="tooltip_round">
+		<div id='tooltip' style="margin-left:4px; font-family : Trebuchet MS, Arial, Helvetica, sans-serif;font-size: 11px; "><script>document.write(tooltip_default);</script></div>
+		</div>
+	</td>
 </tr>
 <tr><td colspan="3" align=center height=18>
 		<div id="status" class="statusbar">Copyright &copy;2006-2007 Digium, Inc.  Digium&reg; and Asterisk&reg; are registered <a href="http://www.digium.com/en/company/profile/trademarkpolicy.php">trademarks</a> of Digium, Inc.  All Rights Reserved. <i><a href="#">Legal Information</a></i></div>

Modified: trunk/config/guialert.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/guialert.html?view=diff&rev=452&r1=451&r2=452
==============================================================================
--- trunk/config/guialert.html (original)
+++ trunk/config/guialert.html Mon Mar 19 20:26:49 2007
@@ -18,27 +18,27 @@
 <head>
 </head>
 <body onload="update( )" topmargin=0 leftmargin=0 style="background-color: transparent">
-			<div id="div_alert" STYLE="display:none; position: absolute; left: 260; top: 180; width:360;  background-color:#FFFFFF;   border-width: 2px; border-color: #7E5538; border-style: solid; background-style: solid;">
-					<table width="100%" cellpadding=0 cellspacing=0>
-					<TR bgcolor="#7E5538"  style="background-image:url('images/title_gradient.gif');">
-							<TD Height="20" align="center">
-							<font style="color:#FFFFFF; font-size: 12px; font-weight:bold;">Alert !</font>
-							</TD>
-							<TD Height="20" align="right">
-								<A href="#" onclick="close_guialert();"><font style="color:#FFFFFF; font-size: 12px; font-weight:bold;">X</font></A>
-							</TD>
-							<TD width=4></TD>
-					</TR>
-					</table>
-					<TABLE cellpadding=0 cellspacing=3 border=0 width="100%">
-					<TR><TD colspan=2 height=10></TD></TR>
-					<TR><TD align="right"></TD>
-								<TD align="center" bgcolor="#FFFFFF"><div id='message'></div> </TD>
-					</TR>
-					<TR><TD colspan=2 height=10></TD></TR>
-					<TR> <TD align="center" colspan=2> <input type="button" id="ok" onclick="close_guialert()" value="Ok"> </TD>
-					<TR><TD colspan=2 height=10></TD></TR>
-					</TR>
-					</TABLE>
-			</div>
+	<div id="div_alert" STYLE="display:none; position: absolute; left: 260; top: 180; width:360;  background-color:#FFFFFF;   border-width: 2px; border-color: #7E5538; border-style: solid; background-style: solid;">
+		<table width="100%" cellpadding=0 cellspacing=0>
+		<TR bgcolor="#7E5538"  style="background-image:url('images/title_gradient.gif');">
+				<TD Height="20" align="center">
+				<font style="color:#FFFFFF; font-size: 12px; font-weight:bold;">Alert !</font>
+				</TD>
+				<TD Height="20" align="right">
+					<A href="#" onclick="close_guialert();"><font style="color:#FFFFFF; font-size: 12px; font-weight:bold;">X</font></A>
+				</TD>
+				<TD width=4></TD>
+		</TR>
+		</table>
+		<TABLE cellpadding=0 cellspacing=3 border=0 width="100%">
+		<TR><TD colspan=2 height=10></TD></TR>
+		<TR><TD align="right"></TD>
+					<TD align="center" bgcolor="#FFFFFF"><div id='message'></div> </TD>
+		</TR>
+		<TR><TD colspan=2 height=10></TD></TR>
+		<TR> <TD align="center" colspan=2> <input type="button" id="ok" onclick="close_guialert()" value="Ok"> </TD>
+		<TR><TD colspan=2 height=10></TD></TR>
+		</TR>
+		</TABLE>
+	</div>
 </body>

Modified: trunk/config/home.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/home.html?view=diff&rev=452&r1=451&r2=452
==============================================================================
--- trunk/config/home.html (original)
+++ trunk/config/home.html Mon Mar 19 20:26:49 2007
@@ -27,28 +27,20 @@
 	var localloggedon = -1;
 	var asterisk_guitools = parent.asterisk_guitools;
 
-	function updateButtons()
-	{
-		if (parent.loggedon) {
-			$('username').disabled = 1;
-			$('secret').disabled = 1;
-			$('logoff').disabled = 0;
-			$('reloadconfig').disabled = 0;
-			$('login').disabled = 1;
-		} else {
-			$('username').disabled = 0;
-			$('secret').disabled = 0;
-			$('logoff').disabled = 1;
-			$('reloadconfig').disabled = 1;
-			$('login').disabled = 0;
-			try{ $('username').focus();	}catch(err){ }
-		}
+	function updateButtons(){
+		var f = parent.loggedon;
+		_$('username').disabled = (f)?1:0;
+		_$('secret').disabled = (f)?1:0;
+		_$('logoff').disabled = (f)?0:1;
+		_$('reloadconfig').disabled = (f)?0:1;
+		_$('login').disabled = (f)?1:0;
+		if(!f){ try{ _$('username').focus();}catch(err){ } }
 	}
 	
 	function loggedOn() {
 		if ((parent.loggedon == 1) && (localloggedon == 1))
 			return;
-		if($('secret').value=="password"){
+		if(_$('secret').value=="password"){
 			parent.loggedon = 1;
 			localloggedon = 1;
 			parent.document.getElementById('logoutlink').innerHTML = "Logout";
@@ -69,10 +61,10 @@
 		parent.setLoggedOn(1);
 		parent.loggedon = 1;
 		localloggedon = 1;
-		$('username').className  = "input9_disabled";
-		$('secret').className  = "input9_disabled";
+		_$('username').className  = "input9_disabled";
+		_$('secret').className  = "input9_disabled";
 		updateButtons();
-		$('statusbar').innerHTML = "<img src='images/tick.gif'><i>Connected!</i>";
+		_$('statusbar').innerHTML = "<img src='images/tick.gif'><i>Connected!</i>";
 		parent.document.getElementById('logoutlink').innerHTML = "Logout";
 		parent.document.getElementById('logoutlink').onclick = parent.Logoff ;
 	}
@@ -83,21 +75,21 @@
 		parent.setLoggedOn(0);
 		parent.document.getElementById('logoutlink').innerHTML = "&nbsp;";
 		localloggedon = 0;
-		$('username').className  = "input9";
-		$('secret').className  = "input9";
+		_$('username').className  = "input9";
+		_$('secret').className  = "input9";
 		updateButtons();
 	}
 	
 	demo.logoffs = function(msgs) {
-		$('statusbar').innerHTML = msgs[0].headers['message'];
+		_$('statusbar').innerHTML = msgs[0].headers['message'];
 		loggedOff();
 	};
 
 	demo.logins = function(msgs) {
-		$('statusbar').innerHTML = msgs[0].headers['message'];
+		_$('statusbar').innerHTML = msgs[0].headers['message'];
 		resp = msgs[0].headers['response'];
 		if (resp == "Success" || msgs[0].headers['message'] == "Invalid/unknown command" ){
-			$('statusbar').innerHTML = "<img src='images/tick.gif'><i>Connected!</i>";
+			_$('statusbar').innerHTML = "<img src='images/tick.gif'><i>Connected!</i>";
 			parent.astmanEngine.pollEvents();
 			loggedOn();
 		}else
@@ -107,91 +99,81 @@
 	demo.pongs  = function(msgs) {
 		resp = msgs[0].headers['response'];
 		if (resp == "Pong") {
-			$('statusbar').innerHTML = "<i>Already connected...</i>";
+			_$('statusbar').innerHTML = "<i>Already connected...</i>";
 			loggedOn();
 			parent.loadscreen(this);
 		} else {
-			$('statusbar').innerHTML = "<i>Please login...</i>";
+			_$('statusbar').innerHTML = "<i>Please login...</i>";
 			loggedOff();
 			parent.loadscreen(this);
 		}
 	}
 
 	function doLogin() {
-		if( $('username').value == "" ){
-				parent.gui_alert("Please enter a Username");
-				$('username').focus();
-				return true;			
-		}
-
-		if( $('secret').value == "" ){
-				parent.gui_alert("Please enter a password");
-				$('secret').focus();
-				return true;			
-		}
-		parent.document.getElementById('login_name').value = $('username').value ;
-
-		$('statusbar').innerHTML = "<i>Logging in...</i>";
-		parent.astmanEngine.sendRequest('action=login&username=' + $('username').value + "&secret=" + $('secret').value, demo.logins);
+		if( _$('username').value == "" ){
+			parent.gui_alert("Please enter a Username");
+			_$('username').focus();
+			return true;			
+		}
+
+		if( _$('secret').value == "" ){
+			parent.gui_alert("Please enter a password");
+			_$('secret').focus();
+			return true;			
+		}
+		parent.document.getElementById('login_name').value = _$('username').value ;
+		_$('statusbar').innerHTML = "<i>Logging in...</i>";
+		parent.astmanEngine.sendRequest('action=login&username=' + _$('username').value + "&secret=" + _$('secret').value, demo.logins);
 	}
 	
 	function doLogoff() {
-		if(confirm("Are you sure ?") == false)
-			return true;
-		$('statusbar').innerHTML = "<i>Logging off...</i>";
+		if(!confirm("Are you sure ?")){ return true; }
+		_$('statusbar').innerHTML = "<i>Logging off...</i>";
 		parent.astmanEngine.sendRequest('action=logoff', demo.logoffs);
 	}
 	function localajaminit() {	
 		parent.astmanEngine.sendRequest('action=ping', demo.pongs);
 	}
 	function localinit() {
-			$('username').onfocus = function(){this.className = 'input9_hilight';}
-			$('username').onblur = function(){this.className = 'input9';}
-			$('secret').onfocus = function(){this.className = 'input9_hilight';}
-			$('secret').onblur = function(){this.className = 'input9';}
-
+		var un = _$('username') ; var pwd = _$('secret') ; 
+		un.onFocus = function(){this.className = 'input9_hilight';}
+		un.onBlur = function(){this.className = 'input9';}
+		pwd.onFocus = function(){this.className = 'input9_hilight';}
+		pwd.onBlur = function(){this.className = 'input9';}
 		top.document.title = "Asterisk GUI (Beta) -- Home";
 		localajaminit();
 	}
 
 
 function submitOnEnter(e){ 
-		if(e.keyCode == 13){ 
-			doLogin();
-			return false;
-		}
-}
-
-
-
-
+	if(e.keyCode == 13){ 
+		doLogin();
+		return false;
+	}
+}
 
 function checkessentials(){
 	// see if asterisk_guitools exists in extensions.conf
 	//if everything ok set  asterisk_guitools_inextconf = 1;
-		var opt = {
-			method: 'get',
-			asynchronous: true,
-			onComplete: checkExtconfig
-		};
-		opt.parameters="action=getconfig&filename=extensions.conf" ;
-		var tmp = new Ajax.Request("../../rawman", opt);
+	var opt = { method: 'get', asynchronous: true, onComplete: checkExtconfig };
+	opt.parameters="action=getconfig&filename=extensions.conf" ;
+	var tmp = new Ajax.Request("../../rawman", opt);
 }
 
 
 function checkExtconfig(originalRequest){
 	var lines = originalRequest.responseText.split("\n");
 	for( var i=0 ; i < lines.length ; i++){
-			if ( lines[i].substr(0,9) == "Category-"  ){
-				var tmp = lines[i].split(": ");
-				if( tmp[1].match(asterisk_guitools) ){
-						parent.asterisk_guitools_inextconf = 1;
-				}
+		if ( lines[i].substr(0,9) == "Category-"  ){
+			var tmp = lines[i].split(": ");
+			if( tmp[1].match(asterisk_guitools) ){
+				parent.asterisk_guitools_inextconf = 1;
+				break;
 			}
-	}
-	
-	if(parent.asterisk_guitools_inextconf == 0 ){
-		// not found
+		}
+	}
+	
+	if(parent.asterisk_guitools_inextconf == 0 ){	// if no context by name asterisk_guitools 
 		parent.window.location.href = "./setup/install.html";
 	}
 

Modified: trunk/config/iax.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/iax.html?view=diff&rev=452&r1=451&r2=452
==============================================================================
--- trunk/config/iax.html (original)
+++ trunk/config/iax.html Mon Mar 19 20:26:49 2007
@@ -31,24 +31,19 @@
 var fieldnames = ['accountcode', 'adsi', 'allow', 'amaflags', 'authdebug', 'autokill', 'bandwidth', 'bindaddr', 'bindport', 'cancel', 'codecpriority', 'delayreject', 'disallow', 'dropcount', 'forcejitterbuffer', 'iaxcompat', 'iaxmaxthreadcount', 'iaxthreadcount', 'jitterbuffer', 'jittershrinkrate', 'language', 'maxexcessbuffer', 'maxjitterbuffer', 'maxjitterinterps', 'maxregexpire', 'minexcessbuffer', 'minregexpire', 'mohinterpret', 'mohsuggest', 'nochecksums', 'regcontext', 'register', 'resyncthreshold', 'rtautoclear', 'rtcachefriends', 'rtignoreexpire', 'rtupdate', 'save', 'status', 'tos', 'trunkfreq', 'trunktimestamps'];
 
 phonecallbacks.format = function(t) {
-		if(t.name.match('general'))
-			return t.name;
-		else
-			return false;
-}
-
+	if(t.name.match('general'))
+		return t.name;
+	else
+		return false;
+}
 
 phonecallbacks.postselect = function(box, val) {
 
 }
-
-
 
 phonecallbacks.loaded = function() {
 		$('hiddenfield').selectitem(0);
 }
-
-
 
 function localajaxinit(){
 	setWindowTitle("IAX");
@@ -75,18 +70,18 @@
 	selectbox_remove("allowed", $('allowed').value );
 }
 function selectbox_add(selectbox_id, codec){
-		switch(codec) {
-		  case 'ulaw': addtosel("u-law","ulaw",selectbox_id) ; break;
-		  case 'alaw': addtosel("a-law","alaw",selectbox_id) ; break;
-		  case 'gsm': addtosel("GSM","gsm",selectbox_id) ; break ;
-		  case 'ilbc': addtosel("ILBC","ilbc",selectbox_id) ; break ;
-		  case 'speex': addtosel("SPEEX","speex",selectbox_id) ; break ;
-		  case 'g726':  addtosel("G.726","g726",selectbox_id) ; break ;
-		  case 'adpcm': addtosel("ADPCM","adpcm",selectbox_id) ; break ;
-		  case 'lpc10': addtosel("LPC10","lpc10",selectbox_id) ; break ;
-		  case 'g729': addtosel("G.729","g729",selectbox_id) ; break ;
-		  default: break
-	   }
+	switch(codec) {
+		case 'ulaw': addtosel("u-law","ulaw",selectbox_id) ; break;
+		case 'alaw': addtosel("a-law","alaw",selectbox_id) ; break;
+		case 'gsm': addtosel("GSM","gsm",selectbox_id) ; break ;
+		case 'ilbc': addtosel("ILBC","ilbc",selectbox_id) ; break ;
+		case 'speex': addtosel("SPEEX","speex",selectbox_id) ; break ;
+		case 'g726':  addtosel("G.726","g726",selectbox_id) ; break ;
+		case 'adpcm': addtosel("ADPCM","adpcm",selectbox_id) ; break ;
+		case 'lpc10': addtosel("LPC10","lpc10",selectbox_id) ; break ;
+		case 'g729': addtosel("G.729","g729",selectbox_id) ; break ;
+		default: break
+	}
 
 	function addtosel(a,b,c){ // a is text, b is value, c is the select box id
 	  var newoption = document.createElement('option');
@@ -101,36 +96,37 @@
 	}
 }
 function 	selectbox_remove(selectbox_id,codec){
-	for (var x=0; x < $(selectbox_id).length; x++){
-		if( $(selectbox_id).options[x].value==codec ){	$(selectbox_id).remove(x);		return true;		}
+	var r = _$(selectbox_id) ;
+	for (var x=0; x < r.length; x++){
+		if( r.options[x].value==codec ){ r.remove(x); return true; }
 	}
 }
 function update_ordercodecs(){
-			$('disallow').value = "";

[... 4281 lines stripped ...]


More information about the asterisk-gui-commits mailing list