pari: branch aadk r962 - in /branches/aadk: ./ config/ config/scripts/ config...

asterisk-gui-commits at lists.digium.com asterisk-gui-commits at lists.digium.com
Mon May 21 07:26:54 MST 2007


Author: pari
Date: Mon May 21 09:26:52 2007
New Revision: 962

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=962
Log:
Merged revisions 904,910,912-916,918-938,941-945,947,949,951-955,961 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
........
r916 | bkruse | 2007-05-10 18:44:51 -0500 (Thu, 10 May 2007) | 1 line

Now, you can use the options page in the gui to make agentlogin and agentcallback login extensions availible.....The only thing left to do is to UPDATE the extension, instead of as it is now, where it just adds another extension if you change the number. I am sure there is a way to do this, pari can help me. Anyways, the basis of it is layed out now.
........
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'
........
r941 | pari | 2007-05-15 20:22:39 -0500 (Tue, 15 May 2007) | 1 line

I forgot what my original plans were - but just realised there is no point in converting an object to string and then back to an object. So - toJSON (which returned a string)  is replaced by toJSO(which returns an object)
........
r942 | pari | 2007-05-15 21:27:34 -0500 (Tue, 15 May 2007) | 1 line

missing event
........
r943 | pari | 2007-05-15 22:58:56 -0500 (Tue, 15 May 2007) | 1 line

options for managing 'Voicemail Emails template'
........
r944 | pari | 2007-05-16 13:48:20 -0500 (Wed, 16 May 2007) | 1 line

blah
........
r945 | bkruse | 2007-05-16 14:07:38 -0500 (Wed, 16 May 2007) | 1 line

I feel bad for having to commit this. Fixed a spelling error by me. Accept is not the same as except, I realize that. Thanks pari
........
r947 | pari | 2007-05-16 15:42:26 -0500 (Wed, 16 May 2007) | 1 line

critical bug in astman.js
........
r949 | pari | 2007-05-16 18:11:03 -0500 (Wed, 16 May 2007) | 1 line

fix for http://bugs.digium.com/view.php?id=9133
........
r951 | pari | 2007-05-16 20:08:11 -0500 (Wed, 16 May 2007) | 1 line

removing Rico from FileEditor
........
r952 | pari | 2007-05-17 10:35:55 -0500 (Thu, 17 May 2007) | 1 line

todo document for the gui project
........
r953 | qwell | 2007-05-17 12:29:36 -0500 (Thu, 17 May 2007) | 4 lines

Add support for update and uninstall targets.

Issue 9732.

........
r954 | pari | 2007-05-17 12:34:28 -0500 (Thu, 17 May 2007) | 1 line

reverting the stupid hack in r570 and handling 0 or more digits the proper way (usin !)
........
r955 | pari | 2007-05-17 12:38:08 -0500 (Thu, 17 May 2007) | 1 line

!(zero or more digits) instead of .(one or more digits)
........
r961 | pari | 2007-05-18 18:10:06 -0500 (Fri, 18 May 2007) | 1 line

moving 'makerequest()' from timerules into astman.js
........

Added:
    branches/aadk/config/emailsettings.html
      - copied unchanged from r961, trunk/config/emailsettings.html
    branches/aadk/config/syslog.html
      - copied unchanged from r961, trunk/config/syslog.html
    branches/aadk/config/timerules.html
      - copied, changed from r904, trunk/config/timerules.html
    branches/aadk/todo.txt
      - copied unchanged from r961, trunk/todo.txt
Modified:
    branches/aadk/   (props changed)
    branches/aadk/config/backup.html
    branches/aadk/config/cfgbasic.html
    branches/aadk/config/cli.html
    branches/aadk/config/feditor.html
    branches/aadk/config/graphs.html
    branches/aadk/config/home.html
    branches/aadk/config/iax.html
    branches/aadk/config/incoming.html
    branches/aadk/config/jabber.html
    branches/aadk/config/jingle.html
    branches/aadk/config/localexts.html
    branches/aadk/config/meetme.html
    branches/aadk/config/menus.html
    branches/aadk/config/moh.html
    branches/aadk/config/numberplan.html
    branches/aadk/config/options.html
    branches/aadk/config/queues.html
    branches/aadk/config/record.html
    branches/aadk/config/scripts/astman.js
    branches/aadk/config/scripts/tooltip.js
    branches/aadk/config/setup/5.html
    branches/aadk/config/sip.html
    branches/aadk/config/status.html
    branches/aadk/config/trunks.html
    branches/aadk/config/users.html
    branches/aadk/config/voicemail.html
    branches/aadk/config/zapata.html

Propchange: branches/aadk/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon May 21 09:26:52 2007
@@ -1,1 +1,1 @@
-/trunk:1-430,433-449,489-501,505-506,508-510,512-540,542-557,559,561-577,580-586,588-616,618-767,769-900,905
+/trunk:1-430,433-449,489-501,505-506,508-510,512-540,542-557,559,561-577,580-586,588-616,618-767,769-961

Modified: branches/aadk/config/backup.html
URL: http://svn.digium.com/view/asterisk-gui/branches/aadk/config/backup.html?view=diff&rev=962&r1=961&r2=962
==============================================================================
--- branches/aadk/config/backup.html (original)
+++ branches/aadk/config/backup.html Mon May 21 09:26:52 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/aadk/config/cfgbasic.html
URL: http://svn.digium.com/view/asterisk-gui/branches/aadk/config/cfgbasic.html?view=diff&rev=962&r1=961&r2=962
==============================================================================
--- branches/aadk/config/cfgbasic.html (original)
+++ branches/aadk/config/cfgbasic.html Mon May 21 09:26:52 2007
@@ -23,24 +23,12 @@
 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";
@@ -49,24 +37,133 @@
 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( ["Networking", "networking.html", "Configures networking parameters."]);
+	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( ["Update", "flashupdate.html", "Update Firmware installed on the appliance."]);
+	newpanel( ["Options", "localexts.html", "Admin Settings"]);
+
+	return panels;
+}
+
+
 function pingevery(a){
 	keepPinging = setInterval( makeping, a*250 );
 }
 
 function makeping(){
-	var tmp;
-	var opt = {
-		method: 'get',
-		parameters: "action=ping",
-		asynchronous: true,
-		onComplete: function(t){
-			if( t.responseText.match(asterisk_guipingerror) ){
-				window.location.href=window.location.href;
-			}
-			
-		}
-	};
-	tmp = new Ajax.Request( asterisk_rawmanPath, opt);
+	makerequest("","","action=ping", function(t){ if( t.match(asterisk_guipingerror) ){ window.location.href=window.location.href;} } );
 }
 
 eventeater.eventcb = function(msgs) {
@@ -75,91 +172,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("networking", "Networking", "accordion-icon.gif",
-		"Configures networking parameters"),
-
-	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("flashupdate", "Update", "accordion-icon.gif", "Update Firmware installed on the appliance"),
-
-	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) {
@@ -167,71 +194,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; }
@@ -243,85 +224,133 @@
 }
 
 function Logoff_2() {
-	var opt2 = {
-		method: 'get',
-		asynchronous: true,
-		onSuccess: function() {	 
-			setLoggedOn(0);
-			loggedon == -1;
-			// reload the browser URL
-			window.location.href=window.location.href;
-		},
-		onFailure: function(t) {
-			gui_alert("Config Error: " + t.status + ": " + t.statusText);
-		}
-	};
-	opt2.parameters ="action=logoff";
-	var tmp2 = new Ajax.Request(asterisk_rawmanPath , opt2);
+	makerequest("","","action=logoff", function(t){ window.location.href=window.location.href; } );
 }
 
 function system_link(){
 	var newwindow_href = location.protocol + '//' + location.hostname + ':8003';
 	window.open(newwindow_href ,'mainwindow','width=1024,height=768,resizable=yes, scrollbars=no, toolbar=no, location=no,status=yes, menubar=no')
+}
+
+function reloadConfig(){
+	_$('reloadconfig').style.display = 'none'; 
+	window.setTimeout( function(){ _$('reloadconfig').style.display=""; }, asterisk_guifbt );
+
+	var uri = parent.build_action('renamecat', 0, "","", "", "");
+	var r = "action=updateconfig&reload=yes&srcfilename=" + encodeURIComponent("extensions.conf") + "&dstfilename=" + encodeURIComponent("extensions.conf") + uri;
+	makerequest("","",r, function(t){ gui_feedback("Restarted Asterisk !!",'blue'); } );
+}
+
+
+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>&nbsp;|&nbsp; -->
-		<a target='_extern' href="http://www.digium.com/en/company/profile/">About Digium</a>&nbsp;|&nbsp;
-		<a target='_extern' href="http://www.asterisknow.org/bugs">Report a Bug</a>&nbsp;|&nbsp;
-		<a target='_extern' href="http://www.asterisknow.org/help">Help</a>&nbsp;
-		<input type="hidden" id="login_name">
+		<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="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">
+			&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>
 	</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="emailsettings.html">VM Email settings</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/aadk/config/cli.html
URL: http://svn.digium.com/view/asterisk-gui/branches/aadk/config/cli.html?view=diff&rev=962&r1=961&r2=962
==============================================================================
--- branches/aadk/config/cli.html (original)
+++ branches/aadk/config/cli.html Mon May 21 09:26:52 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/aadk/config/feditor.html
URL: http://svn.digium.com/view/asterisk-gui/branches/aadk/config/feditor.html?view=diff&rev=962&r1=961&r2=962
==============================================================================
--- branches/aadk/config/feditor.html (original)
+++ branches/aadk/config/feditor.html Mon May 21 09:26:52 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" />
@@ -79,25 +78,14 @@
 
 function delete_context(){
 	if(!confirm("Are you sure you want to delete the selected context ?")){ return true; }
-
 	var uri = build_action('delcat', 0, global_contextBeingEdited ,"", "");
-	var opt = {
-		method: 'get',
-		asynchronous: true,
-		onSuccess: function() {
+	makerequest('u', global_fileBeingEdited, uri , function(t) {
 			_$('AddContext').style.display = "none";
 			_$('div_editcontext').style.display = "none"; 
 			global_contextBeingEdited = "";
 			gui_feedback('Context Deleted','blue');
 			config2json( global_fileBeingEdited, 0, fileparsed );
-		},
-		onFailure: function(t) {
-			gui_alert("Config Error: " + t.status + ": " + t.statusText);
-			gui_alert("Failed to Rename the DID context for " + old_didcontext );
-		}
-	};
-	opt.parameters= "action=updateconfig&srcfilename=" + encodeURIComponent(global_fileBeingEdited) + "&dstfilename=" + encodeURIComponent(global_fileBeingEdited) + uri;
-	var tmp = new Ajax.Request(asterisk_rawmanPath, opt);
+		});
 }
 
 
@@ -109,23 +97,13 @@
 
 function update_context(){ // rename from global_contextBeingEdited to $('context_edited').value
 	var uri = build_action('renamecat', 0, global_contextBeingEdited ,"", _$('context_edited').value );
-	var opt = {
-		method: 'get',
-		asynchronous: true,
-		onSuccess: function() {
+	makerequest('u',global_fileBeingEdited, uri, function(t) {
 			_$('AddContext').style.display = "none";
 			_$('div_editcontext').style.display = "none"; 
 			global_contextBeingEdited = "";
 			gui_feedback('Context Updated','blue');
 			config2json( global_fileBeingEdited, 0, fileparsed );
-		},
-		onFailure: function(t) {
-			gui_alert("Config Error: " + t.status + ": " + t.statusText);
-			gui_alert("Failed to Rename the DID context for " + old_didcontext );
-		}
-	};
-	opt.parameters= "action=updateconfig&srcfilename=" + encodeURIComponent(global_fileBeingEdited) + "&dstfilename=" + encodeURIComponent(global_fileBeingEdited) + uri;
-	var tmp = new Ajax.Request(asterisk_rawmanPath, opt);
+		});
 }
 
 
@@ -197,34 +175,36 @@
 }
 
 
-function showeditcontext(){
+function showeditcontext(event){
+	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,26 +234,15 @@
 		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 = {
-		method: 'get',
-		asynchronous: true,
-		onSuccess: function() {
+	makerequest('u',global_fileBeingEdited, uri, function(t){
 			_$('div_editcontextContent').style.display = "none"; 
 			global_contextBeingEdited = "";
 			gui_feedback('Context Content Updated','blue');
 			config2json( global_fileBeingEdited, 0, fileparsed );
-		},
-		onFailure: function(t) {
-			gui_alert("Config Error: " + t.status + ": " + t.statusText);
-			gui_alert("Failed to Rename the DID context for " + old_didcontext );
-		}
-	};
-	opt.parameters= "action=updateconfig&srcfilename=" + encodeURIComponent(global_fileBeingEdited) + "&dstfilename=" + encodeURIComponent(global_fileBeingEdited) + uri;
-	var tmp = new Ajax.Request(asterisk_rawmanPath, opt);
-
+	});
 }
 
 
@@ -287,7 +256,7 @@
 
 	//alert(b);
 	var zz = _$('file_output');
-	var c = eval('(' + b + ')');
+	var c = b;
 	var p = "";
 	var rows ;
 
@@ -308,10 +277,10 @@
 			h.style.width = '95%';
 			h.style.fontFamily = "'trebuchet ms',helvetica,sans-serif";
 			h.style.fontSize = '10pt' ;
-			var s_id = "span_" + d;
+			h.style.padding = '2px 2px 3px 3px' ;
 			h.innerHTML = "&nbsp;&nbsp;[" + d + "]";
 			zz.appendChild(h);
-			Rico.Corner.round(h_id, {compact:true});
+			//Rico.Corner.round(h_id, {compact:true});
 			add_event( _$(h_id) , 'click', showeditcontext );
 
 			var i = document.createElement("div");
@@ -323,20 +292,23 @@
 			i.style.marginTop = '5px' ;
 			i.style.width = '95%';
 			i.style.fontSize = '9pt' ;
+			i.style.padding = '2px 2px 3px 3px' ;
 			i.style.fontFamily = 'courier' ;
 
 			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 ;

[... 3451 lines stripped ...]


More information about the asterisk-gui-commits mailing list