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

asterisk-gui-commits at lists.digium.com asterisk-gui-commits at lists.digium.com
Tue May 15 14:58:27 MST 2007


Author: pari
Date: Tue May 15 16:58:27 2007
New Revision: 939

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=939
Log:
Merged revisions 904,910,912-915,918-938 via svnmerge from 
https://origsvn.digium.com/svn/asterisk-gui/trunk

........
r904 | pari | 2007-05-09 19:25:04 -0500 (Wed, 09 May 2007) | 1 line

** NOT COMPLETE *** Initial attempt at Time Based Routing ** NOT COMPLETE ** 
........
r910 | pari | 2007-05-10 14:55:23 -0500 (Thu, 10 May 2007) | 1 line

Add,Edit,Update TimeBasedRules
........
r912 | pari | 2007-05-10 16:10:52 -0500 (Thu, 10 May 2007) | 1 line

VoiceMenus - forward to a 'Time Based Rule'
........
r913 | pari | 2007-05-10 17:10:44 -0500 (Thu, 10 May 2007) | 1 line

Fixes for IE in file editor
........
r914 | pari | 2007-05-10 17:21:20 -0500 (Thu, 10 May 2007) | 1 line

one of the 'can not believe I did that' bugs
........
r915 | pari | 2007-05-10 18:19:33 -0500 (Thu, 10 May 2007) | 1 line

adding option to 'goto the default Directory' in IVR
........
r918 | pari | 2007-05-14 11:37:40 -0500 (Mon, 14 May 2007) | 1 line

Cleanup for bkruse's AgentLogin and AgentCallbackLogin stuff
........
r919 | pari | 2007-05-14 12:04:55 -0500 (Mon, 14 May 2007) | 1 line

show time rules in advanced mode
........
r920 | pari | 2007-05-14 13:19:12 -0500 (Mon, 14 May 2007) | 1 line

Trying to get rid of Rico (as discussed on the GUI mailing list last week) - some more commits to follow
........
r921 | pari | 2007-05-14 17:24:36 -0500 (Mon, 14 May 2007) | 8 lines

Moved Advanced options from the main panel to a select box 
in the top page (cfgbasic.html). This gives us room
to add a lot more advanced options in the GUI.

Also this way - we are not reloading the whole GUI while
toggling between advanced and basic options.


........
r922 | pari | 2007-05-14 17:32:32 -0500 (Mon, 14 May 2007) | 1 line

minor fixes to the previous commit
........
r923 | pari | 2007-05-14 18:06:42 -0500 (Mon, 14 May 2007) | 4 lines

Moved Asterisk Logs info from System Info to advanced menu



........
r924 | pari | 2007-05-14 18:43:11 -0500 (Mon, 14 May 2007) | 1 line

ReEnabling the 'Tool tips for the panel items lost during r920'
........
r925 | pari | 2007-05-14 18:58:42 -0500 (Mon, 14 May 2007) | 1 line

creating more room for displaying log messages
........
r926 | pari | 2007-05-14 19:15:26 -0500 (Mon, 14 May 2007) | 1 line

ReEnabling the 'Onmouseover colorChange for the panel items lost during r920'
........
r927 | pari | 2007-05-14 22:23:43 -0500 (Mon, 14 May 2007) | 1 line

Checking required fields for Time Rules
........
r928 | pari | 2007-05-14 22:36:48 -0500 (Mon, 14 May 2007) | 1 line

message when no time rules are found
........
r929 | pari | 2007-05-15 10:21:13 -0500 (Tue, 15 May 2007) | 1 line

'return true' if all required values are found 
........
r930 | pari | 2007-05-15 12:30:10 -0500 (Tue, 15 May 2007) | 1 line

Made some changes to incoming rules so that it would be easy to add other forwarding options
........
r931 | pari | 2007-05-15 12:47:18 -0500 (Tue, 15 May 2007) | 1 line

Routing incoming calls to TimeBasedRules :-)
........
r932 | pari | 2007-05-15 13:29:33 -0500 (Tue, 15 May 2007) | 1 line

Incoming calls can be forwarded to VoiceMenus
........
r933 | pari | 2007-05-15 14:20:50 -0500 (Tue, 15 May 2007) | 1 line

users.html without Rico
........
r934 | pari | 2007-05-15 14:50:40 -0500 (Tue, 15 May 2007) | 1 line

MeetMe page without Rico
........
r935 | pari | 2007-05-15 15:34:56 -0500 (Tue, 15 May 2007) | 1 line

VoiceMail page without Rico
........
r936 | pari | 2007-05-15 16:09:56 -0500 (Tue, 15 May 2007) | 1 line

queues without rico
........
r937 | pari | 2007-05-15 16:24:49 -0500 (Tue, 15 May 2007) | 1 line

removing rico.js
........
r938 | pari | 2007-05-15 16:52:06 -0500 (Tue, 15 May 2007) | 1 line

removing reference to nonexisting element -> 'advancedw'
........

Added:
    branches/asterisknow/config/syslog.html
      - copied unchanged from r938, trunk/config/syslog.html
    branches/asterisknow/config/timerules.html
      - copied, changed from r904, trunk/config/timerules.html
Modified:
    branches/asterisknow/   (props changed)
    branches/asterisknow/config/backup.html
    branches/asterisknow/config/cfgbasic.html
    branches/asterisknow/config/cli.html
    branches/asterisknow/config/feditor.html
    branches/asterisknow/config/graphs.html
    branches/asterisknow/config/home.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/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/sip.html
    branches/asterisknow/config/status.html
    branches/asterisknow/config/sysinfo.html
    branches/asterisknow/config/trunks.html
    branches/asterisknow/config/voicemail.html
    branches/asterisknow/config/zapata.html

Propchange: branches/asterisknow/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue May 15 16:58:27 2007
@@ -1,1 +1,1 @@
-/trunk:1-449,489-540,542-557,559,561-577,580-586,588-899,905,916
+/trunk:1-449,489-540,542-557,559,561-577,580-586,588-938

Modified: branches/asterisknow/config/backup.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/backup.html?view=diff&rev=939&r1=938&r2=939
==============================================================================
--- branches/asterisknow/config/backup.html (original)
+++ branches/asterisknow/config/backup.html Tue May 15 16:58:27 2007
@@ -20,7 +20,6 @@
  *
 -->
 <script src="scripts/prototype.js"></script>
-<script src="scripts/rico.js"></script>
 <script src="scripts/astman.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" />

Modified: branches/asterisknow/config/cfgbasic.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/cfgbasic.html?view=diff&rev=939&r1=938&r2=939
==============================================================================
--- branches/asterisknow/config/cfgbasic.html (original)
+++ branches/asterisknow/config/cfgbasic.html Tue May 15 16:58:27 2007
@@ -23,30 +23,138 @@
 var browser_alert = "You owe it to yourself to try it out !<BR><A href='http://www.getfirefox.com' style='font-size: 13px; font-family:arial,sans-serif,Helvetica,Trebuchet MS; color : #6C74A3;' target='_blank'>Get Firefox</A>";
 </script>
 <script src="scripts/prototype.js"></script>
-<script src="scripts/rico.js"></script>
 <script src="scripts/astman.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>
-PanelDef = Class.create();
-PanelDef.prototype = {
-	initialize: function(name, label, icon, content) {
-		this.name = name;
-		this.label = label;
-		this.icon = icon;
-		this.content = content;
-	}
-}
-var panels = new Array;
 var eventeater = new Object;
 var loggedon = -1;
-var started = 0;
 var accordion;
 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.pingstatus = false;
 var keepPinging;
+
+function createpanels(){
+	var t,u,v;
+	var a = _$('configpanel');
+	var pnameheight = 22;
+	var panels = returnpanels();
+	var pheight = (503  - (pnameheight*panels.length) ) ;
+	a.pheight = pheight;
+	var this_id ;
+	for( var r=0; r < panels.length; r++ ){
+		this_id = panels[r].page.split(".html")[0];
+
+		t = document.createElement("div");
+		t.className = "accordionTabTitleBar";
+		t.style.backgroundColor = "#6B79A5";
+		t.style.color = "#CED7EF";
+		t.style.fontWeight = "normal";
+		t.style.display = "none";
+		t.setAttribute('id', this_id );
+		t.height = pnameheight;
+		t.innerHTML = "<nobr><img style='vertical-align: middle;' src='images/accordion-icon.gif'><span style='margin-left: 0px; font-weight: bold;'>&nbsp;" + panels[r].caption + "</span></nobr>";
+
+		add_event(t, 'click', fghjhhs);
+		add_event(t, 'mouseover', my_tooltip);
+		add_event(t, 'mouseout', default_tooltip);
+
+		u = document.createElement("div");
+		u.className = "accordionTabContentBox";
+
+		u.style.borderStyle = "solid";
+		u.style.borderColor = "#1F669B";
+		u.style.borderWidth = "0px 1px";
+		u.style.margin = "0px";
+		u.style.overflow = "hidden";
+		u.style.backgroundImage = "url(images/panel.png)";
+		u.style.height = "1px";
+		u.style.display = "none";
+		u.setAttribute('id', this_id+"_U" );
+		u.innerHTML =panels[r].desc; 
+
+		a.appendChild(t);
+		a.appendChild(u);
+	}
+
+	_$( "home" ).style.display = "";
+	_$( "home_U" ).style.display = "";
+	_$( "home_U" ).style.height = a.pheight +"px";
+}
+
+function my_tooltip(event){
+	var s = (event.srcElement)?event.srcElement:this;
+
+	_$(s.id).style.backgroundColor="#63699C";
+	_$(s.id).style.color="#FFFFFF";
+	_$(s.id).style.fontWeight="bold";
+
+	show_Acctooltip(_$(s.id+"_U").innerHTML );
+}
+
+function default_tooltip(event){
+	var s = (event.srcElement)?event.srcElement:this;
+
+	_$(s.id).style.backgroundColor="#6B79A5";
+	_$(s.id).style.color="#CED7EF";
+	_$(s.id).style.fontWeight="normal";
+
+	show_Acctooltip("Move the mouse over to a field to see tooltips");
+}
+
+function fghjhhs(event){
+	var s = (event.srcElement)?event.srcElement:this;
+	if(event.srcElement && s.id==""){s = event.srcElement.parentNode.parentNode;}
+
+	if( $('mainscreen').currentpage == s.id + ".html")return;
+	var t;
+	var panels = returnpanels();
+	for( var r=0; r < panels.length; r++ ){
+		t = panels[r].page.split(".html")[0];
+		_$( t + "_U" ).style.height = "1px";
+		_$( t + "_U" ).style.display = "none";
+	}
+	_$( s.id + "_U" ).style.height = _$('configpanel').pheight + "px";
+	_$( s.id + "_U" ).style.display = "";
+
+	_$('AdvancedOptionsSelect').selectedIndex=-1;
+	_$('mainscreen').style.display = "none";
+	_$('mainscreen').src = s.id + ".html";
+	_$('mainscreen').currentpage = s.id + ".html";
+}
+
+function returnpanels(){
+	var panels = [];
+
+	var newpanel = function(s){
+		var r = {};
+		r.caption = s[0];
+		r.page = s[1];
+		r.desc = s[2];
+		panels.push(r);
+	}
+
+	newpanel( ["Home", "home.html", "Asterisk Configuration Panel - Please click on a panel to manage related features"]);
+	newpanel( ["Users", "users.html", "Users is a short cut for quickly adding and removing all the necessary configuration components for any new phone."]);
+	newpanel( ["Conferencing", "meetme.html", "MeetMe conference bridging allow quick, ad-hoc conferences with or without security."]);
+	newpanel( ["Voicemail", "voicemail.html", "General settings for voicemail"]);
+	newpanel( ["Call Queues", "queues.html", "Call queues allow calls to be sequenced to one or more agents."]);
+	newpanel( ["Service Providers", "trunks.html", "Service Providers are outbound lines used to allow the system to make calls to the real world.  Trunks can be VoIP lines or traditional telephony lines."]);
+	newpanel( ["Calling Rules", "numberplan.html", "The Calling Rules define dialing permissions and least cost routing rules."]);
+	newpanel( ["Incoming Calls", "incoming.html", "Define how your incoming calls should be handled & configure DID (Direct inward Dialing)"]);
+	newpanel( ["Voice Menus", "menus.html", "Menus allow for more efficient routing of calls from incoming callers. Also known as IVR (Interactive Voice Response) menus or Digital Receptionist"]);
+	newpanel( ["Record a Menu", "record.html", "Allows you to record custom voicemenus over a phone"]);
+	newpanel( ["Active Channels", "status.html", "Monitor active channels."]);
+	newpanel( ["Graphs", "graphs.html", "View Graphs of your System Information."]);
+	newpanel( ["System Info", "sysinfo.html", "System Information."]);
+	newpanel( ["Backup", "backup.html", "Backup Management."]);
+	newpanel( ["Options", "localexts.html", "Admin Settings"]);
+
+	return panels;
+}
+
 
 function pingevery(a){
 	keepPinging = setInterval( makeping, a*250 );
@@ -74,86 +182,21 @@
 	}
 }
 
-
-panels.push( 
-
-	new PanelDef("home", "Home", "home.png",
-		"Asterisk Configuration Panel - Please click on a panel to manage related features"),
-
-	new PanelDef("users", "Users", "accordion-icon.gif",
-		"Users is a short cut for quickly adding and removing all the necessary " +
-		"configuration components for any new phone."),
-
-	new PanelDef("meetme", "Conferencing", "accordion-icon.gif",
-		"MeetMe conference bridging allow quick, ad-hoc conferences with or without " +
-		"security."),
-
-	new PanelDef("voicemail", "Voicemail", "accordion-icon.gif",
-		"General settings for voicemail"),
-
-	new PanelDef("queues", "Call Queues", "accordion-icon.gif",
-		"Call queues allow calls to be sequenced to one or more agents."),
-
-	new PanelDef("trunks", "Service Providers", "accordion-icon.gif",
-		"Service Providers are outbound lines used to allow the system to make calls to the " +
-		"real world.  Trunks can be VoIP lines or traditional telephony lines."),
-
-	new PanelDef("numberplan", "Calling Rules", "accordion-icon.gif",
-		"The Calling Rules define dialing permissions and least cost routing rules."),
-
-	new PanelDef("incoming", "Incoming Calls", "accordion-icon.gif",
-		"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. 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("status", "Active Channels", "accordion-icon.gif", "Monitor active channels."),
-
-	new PanelDef("graphs", "Graphs", "accordion-icon.gif", "View Graphs of your System Information."),
-
-	new PanelDef("sysinfo", "System Info", "accordion-icon.gif", "System Information."),
-
-	new PanelDef("backup", "Backup", "accordion-icon.gif", "Backup Management."),
-
-	new PanelDef("localexts", "Options", "accordion-icon.gif", "Admin Settings")
-
-);
-
-// show additional panels for advanced mode
-if(window.location.href.match("advanced=yes") ){
-panels.splice(10,0,
-
-	new PanelDef("feditor", "File Editor", "accordion-icon.gif", " Manually edit Config Files"),
-
-	new PanelDef("cli", "Asterisk CLI", "accordion-icon.gif", " Asterisk Command Line Interface"),
-
-	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")
-	);
-}
-
-
 function setLoggedOn(onoff) {
-	loggedon = onoff;
-	for (var i = 0; i < panels.length; i++) {
-		if (panels[i].name == 'home'){continue;}
-		var w = _$(panels[i].name); 
-		w.onClick = (loggedon == 1)?w.realonclick: false;
-		w.onMouseOver = (loggedon == 1)?w.realonmouseover:false;
-		w.style.visibility = (loggedon == 1)?'inherit':'hidden';
-	}
+	if(!onoff){return;}
+	loggedon = 1;
+	var panels = returnpanels();
+	var pnameheight = 22;
+	var pheight = (503  - (pnameheight*panels.length) ) ;
+	for( var r=0; r < panels.length; r++ ){
+		t = panels[r].page.split(".html")[0];
+		_$( t + "_U" ).style.height = "1px";
+		_$( t + "_U" ).style.display = "none";
+		_$( t ).style.display = "";
+	}
+	_$("home").style.display = "";
+	_$("home_U").style.height = _$('configpanel').pheight + "px";
+	_$("home_U").style.display = "";
 }
 
 function loadscreen(srcbody) {
@@ -161,71 +204,25 @@
 }
 
 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";
-				}
-			}
-		};
-		opt.parameters="action=ping" ;
-		var tmp = new Ajax.Request(asterisk_rawmanPath , opt);
-		//$('mainscreen').src = page.titleBar.id + ".html";
-	}
-}
-
-function fademainscreen(page, newpage) {
-	// Confirm Discard Changes goes here 
-	_$('tooltip').innerHTML = tooltip_default;
-	_$('mainscreen').style.display = "none";
-}
-
-function show_Acctooltip(name, tip){
+
+
+function show_Acctooltip(tip){
 	if( loggedon != 1){ return; }
 	_$('tooltip').innerHTML = tip ;
 
 }
 
 function registerajax() {
+	pao();
 	astmanEngine = new Astman();
-	astmanEngine.setURL(asterisk_rawmanPath);
-
+	astmanEngine.setURL(asterisk_rawmanPath );
+
+	createpanels();
 	_$('mainscreen').src = "home.html" ;
-	Rico.Corner.round('tooltip_round', {compact:true});
-		// if you want google style feedback boxes :-)
-		// _$('feedback_round').style.backgroundColor = "#EFEFEF";		 
-		// Rico.Corner.round('feedback_round', {compact:true}); 
-		 
 	if( navigator.userAgent.indexOf("MSIE") != -1 || navigator.userAgent.indexOf("Konqueror") != -1 || navigator.userAgent.indexOf("Safari") != -1 ){
 		gui_feedback(browser_alert, 'green');
 	}
-	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'){
-			w.style.height =  "19px";
-			continue;
-		}
-		w.realonclick = w.onClick;
-		w.realonmouseover = w.onMouseOver;
-	}
-	started = 1;
-}
-
-
-//astmanEngine.setEventCallback(eventeater.eventcb);
+}
 
 function Logoff() {
 	if(!confirm("Are you sure ?")){ return true; }
@@ -233,9 +230,6 @@
 		method: 'get',
 		asynchronous: true,
 		onSuccess: function() {	 
-			setLoggedOn(0);
-			loggedon == -1;
-			// reload the browser URL
 			window.location.href=window.location.href;
 		},
 		onFailure: function(t) {
@@ -264,65 +258,117 @@
 	opt.parameters="action=updateconfig&reload=yes&srcfilename=" + encodeURIComponent("extensions.conf") + "&dstfilename=" + encodeURIComponent("extensions.conf") + uri;
 	var tmp = new Ajax.Request(asterisk_rawmanPath , opt);
 }
+
+
+function pao(){
+	var acb = _$('dimg');
+	var tmp_left = acb.offsetLeft -1;
+	var tmp_top = acb.offsetTop -1 ;
+	var tmp_parent = acb;
+	while(tmp_parent.offsetParent != document.body){
+		tmp_parent = tmp_parent.offsetParent;
+		tmp_left += tmp_parent.offsetLeft;
+	}
+	_$('AdvancedOptions').style.left = tmp_left + 700 ;
+	_$('AdvancedOptions').style.top = 1 ;
+	_$('AdvancedOptionsSelect').selectedIndex=-1;
+}
+
+function hide_advops(){
+	_$('AdvancedOptions').style.display='none';
+
+	if ( _$('mainscreen').contentWindow.flipadvbasic  ){
+		_$('mainscreen').contentWindow.flipadvbasic();
+	}
+
+}
+
+function goto_advancedoption(){ 
+	_$('mainscreen').style.display = "none";
+	if( _$('AdvancedOptionsSelect').value == 'TOSETUP'){top.window.location.href = "./setup/install.html"; return;}
+
+	var t;
+	var panels = returnpanels();
+	for( var r=0; r < panels.length; r++ ){
+		t = panels[r].page.split(".html")[0];
+		_$( t + "_U" ).style.height = "1px";
+		_$( t + "_U" ).style.display = "none";
+	}
+	_$( "localexts_U" ).style.height = _$('configpanel').pheight + "px";
+	_$( "localexts_U" ).style.display = "";
+
+	_$('mainscreen').src = _$('AdvancedOptionsSelect').value ;
+}
 </script>
 <head>
 	<title>Asterisk Configuration GUI (Beta)</title>
 	<link rel="shortcut icon" href="images/favicon.ico" />
 </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='middle' align='center' bgcolor='white'>
-		<div id="feedback_round" style="display:none;background-color: #FFFFFF; width:400px">
-			<div id='feedback' style="font-family: Arial, sans-serif, Helvetica, Trebuchet MS ;font-size: 13px;font-weight : bold;"></div>
+<body onload="registerajax()" topmargin=1>
+<table align="center" bgcolor="#dddddd" border="0" cellpadding="0" cellspacing="0" height="570" width="950">
+<tbody>
+	<tr height="47">
+		<td align="right" bgcolor="white" height="47" valign="bottom" id="dimg"><img src="images/digiumlogo.gif" align="left"></td>
+		<td align="center" bgcolor="white" valign="middle">
+		<div id="feedback_round" style="background-color: #FFFFFF; width: 400px; display: none;">
+			<div id="feedback" style="font-family: Arial,sans-serif,Helvetica,Trebuchet MS; font-size: 13px; font-weight: bold;"></div>
 		</div>
 
 	</td>
-	<td valign='bottom' align='right' bgcolor='white'>
+	<td align="right" bgcolor="white" valign="bottom">
 		<a href="#" onclick=" system_link()">System Configuration</a><BR>
-		<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">
+		<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 id="login_name" type="hidden">
 	</td>
 </tr>
-<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>
+<tr>	<td height="505">
+		<div id="configpanel" style="border-bottom: 1px solid rgb(31, 102, 155); width: 150px; height: 505px;"></div>
+	</td>
+	<td id="screenholder" bgcolor="#efefef" height="505" valign="top" width="550">
+		<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" id="mainscreen" style="position:absolute;top:48px;" SCROLLING=no></iframe>
-	</td>
-	<td valign=top width=250 height="505">
-		<div class="mainscreenTooltipBar" align=right>
-		<span id="reloadconfig" style="display:none"></span>&nbsp;&nbsp;&nbsp;<span id="logoutlink" style="display:none"></span>&nbsp;
+		<iframe border="0" marginheight="0" marginwidth="0" id="mainscreen" style="position: absolute; top: 48px;" frameborder="0" height="505" scrolling="no" width="540"></iframe>
+	</td>
+	<td height="505" valign="top" width="250">
+		<div class="mainscreenTooltipBar" align="right">
+			<span id="reloadconfig" style="display:none">Activate Changes</span>&nbsp;&nbsp;&nbsp;<span id="logoutlink" style="display:none">Logout</span>&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>
+		<div style="padding-top: 0pt; padding-bottom: 0pt;" id="tooltip_round" class="tooltip_round"><div style="background-color: rgb(221, 221, 221);"><span style="border-style: solid; border-color: rgb(206, 206, 206); border-width: 0px 1px; overflow: hidden; background-color: rgb(191, 191, 191); display: block; height: 1px; font-size: 1px; margin-left: 1px; margin-right: 1px;"></span><span style="border-style: solid; border-color: rgb(206, 206, 206); border-width: 0px 1px; overflow: hidden; background-color: rgb(191, 191, 191); display: block; height: 1px; font-size: 1px; margin-left: 0px; margin-right: 0px;"></span></div>
+		<div id="tooltip" style="margin-left: 4px; font-family: Trebuchet MS,Arial,Helvetica,sans-serif; font-size: 11px;">Move the mouse over to a field to see tooltips</div>
+		<div style="background-color: rgb(221, 221, 221);"><span style="border-style: solid; border-color: rgb(206, 206, 206); border-width: 0px 1px; overflow: hidden; background-color: rgb(191, 191, 191); display: block; height: 1px; font-size: 1px; margin-left: 0px; margin-right: 0px;"></span><span style="border-style: solid; border-color: rgb(206, 206, 206); border-width: 0px 1px; overflow: hidden; background-color: rgb(191, 191, 191); display: block; height: 1px; font-size: 1px; margin-left: 1px; margin-right: 1px;"></span></div></div>
 		<center> <div id="buynow_div" style="margin-top:300px; margin-left:4px;margin-right:4px;" align="center"></div>	</center>
 	</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>
+<tr><td colspan="3" align="center" height="18">
+		<div id="status" class="statusbar">Copyright 2006-2007 Digium, Inc.  Digium and Asterisk 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>
 		</td>
 </tr>
-</table>
-</body>
+</tbody></table>
+<div id="AdvancedOptions" style="display:none; position:absolute; z-index:1004; width:220px; background-color : #EFEFEF; padding : 2px 2px 4px 2px;">
+	<table cellpadding=1 cellspacing=0 border=0 width=220>
+		<tr>	<td align=right>Goto:&nbsp;</td>
+			<td align="center">
+			<select id="AdvancedOptionsSelect" class="input9" onchange="goto_advancedoption()">
+				<option value="feditor.html">File Editor</option>
+				<option value="cli.html">Asterisk CLI</option>
+				<option value="moh.html">Music on Hold</option>
+				<option value="timerules.html">Time Based Rules</option>
+				<option value="sip.html">Global SIP Settings</option>
+				<option value="iax.html">Global IAX Settings</option>
+			<!--	<option value="jabber.html">Jabber</option>
+				<option value="jingle.html">Jingle</option>
+				<option value="zapata.html">Zap Channel</option>	-->
+				<option value="syslog.html">Asterisk Logs</option>
+				<option value="options.html">Change Password</option>
+				<option value="TOSETUP">Setup Wizard</option>
+			</select>
+			</td>
+			<td align="right" valign="top"><span style="color: #909090; font-size: 8pt;cursor:pointer;" onclick="hide_advops();">X</span></td>
+		</tr>
+	</table>
+</div>
+</body>

Modified: branches/asterisknow/config/cli.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/cli.html?view=diff&rev=939&r1=938&r2=939
==============================================================================
--- branches/asterisknow/config/cli.html (original)
+++ branches/asterisknow/config/cli.html Tue May 15 16:58:27 2007
@@ -19,7 +19,6 @@
  *
 -->
 <script src="scripts/prototype.js"></script>
-<script src="scripts/rico.js"></script>
 <script src="scripts/astman.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" />

Modified: branches/asterisknow/config/feditor.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/feditor.html?view=diff&rev=939&r1=938&r2=939
==============================================================================
--- branches/asterisknow/config/feditor.html (original)
+++ branches/asterisknow/config/feditor.html Tue May 15 16:58:27 2007
@@ -198,33 +198,35 @@
 
 
 function showeditcontext(){
+	var t = (event.srcElement)?event.srcElement:this;
 	_$('AddContext').style.display = "none";
 	_$('div_editcontextContent').style.display = "none";
 	//move div_editcontext ontop of h_id and display it
-	var h_id = this.getAttribute('id') ;
-	global_contextBeingEdited = this.getAttribute('context');
+	var h_id = t.getAttribute('id') ;
+	global_contextBeingEdited = t.getAttribute('context');
 
 	_$(h_id).insertBefore(_$('div_editcontext'), null );
 	_$('div_editcontext').style.display = "";
 
-	var f = this.getAttribute('context')
+	var f = t.getAttribute('context')
 	_$('context_edited').value = f ;
 	_$('context_edited').size = f.length;
 	_$('context_edited').focus();
 }
 
 
-function showeditcontextContent(){
+function showeditcontextContent(event){
+	var t = (event.srcElement)?event.srcElement:this;
 	_$('AddContext').style.display = "none";
 	_$('div_editcontext').style.display = "none";
-	var i_id = this.getAttribute('id') ;
-	global_contextBeingEdited = this.getAttribute('context');
+	var i_id = t.getAttribute('id') ;
+	global_contextBeingEdited = t.getAttribute('context');
 	
 	_$(i_id).insertBefore(_$('div_editcontextContent'), null );
 	_$('div_editcontextContent').style.display = "";
 	
-	_$('context_Content').value = this.CONTEXTCONTENT ;
-	_$('context_Content').rows = this.CONTEXTCONTENT_ROWS ;
+	_$('context_Content').value = t.CONTEXTCONTENT ;
+	_$('context_Content').rows = t.CONTEXTCONTENT_ROWS ;
 	//_$('context_edited').size = f.length;
 	_$('context_Content').focus();
 }
@@ -254,7 +256,7 @@
 		if( posofeq == -1){ continue; }
 		firstpart = u[f].substring(0, posofeq );
 		secondpart = u[f].substring( posofeq+1 );
-		uri += build_action('update', c, global_contextBeingEdited, firstpart, secondpart ); c++;
+		uri += build_action('append', c, global_contextBeingEdited, firstpart, secondpart ); c++;
 	}
 
 	var opt = {
@@ -327,12 +329,14 @@
 
 			var temp_contextContent = "" ;
 			rows = 0;
+			if(c[d].length == 0){i.innerHTML += "&nbsp;&nbsp;<BR>" ;}
 			for(var r=0; r < c[d].length ; r++ ){
 				p = unescape( c[d][r] );
 				i.innerHTML += "&nbsp;&nbsp;" + p + "<BR>" ;
 				temp_contextContent += p + "\n";
 				rows++;
 			}
+			
 			i.CONTEXTCONTENT = temp_contextContent ;
 			i.CONTEXTCONTENT_ROWS = rows ;
 			zz.appendChild(i);

Modified: branches/asterisknow/config/graphs.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/graphs.html?view=diff&rev=939&r1=938&r2=939
==============================================================================
--- branches/asterisknow/config/graphs.html (original)
+++ branches/asterisknow/config/graphs.html Tue May 15 16:58:27 2007
@@ -19,7 +19,6 @@
  *
 -->
 <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" />

Modified: branches/asterisknow/config/home.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/home.html?view=diff&rev=939&r1=938&r2=939
==============================================================================
--- branches/asterisknow/config/home.html (original)
+++ branches/asterisknow/config/home.html Tue May 15 16:58:27 2007
@@ -23,7 +23,6 @@
 <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>
-var demo = new Object;
 var localloggedon = -1;
 var asterisk_guitools = parent.asterisk_guitools;
 var asterisk_rawmanPath = parent.asterisk_rawmanPath;
@@ -35,6 +34,33 @@
 	_$('logoff').disabled = (f)?0:1;
 	_$('login').disabled = (f)?1:0;
 	if(!f){ try{ _$('username').focus();}catch(err){ } }
+}
+
+function localinit() {
+	top.document.title = "Asterisk GUI (Beta) -- Home";
+	var tmp;
+	var opt = {
+		method: 'get',
+		parameters: "action=ping",
+		asynchronous: true,
+		onComplete: function(t){
+			var f = t.responseText;
+			if( f.match("Pong")){
+				_$('statusbar').innerHTML = "<img src='images/tick.gif'><i>Connected!</i>";
+				loggedOn();
+				parent.loadscreen(this);
+				return;
+			}
+			if( f.match(parent.asterisk_guipingerror)){
+				_$('statusbar').innerHTML = "<i>Please login...</i>";
+				loggedOff();
+				parent.loadscreen(this);
+				_$('username').focus();
+				return;
+			}
+		}
+	};
+	tmp = new Ajax.Request( asterisk_rawmanPath, opt);
 }
 
 function loggedOn() {
@@ -82,19 +108,34 @@
 	if ((parent.loggedon == 0) && (localloggedon == 0))
 		return;
 	parent.setLoggedOn(0);
+	parent.loggedon = 0;
 	parent.document.getElementById('logoutlink').innerHTML = "&nbsp;";
 	localloggedon = 0;
-	_$('username').className  = "input9";
-	_$('secret').className  = "input9";
-	updateButtons();
-}
-
-demo.logoffs = function(msgs) {
-	_$('statusbar').innerHTML = msgs[0].headers['message'];
-	loggedOff();
-};
-
-demo.logins = function(msgs) {
+	_$('username').disabled = 0;
+	_$('secret').disabled = 0;
+	_$('logoff').disabled = 1;
+	_$('login').disabled = 0;
+}
+
+
+function doLogin() {
+	if( _$('username').value == "" ){
+		parent.gui_feedback("Please enter a Username");
+		_$('username').focus();
+		return true;			
+	}
+
+	if( _$('secret').value == "" ){
+		parent.gui_feedback("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, afterlogin);
+}
+
+afterlogin = function(msgs) {
 	_$('statusbar').innerHTML = msgs[0].headers['message'];
 	if ( msgs[0].headers['response'] == "Success" ){
 		parent.gui_feedback("Login Successful",'blue',6000);
@@ -111,47 +152,9 @@
 	}
 };
 
-demo.pongs  = function(msgs) {
-	resp = msgs[0].headers['response'];
-	if (resp == "Pong") {
-		_$('statusbar').innerHTML = "<i>Already connected...</i>";
-		loggedOn();
-		parent.loadscreen(this);
-	} else {
-		_$('statusbar').innerHTML = "<i>Please login...</i>";
-		loggedOff();
-		parent.loadscreen(this);
-	}
-}
-
-function doLogin() {
-	if( _$('username').value == "" ){
-		parent.gui_feedback("Please enter a Username");
-		_$('username').focus();
-		return true;			
-	}
-
-	if( _$('secret').value == "" ){
-		parent.gui_feedback("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() {
 	parent.Logoff();
-}
-
-function localajaminit() {	
-	parent.astmanEngine.sendRequest('action=ping', demo.pongs);
-}
-
-function localinit() {
-	top.document.title = "Asterisk GUI (Beta) -- Home";
-	localajaminit();
 }
 
 function submitOnEnter(e){ 
@@ -200,10 +203,10 @@
 		<table align="center">
 		<tr>	<td colspan="2"><h2>Asterisk&trade; Configuration Engine</h2></td>
 		<tr>	<td>Username:</td>
-			<td><input disabled=1 id="username"  class="input9" size=12></td>
+			<td><input id="username"  class="input9" size=12></td>
 		</tr>
 		<tr>	<td>Password:</td>
-			<td><input disabled=1 type="password" id="secret" class="input9" size=12 onKeyPress="submitOnEnter(event)"></td>
+			<td><input type="password" id="secret" class="input9" size=12 onKeyPress="submitOnEnter(event)"></td>
 		</tr>
 		<tr>	<td colspan=2 align="center">
 			<div id="statusbar">
@@ -212,7 +215,7 @@
 			</td>
 		</tr>
 		<tr>	<td align='center' colspan='2'>
-				<input type="submit" id="login" value="Login" disabled=1 onClick="doLogin()" class="input">
+				<input type="submit" id="login" value="Login" onClick="doLogin()" class="input">
 				&nbsp;&nbsp;&nbsp;&nbsp;
 				<input type="submit" id="logoff" value="Logoff" disabled=1 onClick="doLogoff()" class="input">
 			</td>

Modified: branches/asterisknow/config/iax.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/iax.html?view=diff&rev=939&r1=938&r2=939
==============================================================================
--- branches/asterisknow/config/iax.html (original)
+++ branches/asterisknow/config/iax.html Tue May 15 16:58:27 2007
@@ -20,7 +20,6 @@
  *
 -->
 <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" />
@@ -389,4 +388,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:3">
 </div>
-</body>
+</body>

Modified: branches/asterisknow/config/incoming.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/incoming.html?view=diff&rev=939&r1=938&r2=939
==============================================================================
--- branches/asterisknow/config/incoming.html (original)
+++ branches/asterisknow/config/incoming.html Tue May 15 16:58:27 2007
@@ -20,7 +20,6 @@
  *
 -->
 <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" />
@@ -31,8 +30,17 @@
 var didtrunks = new Object;
 var old_incomingrule, old_fromprovider ;
 var editstatus , edit_pattern, edit_DIDtrunk, edit_action, edit_priority ;
-var listOfExtensions = [] ;	// to store all the list of extensions to be displayed in the select menu
-
+
+function add_toext(a,b){ // a is value, b is text

[... 1807 lines stripped ...]


More information about the asterisk-gui-commits mailing list