pari: branch asterisknow r413 - in /branches/asterisknow: ./ config/ config/s...

asterisk-gui-commits at lists.digium.com asterisk-gui-commits at lists.digium.com
Mon Mar 12 08:17:34 MST 2007


Author: pari
Date: Mon Mar 12 10:17:34 2007
New Revision: 413

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=413
Log:
Merged revisions 374-375,377,379-394,397-406,408-410 via svnmerge from 
https://svn.digium.com/svn/asterisk-gui/trunk

........
r374 | pari | 2007-02-20 13:11:24 -0600 (Tue, 20 Feb 2007) | 1 line

document Titles for all pages in the GUI
........
r375 | pari | 2007-02-20 13:15:02 -0600 (Tue, 20 Feb 2007) | 1 line

wrong place
........
r377 | pari | 2007-02-22 13:35:10 -0600 (Thu, 22 Feb 2007) | 1 line

toJSON() -- converts a asterisk config file to JSON. This function is not used anywhere in the GUI yet, but there are place where it could have been useful. For example, there were many places where we just wanted to read all the contexts in a config file - with this function it is no longer required to create a select box and use astmanEngine.config2list
........
r379 | pari | 2007-02-26 16:07:43 -0600 (Mon, 26 Feb 2007) | 1 line

appendChild instead of document.write - the proper way
........
r380 | pari | 2007-02-26 16:28:41 -0600 (Mon, 26 Feb 2007) | 1 line

defining the right event
........
r381 | pari | 2007-02-26 17:53:32 -0600 (Mon, 26 Feb 2007) | 1 line

cross browser functions for adding & removing events , moved showdiv_message to onpageload, removed numberplan_advanced.html
........
r382 | pari | 2007-02-26 23:47:41 -0600 (Mon, 26 Feb 2007) | 1 line

using toJSON() instead of config2list 
........
r383 | pari | 2007-02-27 10:16:00 -0600 (Tue, 27 Feb 2007) | 1 line

fixing some really bad code 
........
r384 | pari | 2007-02-27 11:13:50 -0600 (Tue, 27 Feb 2007) | 1 line

huh! substr() is broken in IE svn diff numberplan.html  
........
r385 | pari | 2007-02-27 11:41:10 -0600 (Tue, 27 Feb 2007) | 1 line

Upgraded to Prototype 1.5 (with patch described at http://forum.openrico.org/topic/2228)
........
r386 | pari | 2007-02-27 18:15:51 -0600 (Tue, 27 Feb 2007) | 1 line

This commit should fix most of the IE memory leaks in the GUI
........
r387 | pari | 2007-02-28 10:16:49 -0600 (Wed, 28 Feb 2007) | 1 line

minor html fixes for IE
........
r388 | pari | 2007-02-28 10:56:30 -0600 (Wed, 28 Feb 2007) | 1 line

updating providers.conf.sample with trunk_username field that was introduced a while back
........
r389 | pari | 2007-02-28 11:37:04 -0600 (Wed, 28 Feb 2007) | 1 line

New option to choose that 'Local Extensions can be any digits in length'
........
r390 | pari | 2007-02-28 19:26:51 -0600 (Wed, 28 Feb 2007) | 1 line

 alternative for browser's inbuilt alert box :) 
........
r391 | pari | 2007-02-28 21:59:07 -0600 (Wed, 28 Feb 2007) | 1 line

alert replaced by gui_alert function
........
r392 | pari | 2007-03-01 00:45:10 -0600 (Thu, 01 Mar 2007) | 1 line

the window of an iframe can be accessed by the contentWindow property - so reusing the same iframe for all alerts :)
........
r393 | pari | 2007-03-01 09:24:24 -0600 (Thu, 01 Mar 2007) | 1 line

gui_alert being executed before astman.js was loaded
........
r394 | pari | 2007-03-01 17:17:22 -0600 (Thu, 01 Mar 2007) | 1 line

Undoing the changes done in commit 311, the code in finally{} is being executed long before all the callbacks in the try{} are executed - my bad.
........
r397 | pari | 2007-03-05 10:28:45 -0600 (Mon, 05 Mar 2007) | 1 line

updated some tooltips
........
r398 | pari | 2007-03-05 11:36:06 -0600 (Mon, 05 Mar 2007) | 1 line

Link for service providers signup/home page - add regurl field in providers.conf
........
r399 | pari | 2007-03-05 11:39:11 -0600 (Mon, 05 Mar 2007) | 1 line

added regurl field to the sample providers.conf
........
r400 | pari | 2007-03-05 18:50:00 -0600 (Mon, 05 Mar 2007) | 1 line

Critical fix in core astman - fieldbyname, catbyname are declared as Arrays and used as Objects through out the script.  Declaring them Objects instead.
........
r401 | pari | 2007-03-07 15:23:33 -0600 (Wed, 07 Mar 2007) | 1 line

create jingle.conf and providers.conf if they are not found
........
r402 | pari | 2007-03-07 16:53:26 -0600 (Wed, 07 Mar 2007) | 1 line

[1]: select boxes are defaulting to  first element when the value is 'empty or invalid (no longer exits)'. [2] in Calling Rules new numberplan is being built on numberplan1 - instead build on whatever available
........
r403 | pari | 2007-03-07 18:02:50 -0600 (Wed, 07 Mar 2007) | 1 line

trying to make tooltips more noticeable
........
r404 | pari | 2007-03-07 19:46:31 -0600 (Wed, 07 Mar 2007) | 1 line

IE6 giving an error at focus()
........
r405 | pari | 2007-03-07 21:22:24 -0600 (Wed, 07 Mar 2007) | 1 line

'Incoming Calling Rules' in setup wizard
........
r406 | pari | 2007-03-08 16:02:39 -0600 (Thu, 08 Mar 2007) | 1 line

incoming.html was not properly fixed in commit 405 
........
r408 | pari | 2007-03-09 15:46:40 -0600 (Fri, 09 Mar 2007) | 1 line

Codec Preferences for trunks :)
........
r409 | pari | 2007-03-09 21:02:15 -0600 (Fri, 09 Mar 2007) | 1 line

Fix: 'Disallow all()' when disallow all is checked
........
r410 | pari | 2007-03-09 22:10:42 -0600 (Fri, 09 Mar 2007) | 1 line

Fixes for Global SIP/IAX codec preferences
........

Added:
    branches/asterisknow/config/guialert.html
      - copied unchanged from r410, trunk/config/guialert.html
    branches/asterisknow/config/setup/8.html
      - copied unchanged from r410, trunk/config/setup/8.html
Removed:
    branches/asterisknow/config/numberplan_advanced.html
Modified:
    branches/asterisknow/   (props changed)
    branches/asterisknow/config/backup.html
    branches/asterisknow/config/cfgadvanced.html
    branches/asterisknow/config/cfgappliance.html
    branches/asterisknow/config/cfgbasic.html
    branches/asterisknow/config/home.html
    branches/asterisknow/config/homeapp.html
    branches/asterisknow/config/iax.html
    branches/asterisknow/config/incoming.html
    branches/asterisknow/config/jabber.html
    branches/asterisknow/config/jingle.html
    branches/asterisknow/config/localexts.html
    branches/asterisknow/config/meetme.html
    branches/asterisknow/config/menus.html
    branches/asterisknow/config/moh.html
    branches/asterisknow/config/networking.html
    branches/asterisknow/config/numberplan.html
    branches/asterisknow/config/options.html
    branches/asterisknow/config/queues.html
    branches/asterisknow/config/record.html
    branches/asterisknow/config/scripts/astman.js
    branches/asterisknow/config/scripts/prototype.js
    branches/asterisknow/config/scripts/tooltip.js
    branches/asterisknow/config/setup/1.html
    branches/asterisknow/config/setup/10.html
    branches/asterisknow/config/setup/2.html
    branches/asterisknow/config/setup/3.html
    branches/asterisknow/config/setup/4.html
    branches/asterisknow/config/setup/5.html
    branches/asterisknow/config/setup/6.html
    branches/asterisknow/config/setup/7.html
    branches/asterisknow/config/setup/install.html
    branches/asterisknow/config/sip.html
    branches/asterisknow/config/status.html
    branches/asterisknow/config/stylesheets/schwing.css
    branches/asterisknow/config/sysinfo.html
    branches/asterisknow/config/trunks.html
    branches/asterisknow/config/users.html
    branches/asterisknow/config/voicemail.html
    branches/asterisknow/config/zapata.html
    branches/asterisknow/configs/providers.conf.sample

Propchange: branches/asterisknow/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Mar 12 10:17:34 2007
@@ -1,1 +1,1 @@
-/trunk:1-365
+/trunk:1-412

Modified: branches/asterisknow/config/backup.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/backup.html?view=diff&rev=413&r1=412&r2=413
==============================================================================
--- branches/asterisknow/config/backup.html (original)
+++ branches/asterisknow/config/backup.html Mon Mar 12 10:17:34 2007
@@ -28,6 +28,8 @@
 var bkpfile ;
 
 function localajaxinit() {
+	showdiv_statusmessage();
+	setWindowTitle("Backup");
 	parent.loadscreen(this);
 	$('status_message').style.top  = 	100;
 	$('status_message').style.left  = 	100;
@@ -99,9 +101,4 @@
 	</tr>
 </table>
 </div>
-<SCRIPT LANGUAGE="JavaScript">
-<!--
-showdiv_statusmessage();
-//-->
-</SCRIPT>
 </body>

Modified: branches/asterisknow/config/cfgadvanced.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/cfgadvanced.html?view=diff&rev=413&r1=412&r2=413
==============================================================================
--- branches/asterisknow/config/cfgadvanced.html (original)
+++ branches/asterisknow/config/cfgadvanced.html Mon Mar 12 10:17:34 2007
@@ -21,7 +21,7 @@
 <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 ){
-	alert(browser_alert);
+	gui_alert(browser_alert);
 }
 </script>
 <script src="scripts/prototype.js"></script>
@@ -82,7 +82,7 @@
 			"Define how your incoming calls should be handled & configure DID (Direct inward Dialing)"),
 
 		new PanelDef("menus", "Voice Menus", "accordion-icon.gif",
-			"Menus allow for more efficient routing of calls from incoming callers."),
+			"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"),
@@ -169,11 +169,17 @@
 	}
 
 	function show_Acctooltip(name, tip){
-		if(loggedon == 1)
-		$('tooltip').innerHTML = 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() { } } );		
+			} 
+		} );
 	}
 
 	function registerajax() {
+		Rico.Corner.round('tooltip_round', {compact:true});
 		var pnameheight = 22;
 		var pheight = (503  - (pnameheight*panels.length) ) ;
 		accordion = new Rico.Accordion( $('configpanel'), { panelHeight: pheight,onHideTab:fademainscreen,onShowTab:showmainscreen });
@@ -205,7 +211,7 @@
 					window.location.href=window.location.href;
 			},
 			onFailure: function(t) {
-				alert("Config Error: " + t.status + ": " + t.statusText);
+				gui_alert("Config Error: " + t.status + ": " + t.statusText);
 			}
 		};
 		opt2.parameters ="action=logoff";
@@ -257,9 +263,7 @@
 		</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 style="margin-left: 4px;">
-			<BR>
-			<font style="margin-left:4px; font-family : Trebuchet MS, Arial, Helvetica, sans-serif;font-size: 11px; font-weight: bold">Tooltips:</font>
+			<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>

Modified: branches/asterisknow/config/cfgappliance.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/cfgappliance.html?view=diff&rev=413&r1=412&r2=413
==============================================================================
--- branches/asterisknow/config/cfgappliance.html (original)
+++ branches/asterisknow/config/cfgappliance.html Mon Mar 12 10:17:34 2007
@@ -20,9 +20,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 ){
-	alert(browser_alert);
-}
 </script>
 <script src="scripts/prototype.js"></script>
 <script src="scripts/rico.js"></script>
@@ -85,7 +82,7 @@
 			"Configures networking parameters"),
 
 		new PanelDef("menus", "Voice Menus", "accordion-icon.gif",
-			"Menus allow for more efficient routing of calls from incoming callers."),
+			"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"),
@@ -160,11 +157,20 @@
 	}
 
 	function show_Acctooltip(name, tip){
-		if(loggedon == 1)
-		$('tooltip').innerHTML = 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() { } } );		
+			} 
+		} );
 	}
 
 	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 });
@@ -196,7 +202,7 @@
 					window.location.href=window.location.href;
 			},
 			onFailure: function(t) {
-				alert("Config Error: " + t.status + ": " + t.statusText);
+				gui_alert("Config Error: " + t.status + ": " + t.statusText);
 			}
 		};
 		opt2.parameters ="action=logoff";
@@ -208,7 +214,7 @@
 	<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 target='_extern' href="http://www.digium.com/en/company/profile/">About Digium</a>&nbsp;|&nbsp;
@@ -242,9 +248,7 @@
 		</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 style="margin-left: 4px;">
-			<BR>
-			<font style="margin-left:4px; font-family : Trebuchet MS, Arial, Helvetica, sans-serif;font-size: 11px; font-weight: bold">Tooltips:</font>
+			<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>

Modified: branches/asterisknow/config/cfgbasic.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/cfgbasic.html?view=diff&rev=413&r1=412&r2=413
==============================================================================
--- branches/asterisknow/config/cfgbasic.html (original)
+++ branches/asterisknow/config/cfgbasic.html Mon Mar 12 10:17:34 2007
@@ -20,9 +20,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 ){
-	alert(browser_alert);
-}
 </script>
 <script src="scripts/prototype.js"></script>
 <script src="scripts/rico.js"></script>
@@ -88,7 +85,7 @@
 //			"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."),
+			"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"),
@@ -166,12 +163,20 @@
 	}
 
 	function show_Acctooltip(name, tip){
-		if(loggedon == 1)
-		$('tooltip').innerHTML = 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() { } } );		
+			} 
+		} );
+	}
 
 	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 });
@@ -206,7 +211,7 @@
 					window.location.href=window.location.href;
 			},
 			onFailure: function(t) {
-				alert("Config Error: " + t.status + ": " + t.statusText);
+				gui_alert("Config Error: " + t.status + ": " + t.statusText);
 			}
 		};
 		opt2.parameters ="action=logoff";
@@ -223,7 +228,7 @@
 	<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>
@@ -259,9 +264,7 @@
 		</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 style="margin-left: 4px;">
-			<BR>
-			<font style="margin-left:4px; font-family : Trebuchet MS, Arial, Helvetica, sans-serif;font-size: 11px; font-weight: bold">Tooltips:</font>
+			<div id="tooltip_round" class="tooltip_round">
 			<div id='tooltip' style="margin-left:4px; height:100px; font-family : Trebuchet MS, Arial, Helvetica, sans-serif;font-size: 11px; "><script>document.write(tooltip_default);</script></div>
 			</div>
 			<BR><BR>

Modified: branches/asterisknow/config/home.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/home.html?view=diff&rev=413&r1=412&r2=413
==============================================================================
--- branches/asterisknow/config/home.html (original)
+++ branches/asterisknow/config/home.html Mon Mar 12 10:17:34 2007
@@ -51,7 +51,7 @@
 			localloggedon = 1;
 			parent.document.getElementById('logoutlink').innerHTML = "Logout";
 			parent.document.getElementById('logoutlink').onclick = parent.Logoff ;
-			alert("You are using the default password provided by AsteriskNOW !! \n\n It is strongly recommended that you change your default password ");
+			parent.gui_alert("You are using the default password provided by AsteriskNOW !! \n\n It is strongly recommended that you change your default password ");
 			window.location.href="options.html";
 			return;
 		}
@@ -117,13 +117,13 @@
 
 	function doLogin() {
 		if( $('username').value == "" ){
-				alert("Please enter a Username");
+				parent.gui_alert("Please enter a Username");
 				$('username').focus();
 				return true;			
 		}
 
 		if( $('secret').value == "" ){
-				alert("Please enter a password");
+				parent.gui_alert("Please enter a password");
 				$('secret').focus();
 				return true;			
 		}
@@ -143,6 +143,12 @@
 		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';}
+
+		top.document.title = "Asterisk GUI (Beta) -- Home";
 		localajaminit();
 	}
 

Modified: branches/asterisknow/config/homeapp.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/homeapp.html?view=diff&rev=413&r1=412&r2=413
==============================================================================
--- branches/asterisknow/config/homeapp.html (original)
+++ branches/asterisknow/config/homeapp.html Mon Mar 12 10:17:34 2007
@@ -146,6 +146,7 @@
 		parent.astmanEngine.sendRequest('action=ping', demo.pongs);
 	}
 	function localinit() {
+		top.document.title = "Asterisk GUI (Beta) -- Home";
 		localajaxinit();
 		localajaminit();
 	}

Modified: branches/asterisknow/config/iax.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/iax.html?view=diff&rev=413&r1=412&r2=413
==============================================================================
--- branches/asterisknow/config/iax.html (original)
+++ branches/asterisknow/config/iax.html Mon Mar 12 10:17:34 2007
@@ -27,7 +27,7 @@
 <script>
 var phonecallbacks = new Object;
 var widgets = new Array;
-var fieldnames = new Array('status', 'save', 'cancel', 'bindport', 'bindaddr', 'iaxcompat', 'nochecksums', 'delayreject', 'amaflags', 'adsi', 'accountcode', 'language', 'mohinterpret', 'mohsuggest', 'bandwidth','jitterbuffer', 'forcejitterbuffer', 'dropcount', 'maxjitterbuffer', 'maxjitterinterps', 'resyncthreshold', 'maxexcessbuffer', 'minexcessbuffer', 'jittershrinkrate', 'trunkfreq', 'trunktimestamps', 'minregexpire', 'maxregexpire', 'iaxthreadcount', 'iaxmaxthreadcount' , 'register', 'authdebug', 'tos', 'regcontext', 'autokill', 'codecpriority', 'rtcachefriends', 'rtupdate', 'rtautoclear', 'rtignoreexpire','allow','disallow');
+var fieldnames = new Array('status', 'save', 'cancel', 'bindport', 'bindaddr', 'iaxcompat', 'nochecksums', 'delayreject', 'amaflags', 'adsi', 'accountcode', 'language', 'mohinterpret', 'mohsuggest', 'bandwidth','jitterbuffer', 'forcejitterbuffer', 'dropcount', 'maxjitterbuffer', 'maxjitterinterps', 'resyncthreshold', 'maxexcessbuffer', 'minexcessbuffer', 'jittershrinkrate', 'trunkfreq', 'trunktimestamps', 'minregexpire', 'maxregexpire', 'iaxthreadcount', 'iaxmaxthreadcount' , 'register', 'authdebug', 'tos', 'regcontext', 'autokill', 'codecpriority', 'rtcachefriends', 'rtupdate', 'rtautoclear', 'rtignoreexpire','disallow','allow');
 
 
 phonecallbacks.format = function(t) {
@@ -51,6 +51,7 @@
 
 
 function localajaxinit(){
+	setWindowTitle("IAX");
 	parent.loadscreen(this);
 		for (var x =0; x< fieldnames.length; x++ ) {
 			widgets[fieldnames[x]] = $(fieldnames[x]);
@@ -75,17 +76,29 @@
 }
 function selectbox_add(selectbox_id, codec){
 		switch(codec) {
-		  case 'ulaw':   $(selectbox_id).innerHTML = $(selectbox_id).innerHTML + '<option value="ulaw">u-law</option>'; break
-		  case 'alaw':   $(selectbox_id).innerHTML = $(selectbox_id).innerHTML + '<option value="alaw">a-law</option>'; break
-		  case 'gsm':   $(selectbox_id).innerHTML = $(selectbox_id).innerHTML + '<option value="gsm">GSM</option>'; break
-		  case 'ilbc':   $(selectbox_id).innerHTML = $(selectbox_id).innerHTML + '<option value="ilbc">ILBC</option>'; break
-		  case 'speex':   $(selectbox_id).innerHTML = $(selectbox_id).innerHTML + '<option value="speex">SPEEX</option>'; break
-		  case 'g726':   $(selectbox_id).innerHTML = $(selectbox_id).innerHTML + '<option value="g726">G.726</option>'; break
-		  case 'adpcm':   $(selectbox_id).innerHTML = $(selectbox_id).innerHTML + '<option value="adpcm">ADPCM</option>'; break
-		  case 'lpc10':   $(selectbox_id).innerHTML = $(selectbox_id).innerHTML + '<option value="lpc10">LPC10</option>'; break
-		  case 'g729':   $(selectbox_id).innerHTML = $(selectbox_id).innerHTML + '<option value="g729">G.729a</option>'; break
+		  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');
+	  newoption.text = a ;
+	  newoption.value = b ;
+	  var selectbox = document.getElementById( c );
+	  try {
+		selectbox.add(newoption, null); // standards compliant; doesn't work in IE
+	  }catch(ex) {
+		selectbox.add(newoption); // IE only
+	  }
+	}
 }
 function 	selectbox_remove(selectbox_id,codec){
 	for (var x=0; x < $(selectbox_id).length; x++){
@@ -115,14 +128,12 @@
 				}
 			}
 			$('div_setordercodecs').style.display = "none";
-			for (var x =0; x < fieldnames.length; x++) {
-				widgets[fieldnames[x]].disabled = false;
-			}
+			$('bg_transparent').style.display = "none";
+		$('save').disabled = false;
+		$('cancel').disabled = false;
 }
 function cancel_ordercodecs(){
-			for (var x =0; x < fieldnames.length; x++) {
-				widgets[fieldnames[x]].disabled = false;
-			}
+			$('bg_transparent').style.display = "none";
 			$('div_setordercodecs').style.display = "none";
 }
 function update_div_setordercodecs(){
@@ -150,11 +161,18 @@
 			selectbox_remove("disallowed",tmp[x]);
 		}
 
-		for (var x =0; x < fieldnames.length; x++) {
-			widgets[fieldnames[x]].disabled = true;
-		}
-
-	$('div_setordercodecs').style.display='block';
+	$('bg_transparent').style.display='';
+	$('div_setordercodecs').style.display='';
+}
+
+function disallow_all_refresh(){
+	if( $('disallow_all').checked ){
+		$('disallow').value = "all";
+		$('allow').value = "";
+		update_div_setordercodecs();
+		$('save').disabled = false;
+		$('cancel').disabled = false;
+	}
 }
 // End of Allowed/Disallowed codescs related functions
 </script>
@@ -366,36 +384,9 @@
 				<td>&nbsp;<input type='text' id='disallow' class="input8" size=9></td>
 		</tr>
 		<tr ><td align=right>Allowed Codecs:</td>
-				<td>&nbsp;<input type='text' id='allow' class="input8" size=9><input type=button id="sd" value="Edit" onclick="update_div_setordercodecs()">
-							<div style="position:absolute; display:none; left: 160; top: 210; width:350; background-color:#F4EFE5; border-width: 1px; border-color: #7E5538; border-style: solid;" id="div_setordercodecs">
-							<table align=center>
-								<tr><td><BR></td></tr>
-								<tr><td class="field_text">Allowed</td>
-										<td></td>
-										<td class="field_text">Disallowed</td>
-								</tr>
-								<tr><td><select id="allowed" size=9 class="input8"></select></td>
-										<td><input type="button" id="select_codec" value="<" onclick="enable_selectedcodec()"><BR><input type="button" id="deselect_codec" value=">" onclick="disable_selectedcodec()"></td>
-										<td><select id="disallowed" size=9 class="input8">
-												</select>
-										</td>
-								</tr>
-								<tr><td></td>
-										<td></td>
-										<td class="field_text"><input type=checkbox id="disallow_all">Disallow All</td>
-								</tr>
-								<tr><td colspan=3 align=Center>
-										<input type="button" class="buttonbold" id="setordercodecs" value="update" onclick="update_ordercodecs()">&nbsp;&nbsp;
-										<input type="button" class="buttonbold" id="cancel_setorder" value="Cancel" onclick="cancel_ordercodecs()">
-										</td>
-								</tr>
-								<tr><td><BR></td></tr>
-							</table>
-						</div>		
+				<td>&nbsp;<input type='text' id='allow' class="input8" size=9><input type=button id="sd" value="Edit" onclick="update_div_setordercodecs()">		
 				</td>
 		</tr>
-
-
 		</table>
 	</div>
 <HR>
@@ -405,5 +396,36 @@
 	</table>
 </div>
 <div style='visibility:hidden;overflow:hidden;width:0px;height:0px'><select  size="5" id="hiddenfield" style="width:220px"></select></div>
-<div id='tooltip' style="margin-left:5px;height: 60px; width:575px; overflow :auto; font-family : Trebuchet MS, Arial, Helvetica, sans-serif;font-size: 11px; "></div>
+<div  id="div_setordercodecs" style="position:absolute; display:none; left: 120; top: 70; width:350; background-color:#F4EFE5; border-width: 1px; border-color: #7E5538; border-style: solid; z-index:5">
+	<table width="100%" cellpadding=0 cellspacing=0 onmousedown="startDrag(event , 'div_setordercodecs');">
+	<TR bgcolor="#7E5538"  style="background-image:url('images/title_gradient.gif');">
+			<TD Height="20" align="center" style="cursor: move"><font style="color:#FFFFFF; font-size: 12px; font-weight:bold;">Codec Preferences</font></TD>
+		   <TD Height="20" align="right" style="cursor: move"><A href="#" onclick="cancel_ordercodecs();"><font style="color:#FFFFFF; font-size: 12px; font-weight:bold;">X</font></A></TD>
+			<TD width=4></TD>
+	</TR>
+	</table>
+<table align=center>
+	<tr><td><BR></td></tr>
+	<tr><td class="field_text">Allowed</td>
+		<td></td>
+		<td class="field_text">Disallowed</td>
+	</tr>
+	<tr><td><select id="allowed" size=9 class="input8"></select></td>
+		<td><input type="button" id="select_codec" value="<" onclick="enable_selectedcodec()"><BR><input type="button" id="deselect_codec" value=">" onclick="disable_selectedcodec()"></td>
+		<td><select id="disallowed" size=9 class="input8"></select></td>
+	</tr>
+	<tr><td></td>
+		<td></td>
+		<td class="field_text"><input type=checkbox id="disallow_all" onclick="disallow_all_refresh();">Disallow All</td>
+	</tr>
+	<tr><td colspan=3 align=Center>
+		<input type="button" class="buttonbold" id="setordercodecs" value="update" onclick="update_ordercodecs()">&nbsp;&nbsp;
+		<input type="button" class="buttonbold" id="cancel_setorder" value="Cancel" onclick="cancel_ordercodecs()">
+		</td>
+	</tr>
+	<tr><td><BR></td></tr>
+</table>
+</div>
+<div id="bg_transparent" STYLE="display:none; position: absolute; left: 0; top: 24; width:100%; height:100%;  background-color:#EFEFEF; -moz-opacity:.50;opacity:.50; border-width: 1px; border-color: #EFEFEF; border-style: solid; z-index:3">
+</div>
 </body>

Modified: branches/asterisknow/config/incoming.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/incoming.html?view=diff&rev=413&r1=412&r2=413
==============================================================================
--- branches/asterisknow/config/incoming.html (original)
+++ branches/asterisknow/config/incoming.html Mon Mar 12 10:17:34 2007
@@ -21,6 +21,7 @@
 <script src="scripts/prototype.js"></script>
 <script src="scripts/rico.js"></script>
 <script src="scripts/astman.js"></script>
+<script src="scripts/tooltip.js"></script>
 <link href="stylesheets/rico.css" media="all" rel="Stylesheet" type="text/css" />
 <link href="stylesheets/schwing.css" media="all" rel="Stylesheet" type="text/css" />
 <script>
@@ -105,7 +106,7 @@
 	// load list of trunks to 'fromprovider'
 	var t ;
 	for ( t in didtrunks){
-		if( t == "extend")continue ;
+	if(  didtrunks.hasOwnProperty(t) ){
 		  var a = document.createElement('option');
 		  a.text = didtrunks[t].trunkname ;
 		  a.value = t ;
@@ -116,6 +117,7 @@
 		  catch(ex) {
 			b.add(a); 
 		  }
+	  }
 	}
 	// load the object didtrunks into the table callingRulesTable
 	refreshtable();
@@ -131,11 +133,14 @@
 	}
 	
 	for ( var i in didtrunks ){ // for each trunk
-			if( i == "extend"){ continue;}
-			for(var j in didtrunks[i]){ // for each parttern of the trunk
-				if( j == "extend" || j == "trunkname"){ continue;}
+		if( didtrunks.hasOwnProperty(i) ){ 
+			for(var j in didtrunks[i]){ // for each pattern of the trunk
+				if( didtrunks[i].hasOwnProperty(j) ){ 
+					if( j == "trunkname"){ continue;}
 					addrowtotable( j, i, didtrunks[i][j].action, didtrunks[i][j].priority);
+				}
 			}
+		}
 	}
 
 	if( $('callingRulesTable').rows.length == 0){
@@ -253,18 +258,18 @@
 function save_new_incomingrule(){
 	// field validation 
 	if($('incomingrule').value == "frompattern" && $('frompattern').value == "" ){
-		alert("Please define an incoming call pattern !");
+		gui_alert("Please define an incoming call pattern !");
 		$('frompattern').focus();
 		$('frompattern').select();
 		return false;
 	}
 	if( $('fromprovider').selectedIndex == -1 ){
-		alert("Please select a service provider !");
+		gui_alert("Please select a service provider !");
 		$('fromprovider').focus();
 		return false;
 	}
 	if( $('toextension').selectedIndex == -1 ){
-		alert("Please select an extension to which an incoming call should be routed to !");
+		gui_alert("Please select an extension to which an incoming call should be routed to !");
 		$('toextension').focus();
 		return false;
 	}
@@ -295,7 +300,7 @@
 
 	// check whether there is an existing entry with this pattern 
 	if( typeof didtrunks[temp_provider][newpattern] != "undefined" ){
-		alert("An incoming call rule is already defined \n on this trunk for the selcted pattern !! ");
+		gui_alert("An incoming call rule is already defined \n on this trunk for the selcted pattern !! ");
 		return false;
 	}
 	
@@ -313,7 +318,7 @@
 				$('bg_transparent').style.display ='none';
 			},
 			onFailure: function(t) {
-				alert("Config Error: " + t.status + ": " + t.statusText);
+				gui_alert("Config Error: " + t.status + ": " + t.statusText);
 			}
 		};
 
@@ -326,13 +331,13 @@
 function update_incomingrule(){
 	// field validation 
 	if($('incomingrule').value == "frompattern" && $('frompattern').value == "" ){
-		alert("Please define an incoming call pattern !");
+		gui_alert("Please define an incoming call pattern !");
 		$('frompattern').focus();
 		$('frompattern').select();
 		return false;
 	}
 	if( $('toextension').selectedIndex == -1 ){
-		alert("Please select an extension to which an incoming call should be routed to !");
+		gui_alert("Please select an extension to which an incoming call should be routed to !");
 		$('toextension').focus();
 		return false;
 	}
@@ -367,7 +372,7 @@
 	}
 
 	if( typeof didtrunks[temp_provider][newpattern] != "undefined" && ( temp_provider != edit_DIDtrunk || newpattern != edit_pattern ) ){
-		alert("An incoming call rule is already defined \n on this trunk for the selcted pattern !! ");
+		gui_alert("An incoming call rule is already defined \n on this trunk for the selcted pattern !! ");
 		return false;
 	}
 
@@ -385,7 +390,7 @@
 			refreshtable();
 		},
 		onFailure: function(t) {
-			alert("Config Error: " + t.status + ": " + t.statusText);
+			gui_alert("Config Error: " + t.status + ": " + t.statusText);
 		}
 	};
 	opt.parameters="action=updateconfig&reload=yes&srcfilename=" + encodeURIComponent("extensions.conf") + "&dstfilename=" + encodeURIComponent("extensions.conf") + uri;
@@ -439,7 +444,7 @@
 				refreshtable();
 			},
 			onFailure: function(t) {
-				alert("Config Error: " + t.status + ": " + t.statusText);
+				gui_alert("Config Error: " + t.status + ": " + t.statusText);
 			}
 		};
 		var uri = build_action('delete',0, b, "exten" ,"", tmp_match);
@@ -454,14 +459,24 @@
 
 
 function localajaxinit() {
+	showdiv_statusmessage();
+	setWindowTitle("Incoming Calls");
 	for (var x =0; x < focus_fields.length; x++ ) {
 		$(focus_fields[x]).onfocus = function(){this.className = 'input9_hilight';}
 		$(focus_fields[x]).onblur = function(){this.className = 'input9';}
 	}
 	parent.astmanEngine.config2list("users.conf", $('users'), new Array(), user_callbacks);
 }
+
+
+function free_mem( ){
+	if( navigator.userAgent.indexOf("MSIE") == -1 ){ return true; }
+		try{
+			purge( document.body );
+		}catch(e){ }
+}
 </script>
-<body id="foo" onload="localajaxinit()"  bgcolor="EFEFEF">
+<body id="foo" onload="localajaxinit()"  bgcolor="EFEFEF"  onunload="free_mem()">
 <div class="mainscreenTitleBar">
 	<span style="margin-left: 4px;font-weight:bold;">Incoming Calls</span>
 	<span style="cursor: pointer; cursor: hand;" onclick="window.location.href=window.location.href;" >&nbsp;<img src="images/refresh.png" title=" Refresh " border=0 >&nbsp;</span>
@@ -484,7 +499,7 @@
 
 		<center><div style="height:25px;color: #FF0000;" id='status'  class="field_text9"></div></center>
 		<BR>
-		<center><input type="button" id="adddid" value="Add a Incoming Rule" onclick="add_incomingrule();"></center>
+		<center><input type="button" id="adddid" value="Add a Incoming Rule" onclick="add_incomingrule();"   onmouseover="show_tooltip('en', 'incoming',0);"></center>
 
 		<div id="userscontent" STYLE="display:none; position: absolute; left: 20; top: 40; width:475; height:190;  background-color:#F4EFE5;   border-width: 1px; border-color: #7E5538; border-style: solid;z-index:5">
 			<table width="100%" cellpadding=0 cellspacing=0 onmousedown="startDrag(event , 'userscontent');">
@@ -500,7 +515,7 @@
 											<option value="allunmatched">All Unmatched incoming calls</option>
 											<option value="frompattern">incoming calls that match </option>
 										</select>
-										<span id="thatmatch">pattern <input type="text" id="frompattern" size=12  onchange="enablesave();"  onkeyup="enablesave();"  class="input9"></span>
+										<span id="thatmatch" onmouseover="show_tooltip('en', 'incoming', 1);">pattern <input type="text" id="frompattern" size=12  onchange="enablesave();"  onkeyup="enablesave();"  class="input9"></span>
 										</NOBR>
 					</TD>
 			</TR>
@@ -519,9 +534,4 @@
 </div>
 <div id="bg_transparent" STYLE="display:none; position: absolute; left: 0; top: 24; width:100%; height:100%;  background-color:#EFEFEF; -moz-opacity:.50;opacity:.50; border-width: 1px; border-color: #EFEFEF; border-style: solid; z-index:4">
 </div>
-<SCRIPT LANGUAGE="JavaScript">
-<!--
-showdiv_statusmessage();
-//-->
-</SCRIPT>
 </body>

Modified: branches/asterisknow/config/jabber.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/jabber.html?view=diff&rev=413&r1=412&r2=413
==============================================================================
--- branches/asterisknow/config/jabber.html (original)
+++ branches/asterisknow/config/jabber.html Mon Mar 12 10:17:34 2007
@@ -52,6 +52,7 @@
 
 
 function localajaxinit() {
+		setWindowTitle("Jabber");
 		// Load the jabber.conf->users into the Users, associate the field to other fields
 		parent.loadscreen(this);
 		for (var x =0; x < fieldnames.length; x++) {

Modified: branches/asterisknow/config/jingle.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/jingle.html?view=diff&rev=413&r1=412&r2=413
==============================================================================
--- branches/asterisknow/config/jingle.html (original)
+++ branches/asterisknow/config/jingle.html Mon Mar 12 10:17:34 2007
@@ -157,6 +157,7 @@
 }
 
 function localajaxinit() {
+			setWindowTitle("Jingle");
 			// Load the jabber.conf->users into the Users, associate the field to other fields
 			parent.loadscreen(this);
 			for (var x =0; x < fieldnames.length; x++) {


[... 5200 lines stripped ...]


More information about the asterisk-gui-commits mailing list