pari: trunk r391 - in /trunk/config: ./ scripts/

asterisk-gui-commits at lists.digium.com asterisk-gui-commits at lists.digium.com
Wed Feb 28 20:59:08 MST 2007


Author: pari
Date: Wed Feb 28 21:59:07 2007
New Revision: 391

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=391
Log:
alert replaced by gui_alert function

Modified:
    trunk/config/cfgadvanced.html
    trunk/config/cfgappliance.html
    trunk/config/cfgbasic.html
    trunk/config/guialert.html
    trunk/config/home.html
    trunk/config/incoming.html
    trunk/config/localexts.html
    trunk/config/meetme.html
    trunk/config/menus.html
    trunk/config/numberplan.html
    trunk/config/options.html
    trunk/config/queues.html
    trunk/config/record.html
    trunk/config/scripts/astman.js
    trunk/config/sysinfo.html
    trunk/config/trunks.html
    trunk/config/users.html
    trunk/config/voicemail.html

Modified: trunk/config/cfgadvanced.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/cfgadvanced.html?view=diff&rev=391&r1=390&r2=391
==============================================================================
--- trunk/config/cfgadvanced.html (original)
+++ trunk/config/cfgadvanced.html Wed Feb 28 21:59:07 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>
@@ -205,7 +205,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";

Modified: trunk/config/cfgappliance.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/cfgappliance.html?view=diff&rev=391&r1=390&r2=391
==============================================================================
--- trunk/config/cfgappliance.html (original)
+++ trunk/config/cfgappliance.html Wed Feb 28 21:59:07 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>
@@ -196,7 +196,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";

Modified: trunk/config/cfgbasic.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/cfgbasic.html?view=diff&rev=391&r1=390&r2=391
==============================================================================
--- trunk/config/cfgbasic.html (original)
+++ trunk/config/cfgbasic.html Wed Feb 28 21:59:07 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>
@@ -206,7 +206,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";

Modified: trunk/config/guialert.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/guialert.html?view=diff&rev=391&r1=390&r2=391
==============================================================================
--- trunk/config/guialert.html (original)
+++ trunk/config/guialert.html Wed Feb 28 21:59:07 2007
@@ -16,7 +16,7 @@
 <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:320; height:130;  background-color:#FFFFFF;   border-width: 2px; border-color: #7E5538; border-style: solid; background-style: solid;">
+			<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">
@@ -35,6 +35,7 @@
 					</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>

Modified: trunk/config/home.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/home.html?view=diff&rev=391&r1=390&r2=391
==============================================================================
--- trunk/config/home.html (original)
+++ trunk/config/home.html Wed Feb 28 21:59:07 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 chnage 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;			
 		}

Modified: trunk/config/incoming.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/incoming.html?view=diff&rev=391&r1=390&r2=391
==============================================================================
--- trunk/config/incoming.html (original)
+++ trunk/config/incoming.html Wed Feb 28 21:59:07 2007
@@ -254,18 +254,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;
 	}
@@ -296,7 +296,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;
 	}
 	
@@ -314,7 +314,7 @@
 				$('bg_transparent').style.display ='none';
 			},
 			onFailure: function(t) {
-				alert("Config Error: " + t.status + ": " + t.statusText);
+				gui_alert("Config Error: " + t.status + ": " + t.statusText);
 			}
 		};
 
@@ -327,13 +327,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;
 	}
@@ -368,7 +368,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;
 	}
 
@@ -386,7 +386,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;
@@ -440,7 +440,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);

Modified: trunk/config/localexts.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/localexts.html?view=diff&rev=391&r1=390&r2=391
==============================================================================
--- trunk/config/localexts.html (original)
+++ trunk/config/localexts.html Wed Feb 28 21:59:07 2007
@@ -47,7 +47,7 @@
 
 usercallbacks.beforeSaving= function(){
 		if(	$('localextenlength').value !=0 && $('localextenlength').value != $('userbase').value.length ){
-			alert("'length of Local Extensions' does not match \n the 'length of the Starting point of Allocation'");
+			gui_alert("'length of Local Extensions' does not match \n the 'length of the Starting point of Allocation'");
 			return false;
 		}
 
@@ -67,7 +67,7 @@
 										parent.loadscreen(this);
 						},
 						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("users.conf") + "&dstfilename=" + encodeURIComponent("users.conf") + "&Action-000000=update&Cat-000000=general&Var-000000=localextenlength&Value-000000=4"; ;

Modified: trunk/config/meetme.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/meetme.html?view=diff&rev=391&r1=390&r2=391
==============================================================================
--- trunk/config/meetme.html (original)
+++ trunk/config/meetme.html Wed Feb 28 21:59:07 2007
@@ -177,26 +177,26 @@
 					//parent.$('tooltip').innerHTML = " <font size=\"-2\" color=\"#FF0000\">Click on \'Call Queues\' panel to edit call queues </font>";
 					box.selectedIndex = -1;
 					 enable_disable_fields(0);
-					alert(" You can not edit the selected entry from here.\n Please click on the \'Call Queues\' panel to edit the selected entry");
+					gui_alert(" You can not edit the selected entry from here.\n Please click on the \'Call Queues\' panel to edit the selected entry");
 					return true;
 				}
 				if( box.options[box.selectedIndex].text.toLowerCase().match("-- check voicemail")     ){
 					//parent.$('tooltip').innerHTML = " <font size=\"-2\" color=\"#FF0000\">Click on \'Voicemail\' panel to edit Voicemail Preferences</font>";
 					box.selectedIndex = -1;
 				   enable_disable_fields(0);
-					alert(" You can not edit the selected entry from here.\n Please click on the \'Voicemail\' panel to edit the selected entry");
+					gui_alert(" You can not edit the selected entry from here.\n Please click on the \'Voicemail\' panel to edit the selected entry");
 					return true;
 				}
 				if( box.options[box.selectedIndex].text.toLowerCase().match("-- voice menu")     ){
 					box.selectedIndex = -1;
 					//parent.$('tooltip').innerHTML = " <font size=\"-2\" color=\"#FF0000\">Click on \'Voicemail\' panel to edit Voicemail Preferences</font>";
 					 enable_disable_fields(0);
-					alert(" You can not edit the selected entry from here.\n Please click on the \'Voice Menus\' panel to edit the selected entry");
+					gui_alert(" You can not edit the selected entry from here.\n Please click on the \'Voice Menus\' panel to edit the selected entry");
 					return true;
 				}
 				box.selectedIndex = -1;
 				 enable_disable_fields(0);
-				alert(" You can not edit the selected entry from here.\n Please click on the \'Users\' panel to edit the selected entry");
+				gui_alert(" You can not edit the selected entry from here.\n Please click on the \'Users\' panel to edit the selected entry");
 				return true;
 		}
 		temp_selectedexten = $('name').value;
@@ -232,10 +232,10 @@
 		}
 
 		// check whether the length of extension is valid
-		if(  !$('name').value.length ) { alert("Please enter an extension !"); $('name').focus(); return false; }
+		if(  !$('name').value.length ) { gui_alert("Please enter an extension !"); $('name').focus(); return false; }
 
 		if(  localextenlength !=0 && (localextenlength !=  $('name').value.length) ){
-				alert("Sorry, An Extension must be  "+ localextenlength  + " digits !");
+				gui_alert("Sorry, An Extension must be  "+ localextenlength  + " digits !");
 				$('name').focus();
 				return false;
 		}
@@ -247,7 +247,7 @@
 			for(var k=0; k<$('extensions').length; k++ ){
 				var tmp = $('extensions').options[k].innerHTML.split(' -- '); 
 				if( tmp[0] ==  $('name').value   ){
-					alert("Sorry, an entry named " + $('name').value + " already exists!");
+					gui_alert("Sorry, an entry named " + $('name').value + " already exists!");
 					return false;
 				}
 			}

Modified: trunk/config/menus.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/menus.html?view=diff&rev=391&r1=390&r2=391
==============================================================================
--- trunk/config/menus.html (original)
+++ trunk/config/menus.html Wed Feb 28 21:59:07 2007
@@ -193,7 +193,7 @@
 						delete voicemenusdata[deleted_voicmenu];
 					},
 					onFailure: function(t) {
-						alert("Config Error: " + t.status + ": " + t.statusText);
+						gui_alert("Config Error: " + t.status + ": " + t.statusText);
 					}
 				};
 			var existing_alias_string = voicemenusdata[deleted_voicmenu].alias_exten + ",1,Goto(" + deleted_voicmenu + "|s|1)"  ;
@@ -258,13 +258,13 @@
 
 function add_newstep(){
 	if( !$('newstep_action').value ){
-		alert("Please select an action for this step");
+		gui_alert("Please select an action for this step");
 		$('newstep_action').focus();
 		return;
 	}
 
 	if( $('newstep_action').value != "Answer" &&   $('newstep_action').value != "Hangup" && !$('newstep_var').value ){
-		alert("Please enter a value for '" + $('newstep_action').value +"'");
+		gui_alert("Please enter a value for '" + $('newstep_action').value +"'");
 		$('newstep_var').focus();
 		return;
 	}
@@ -306,7 +306,7 @@
 			},
 			onFailure: function(t) {
 				$('status_message').style.display='none';
-				alert("Config Error: " + t.status + ": " + t.statusText);
+				gui_alert("Config Error: " + t.status + ": " + t.statusText);
 			}
 	};
 	var uri = "";
@@ -368,7 +368,7 @@
 function save_vmenu(){
 
 	if( $('alias_exten').value.length > 0 && localextenlength !=0 && localextenlength !=  $('alias_exten').value.length){
-			alert("Sorry, An Extension must be  "+ localextenlength  + " digits !");
+			gui_alert("Sorry, An Extension must be  "+ localextenlength  + " digits !");
 			$('alias_exten').focus();
 			return false;
 	}
@@ -424,7 +424,7 @@
 			},
 			onFailure: function(t) {
 				$('status_message').style.display='none';
-				alert("Config Error: " + t.status + ": " + t.statusText);
+				gui_alert("Config Error: " + t.status + ": " + t.statusText);
 			}
 	};
 	var uri = "" ;
@@ -608,7 +608,7 @@
 
 			},
 			onFailure: function(t) {
-				alert("Config Error: " + t.status + ": " + t.statusText);
+				gui_alert("Config Error: " + t.status + ": " + t.statusText);
 			}
 	};	
 	var uri = "";
@@ -644,7 +644,7 @@
 			},
 			onFailure: function(t) {
 				$('status_message').style.display='none';
-				alert("Config Error: " + t.status + ": " + t.statusText);
+				gui_alert("Config Error: " + t.status + ": " + t.statusText);
 			}
 	};	
 	var uri = "";

Modified: trunk/config/numberplan.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/numberplan.html?view=diff&rev=391&r1=390&r2=391
==============================================================================
--- trunk/config/numberplan.html (original)
+++ trunk/config/numberplan.html Wed Feb 28 21:59:07 2007
@@ -72,21 +72,21 @@
 
 function checkfields(){
 	if( $('rulename').value.length == 0 ){
-		alert("Please enter a Rule Name");
+		gui_alert("Please enter a Rule Name");
 		$('rulename').focus();
 		return false;
 	}
 	if($('trunks').selectedIndex == -1){
-		alert("Please select a service provider to place this call through");
+		gui_alert("Please select a service provider to place this call through");
 		return false;
 	}
 	if($('define_advanced').style.display=="none" && $('beginswith').value.length==0 ){
-		alert("Please Enter the beginning pattern of the number");
+		gui_alert("Please Enter the beginning pattern of the number");
 		$('beginswith').focus();
 		return false;
 	}
 	if($('define_usual').style.display=="none" && $('pattern').value.length == 0 ){
-		alert("Please Enter a custom pattern");
+		gui_alert("Please Enter a custom pattern");
 		$('pattern').focus();
 		return false;
 	}
@@ -136,7 +136,7 @@
 									oncomplete(); 
 						},
 						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;
@@ -156,7 +156,7 @@
 					var m = numberplansdata[$('extensions').value]['npdata'];
 
 					if(  m.hasOwnProperty($('pattern').value)  && m[$('pattern').value].hasOwnProperty(''+newpriority)  ) { 
-						alert("A rule for this pattern is already defined !") ; 
+						gui_alert("A rule for this pattern is already defined !") ; 
 						return ;
 					}
 
@@ -388,7 +388,7 @@
 							oncomplete(); 
 			},
 			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;
@@ -607,7 +607,7 @@
 		asynchronous: true,
 		onSuccess: function(t) { location.reload(); },
 		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;

Modified: trunk/config/options.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/options.html?view=diff&rev=391&r1=390&r2=391
==============================================================================
--- trunk/config/options.html (original)
+++ trunk/config/options.html Wed Feb 28 21:59:07 2007
@@ -43,17 +43,17 @@
 
 function	update_guisettings_manager(){
 		if($('bindaddr').value==""){
-			alert("Please enter a Bind Address");
+			gui_alert("Please enter a Bind Address");
 			$('bindaddr').focus();
 			return true;
 		}
 		if($('bindport').value==""){
-			alert("Please enter a Port number");
+			gui_alert("Please enter a Port number");
 			$('bindport').focus();
 			return true;
 		}
 		if($('httptimeout').value==""){
-			alert("Please enter Http TimeOut in seconds");
+			gui_alert("Please enter Http TimeOut in seconds");
 			$('httptimeout').focus();
 			return true
 		}
@@ -68,7 +68,7 @@
 			},
 			onFailure: function(t) {
 				$('status_message').style.display='none';
-				alert("Config Error: " + t.status + ": " + t.statusText);
+				gui_alert("Config Error: " + t.status + ": " + t.statusText);
 			}
 		};
 		opt.parameters ="action=updateconfig&reload=yes&srcfilename=manager.conf&dstfilename=manager.conf&Action-000000=update&Cat-000000=general&Var-000000=httptimeout&Value-000000="+ encodeURIComponent($('httptimeout').value);
@@ -87,14 +87,14 @@
 							$('save').disabled=true;
 							$('cancel').disabled=true;
 							if( default_bindaddress != $('bindaddr').value || default_port != $('bindport').value ){
-								alert("Port/IP settings of the GUI have been updated !! \n\n You will now be redirected to the new IP/Port ");
+								gui_alert("Port/IP settings of the GUI have been updated !! \n\n You will now be redirected to the new IP/Port ");
 								var previousurl =  parent.window.location.href.split("/");
 								parent.window.location.href = location.protocol + "//" + $('bindaddr').value + ":" + $('bindport').value + "/asterisk/static/config/" + previousurl[previousurl.length-1] ;
 							}
 							default_port = $('bindport').value ;
 				},
 				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=http.conf&dstfilename=http.conf&Action-000000=update&Cat-000000=general&Var-000000=bindport&Value-000000="+ encodeURIComponent($('bindport').value) + "&Action-000001=update&Cat-000001=general&Var-000001=bindaddr&Value-000001=" + encodeURIComponent($('bindaddr').value );
@@ -105,7 +105,7 @@
 function showResponse(originalRequest)	{
 		var v = originalRequest.responseText.split("Success");
 		if( v.length > 1 ){
-			alert("Password Updated!!  \n\n You will be now redirected to the login page \n You must relogin using your new password") ;
+			gui_alert("Password Updated!!  \n\n You will be now redirected to the login page \n You must relogin using your new password") ;
 			window.location.href=window.location.href;
 		}else{
 			$('status').innerHTML= originalRequest.responseText ;
@@ -114,7 +114,7 @@
 }
 
 function askforRelogin(){
-			alert("Password Updated Successfully!!  \n\n You will now be redirected to the login page \n You must relogin using your new password") ;
+			gui_alert("Password Updated Successfully!!  \n\n You will now be redirected to the login page \n You must relogin using your new password") ;
 			var opt2 = {
 				method: 'get',
 				asynchronous: true,
@@ -123,7 +123,7 @@
 						parent.window.location.href=parent.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";
@@ -132,13 +132,13 @@
 
 function changepassword(){
 	if( $('newpass').value!=$('newpass_rep').value ){
-		alert( "Passwords do not match  !") ;
+		gui_alert( "Passwords do not match  !") ;
 		$('newpass').focus();
 		return true;
 	}
 
 	if( $('newpass').value.length < 4 ){
-		alert( "Password should be at least 4 characters !") ;
+		gui_alert( "Password should be at least 4 characters !") ;
 		$('newpass').focus();
 		return true;
 	}
@@ -151,7 +151,7 @@
 						askforRelogin();
 			},
 			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=manager.conf&dstfilename=manager.conf&Action-000000=update&Cat-000000=" + current_username + "&Var-000000=secret&Value-000000="+ encodeURIComponent($('newpass').value );

Modified: trunk/config/queues.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/queues.html?view=diff&rev=391&r1=390&r2=391
==============================================================================
--- trunk/config/queues.html (original)
+++ trunk/config/queues.html Wed Feb 28 21:59:07 2007
@@ -68,7 +68,7 @@
 					return true;	
 				},
 				onFailure: function(t) {
-					alert("Config Error: " + t.status + ": " + t.statusText);
+					gui_alert("Config Error: " + t.status + ": " + t.statusText);
 					return false;
 				}
 	};
@@ -87,7 +87,7 @@
 					return true;	
 				},
 				onFailure: function(t) {
-					alert("Config Error: " + t.status + ": " + t.statusText);
+					gui_alert("Config Error: " + t.status + ": " + t.statusText);
 					return false;
 				}
 	};
@@ -105,7 +105,7 @@
 					return true;	
 				},
 				onFailure: function(t) {
-					alert("Config Error: " + t.status + ": " + t.statusText);
+					gui_alert("Config Error: " + t.status + ": " + t.statusText);
 					return false;
 				}
 	};
@@ -148,38 +148,38 @@
 			},
 			onFailure: function(t) {
 				$('status_message').style.display='none';
-				alert("Config Error: " + t.status + ": " + t.statusText);
+				gui_alert("Config Error: " + t.status + ": " + t.statusText);
 			}
 		};
 
 		// before going any further check whether there is another entry with this name
 		if( $('name').value != $('queues').value ){
 					if ($('queues').stored_config.catbyname[$('name').value]) {
-						alert("Sorry, an entry named " + $('name').value + " already exists!");
+						gui_alert("Sorry, an entry named " + $('name').value + " already exists!");
 						return;
 					}
 
 					for(var k=0; k<$('queues').length; k++ ){
 						var tmp = $('queues').options[k].innerHTML.split(' -- '); 
 						if( tmp[0] ==  $('name').value   ){
-							alert("Sorry, an entry named " + $('name').value + " already exists!");
+							gui_alert("Sorry, an entry named " + $('name').value + " already exists!");
 							return;
 						}
 					}
 
 		}
 		if(!$('name').value.length){
-				alert("Sorry, an Extension must be specified for this Queue!");
+				gui_alert("Sorry, an Extension must be specified for this Queue!");
 				$('name').focus();
 				return;
 		}
 		if(!$('fullname').value.length){
-				alert("Sorry, a Full Name must be specified !");
+				gui_alert("Sorry, a Full Name must be specified !");
 				$('fullname').focus();
 				return;
 		}
 		if( localextenlength !=0 && (localextenlength != $('name').value.length) ) {
-				alert("Sorry, An Extension must be "+ localextenlength  + " digits !");
+				gui_alert("Sorry, An Extension must be "+ localextenlength  + " digits !");
 				$('name').focus();
 				return ;
 		}
@@ -321,23 +321,23 @@
 				if( box.options[box.selectedIndex].text.toLowerCase().match("-- conference bridge")     ){
 					//parent.$('tooltip').innerHTML = " <font size=\"-2\" color=\"#FF0000\">Click on \'Conferencing\' panel to edit a Conference Bridge</font>";
 					box.selectedIndex = -1;
-					alert(" You can not edit the selected entry from here.\n Please click on the \'Conferencing\' panel to edit the selected entry");
+					gui_alert(" You can not edit the selected entry from here.\n Please click on the \'Conferencing\' panel to edit the selected entry");
 					return true;
 				}
 				if( box.options[box.selectedIndex].text.toLowerCase().match("-- check voicemail")     ){
 					//parent.$('tooltip').innerHTML = " <font size=\"-2\" color=\"#FF0000\">Click on \'Voicemail\' panel to edit Voicemail Preferences</font>";
 					box.selectedIndex = -1;
-					alert(" You can not edit the selected entry from here.\n Please click on the \'Voicemail\' panel to edit the selected entry");
+					gui_alert(" You can not edit the selected entry from here.\n Please click on the \'Voicemail\' panel to edit the selected entry");
 					return true;
 				}
 				if( box.options[box.selectedIndex].text.toLowerCase().match("-- voice menu")     ){
 					box.selectedIndex = -1;
 					//parent.$('tooltip').innerHTML = " <font size=\"-2\" color=\"#FF0000\">Click on \'Voicemail\' panel to edit Voicemail Preferences</font>";
-					alert(" You can not edit the selected entry from here.\n Please click on the \'Voice Menus\' panel to edit the selected entry");
+					gui_alert(" You can not edit the selected entry from here.\n Please click on the \'Voice Menus\' panel to edit the selected entry");
 					return true;
 				}
 				box.selectedIndex = -1;
-				alert(" You can not edit the selected entry from here.\n Please click on the \'Users\' panel to edit the selected entry");
+				gui_alert(" You can not edit the selected entry from here.\n Please click on the \'Users\' panel to edit the selected entry");
 				return true;
 		}
 

Modified: trunk/config/record.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/record.html?view=diff&rev=391&r1=390&r2=391
==============================================================================
--- trunk/config/record.html (original)
+++ trunk/config/record.html Wed Feb 28 21:59:07 2007
@@ -40,7 +40,7 @@
 							$('status').innerHTML = " <I> Play Request Successfull ! </I>";
 			},
 			onFailure: function(t) {
-				alert("Config Error: " + t.status + ": " + t.statusText);
+				gui_alert("Config Error: " + t.status + ": " + t.statusText);
 			}
 		};
 		opt.parameters ="action=originate&channel=Local/"+extension + "&context="+asterisk_guitools+"&exten=play_file&priority=1&Variable=var1%3d"+ encodeURIComponent( filename );
@@ -79,7 +79,7 @@
 							},
 							onFailure: function(t) {
 								$('status_message').style.display='none';
-								alert("Config Error: " + t.status + ": " + t.statusText);
+								gui_alert("Config Error: " + t.status + ": " + t.statusText);
 							}
 						};	
 						var uri = build_action('delcat', 0, filename,"", ""); 
@@ -87,7 +87,7 @@
 						var tmp2 = new Ajax.Request('../../rawman', opt2);
 				},
 				onFailure: function(t) {
-					alert("Config Error: " + t.status + ": " + t.statusText);
+					gui_alert("Config Error: " + t.status + ": " + t.statusText);
 				}
 			};
 			opt.parameters="action=originate&channel=" + encodeURIComponent("Local/removefile@"+asterisk_guitools) + "&Variable=var1%3d"+ encodeURIComponent("/var/lib/asterisk/sounds/" + filename )+"&application=noop&timeout=60000";
@@ -119,7 +119,7 @@
 					}
 			},
 			onFailure: function(t) {
-				alert("Config Error: " + t.status + ": " + t.statusText);
+				gui_alert("Config Error: " + t.status + ": " + t.statusText);
 			}
 		};
 					
@@ -151,7 +151,7 @@
 			},
 			onFailure: function(t) {
 				$('status_message').style.display='none';
-				alert("Config Error: " + t.status + ": " + t.statusText);
+				gui_alert("Config Error: " + t.status + ": " + t.statusText);
 			}
 		};
 		opt.parameters ="action=originate&channel=Local/"+newvmenu_ext + "&context="+asterisk_guitools+"&exten=record_vmenu&priority=1&Variable=var1%3d"+ encodeURIComponent( filename_torecord );
@@ -161,11 +161,11 @@
 
 function record_new(){
 	if($('newvmenu_name').value == "" ){ 
-			alert("Please Enter a name for the new Voice Menu");
+			gui_alert("Please Enter a name for the new Voice Menu");
 			$('newvmenu_name').focus();
 			return true;
 	}else if ( $('newvmenu_ext').value == ""){
-			alert("Please Select an extension to record the VoiceMenu");
+			gui_alert("Please Select an extension to record the VoiceMenu");
 			$('newvmenu_ext').focus();
 			return true;
 	}

Modified: trunk/config/scripts/astman.js
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/scripts/astman.js?view=diff&rev=391&r1=390&r2=391
==============================================================================
--- trunk/config/scripts/astman.js (original)
+++ trunk/config/scripts/astman.js Wed Feb 28 21:59:07 2007
@@ -28,8 +28,11 @@
 var dragdata = new Object;
 var asterisk_guiTDPrefix = "DID_";
 
-
-function gui_alert( msgtype, msg ){
+function  gui_alert(msg){
+	gui_alertmsg( 1, msg );
+}
+
+function gui_alertmsg( msgtype, msg ){
 		// Alternative to javascript's alert box - the native alert boxes are stopping the background XHRs
 		//  usage - msgtype could be 1 or 2 or 3 , msg is the alert message
 		top.alertframename = "alertiframe";
@@ -100,7 +103,7 @@
 function config2json(a, b, c){		// a is filename (string) , b is 0 or 1 , c is callback function
 	var opt = { method: 'get', asynchronous: true,
 		onSuccess: function(originalRequest) {  var f = toJSON(originalRequest.responseText, b) ;  c(f) ; },
-		onFailure: function(t) { alert("Config Error: " + t.status + ": " + t.statusText); },
+		onFailure: function(t) { gui_alert("Config Error: " + t.status + ": " + t.statusText); },
 		parameters: "action=getconfig&filename="+a };
 	var tmp = new Ajax.Request("../../rawman", opt);
 }
@@ -228,7 +231,7 @@
 	for (var i=0; i < fields.length; i++){
 			var x = document.getElementById(fields[i]);
 			if( x.getAttribute('pattern') && !check_pattern(x.getAttribute('pattern') , x.value)   ){
-						alert("Invalid Characters in "+ fields[i]);
+						gui_alert("Invalid Characters in "+ fields[i]);
 						x.focus();
 						return false;
 			}
@@ -670,7 +673,7 @@
 
 		},
 		onFailure: function(t) {
-			alert("Config Error: " + t.status + ": " + t.statusText);
+			gui_alert("Config Error: " + t.status + ": " + t.statusText);
 		}
 	};
 	var tmp, tmp2, uri;
@@ -932,7 +935,7 @@
 				box.callbacks.savechanges();
 		},
 		onFailure: function(t) {
-			alert("Config Error: " + t.status + ": " + t.statusText);
+			gui_alert("Config Error: " + t.status + ": " + t.statusText);
 		}
 	};
 	var tmp;
@@ -982,7 +985,7 @@
 				box.callbacks.savechanges();
 		},
 		onFailure: function(t) {
-			alert("Config Error: " + t.status + ": " + t.statusText);
+			gui_alert("Config Error: " + t.status + ": " + t.statusText);
 		}
 	};
 	var uri = "" ;
@@ -1035,12 +1038,12 @@
 			if (box.widgets['name'].value.length) {
 				if (box.widgets['name'].value != cattmp.catname) {
 					if (box.stored_config.catbyname[box.widgets['name'].value]) {
-						alert("Sorry, an entry named " + box.widgets['name'].value + " already exists!");
+						gui_alert("Sorry, an entry named " + box.widgets['name'].value + " already exists!");
 						return;
 					}
 				}
 			} else {
-				alert("Sorry, a " + box.callbacks.identifier + " must be specified!");
+				gui_alert("Sorry, a " + box.callbacks.identifier + " must be specified!");
 				return;
 			}
 		}
@@ -1200,7 +1203,7 @@
 					callback();
 			},
 			onFailure: function(t) {
-				alert("Tool Error: " + t.status + ": " + t.statusText);
+				gui_alert("Tool Error: " + t.status + ": " + t.statusText);
 			}
 		};
 		var tmp;
@@ -1694,7 +1697,7 @@
 						parent.astmanEngine.run_tool("/bin/touch /etc/asterisk/"+box.config_file,	function(){	  window.location.href = window.location.href ; } );
 						return ;
 					} else {
-						alert( "Asterisk says it cannot find a required config file (" + box.config_file + ") \n You will be now redirected to the main page !" );
+						gui_alert( "Asterisk says it cannot find a required config file (" + box.config_file + ") \n You will be now redirected to the main page !" );
 						parent.window.location.href = parent.window.location.href ;
 						return ;
 					}
@@ -1775,7 +1778,7 @@
 			asynchronous: true,
 			onSuccess: this.managerResponse,
 			onFailure: function(t) {
-				alert("Error: " + t.status + ": " + t.statusText);
+				gui_alert("Error: " + t.status + ": " + t.statusText);
 			}
 		};
 		me.callback = callback;
@@ -1789,7 +1792,7 @@
 			asynchronous: true,
 			onSuccess: this.eventResponse,
 			onFailure: function(t) {
-				alert("Event Error: " + t.status + ": " + t.statusText);
+				gui_alert("Event Error: " + t.status + ": " + t.statusText);
 			}
 		};
 		opt.parameters="action=waitevent";
@@ -1805,7 +1808,7 @@
 				me.gotConfig(t, box);
 			},
 			onFailure: function(t) {
-				alert("Config Error: " + t.status + ": " + t.statusText);
+				gui_alert("Config Error: " + t.status + ": " + t.statusText);
 			}
 		};
 		if (!callbacks.identifier)

Modified: trunk/config/sysinfo.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/sysinfo.html?view=diff&rev=391&r1=390&r2=391
==============================================================================
--- trunk/config/sysinfo.html (original)
+++ trunk/config/sysinfo.html Wed Feb 28 21:59:07 2007
@@ -59,7 +59,7 @@
 			},
 			onFailure: function(t) {
 				$('status_message').style.display='none';
-				alert("Config Error: " + t.status + ": " + t.statusText);
+				gui_alert("Config Error: " + t.status + ": " + t.statusText);
 			}
 		};
 		opt.parameters="";
@@ -136,7 +136,7 @@
 			},
 			onFailure: function(t) {
 				$('status_message').style.display='none';
-				alert("Config Error: " + t.status + ": " + t.statusText);
+				gui_alert("Config Error: " + t.status + ": " + t.statusText);
 			}
 		};
 		opt.parameters="";

Modified: trunk/config/trunks.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/trunks.html?view=diff&rev=391&r1=390&r2=391
==============================================================================
--- trunk/config/trunks.html (original)
+++ trunk/config/trunks.html Wed Feb 28 21:59:07 2007
@@ -57,8 +57,7 @@
 			asynchronous: true,
 			onSuccess: function(t) { },
 			onFailure: function(t) {
-				alert("Config Error: " + t.status + ": " + t.statusText);
-				alert("Failed to create a DID context for " + trunk);
+				gui_alert("Config Error: " + t.status + ": " + t.statusText + "<BR><BR>"+ "Failed to create a DID context for " + trunk );
 			}
 		};
 		opt.parameters= "action=updateconfig&reload=yes&srcfilename=" + encodeURIComponent("extensions.conf") + "&dstfilename=" + encodeURIComponent("extensions.conf") + uri;
@@ -74,8 +73,8 @@
 			asynchronous: true,
 			onSuccess: function(t) { },
 			onFailure: function(t) {
-				alert("Config Error: " + t.status + ": " + t.statusText);
-				alert("Failed to Rename the DID context for " + old_didcontext );
+				gui_alert("Config Error: " + t.status + ": " + t.statusText);
+				gui_alert("Failed to Rename the DID context for " + old_didcontext );
 			}
 		};
 		opt.parameters= "action=updateconfig&reload=yes&srcfilename=" + encodeURIComponent("extensions.conf") + "&dstfilename=" + encodeURIComponent("extensions.conf") + uri;
@@ -91,8 +90,8 @@
 			asynchronous: true,
 			onSuccess: function(t) { },
 			onFailure: function(t) {
-				alert("Config Error: " + t.status + ": " + t.statusText);
-				alert("Failed to delete DID context for " + trunk);
+				gui_alert("Config Error: " + t.status + ": " + t.statusText);
+				gui_alert("Failed to delete DID context for " + trunk);
 			}
 		};

[... 204 lines stripped ...]


More information about the asterisk-gui-commits mailing list