pari: trunk r459 - in /trunk/config: cfgadvanced.html cfgbasic.html home.html

asterisk-gui-commits at lists.digium.com asterisk-gui-commits at lists.digium.com
Wed Mar 21 08:32:08 MST 2007


Author: pari
Date: Wed Mar 21 10:32:07 2007
New Revision: 459

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=459
Log:
Reload is now called 'Apply Settings' and is moved from home.html to the top header so that it can be accessed from all pages

Modified:
    trunk/config/cfgadvanced.html
    trunk/config/cfgbasic.html
    trunk/config/home.html

Modified: trunk/config/cfgadvanced.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/cfgadvanced.html?view=diff&rev=459&r1=458&r2=459
==============================================================================
--- trunk/config/cfgadvanced.html (original)
+++ trunk/config/cfgadvanced.html Wed Mar 21 10:32:07 2007
@@ -28,188 +28,200 @@
 <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.eventcb = function(msgs) {
-		if (loggedon == 1){
-			astmanEngine.pollEvents();
-		}
-	}
-
-
-	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("moh", "Music On Hold", "accordion-icon.gif", " Music on hold sometimes keeps people less angry while they wait for an answer"),
-
-		new PanelDef("sip", "SIP", "accordion-icon.gif", "SIP (Session Initiation Protocol) Configuration"),
-
-		new PanelDef("iax", "IAX", "accordion-icon.gif", "IAX (Inter-Asterisk eXchange Protocol) Configuration"),
-
-		new PanelDef("jabber", "Jabber", "accordion-icon.gif", "Jabber users configuration"),
-
-		new PanelDef("jingle", "Jingle", "accordion-icon.gif", "Jingle configuration lets users connect to google talk networks"),
-
-		new PanelDef("zapata", "Zap Channel", "accordion-icon.gif", "Zapata telephony interface configuration"),
-		
-		new PanelDef("status", "Active Channels", "accordion-icon.gif", "Monitor active channels."),
-
-		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")
-
-	);
-
-	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)?$(panels[i].name).realonclick: false;
-			w.onMouseOver = (loggedon == 1)?$(panels[i].name).realonmouseover:false;
-			w.style.visibility = (loggedon == 1)?'inherit':'hidden';
-		}
-	}
+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.eventcb = function(msgs) {
+	if (loggedon == 1){
+		astmanEngine.pollEvents();
+	}
+}
+
+
+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("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 loadscreen(srcbody) {
-		_$('mainscreen').style.display = '';
-		if (loggedon == 1){ astmanEngine.pollEvents(); }
-	}
-	
-	function setstatus(status) {	_$('status').innerHTML = copyright + status;	}
-	function showmainscreen(page) {
-		if (started) {
-			var opt = {
-				method: 'get',
-				asynchronous: true,
-				onComplete: function (originalRequest){
-					if ( originalRequest.responseText.match("Error") ) {
-						window.location.href=window.location.href;
-						return ;
-					}
-					if ( originalRequest.responseText.match("Pong") ) {
-							_$('mainscreen').src = page.titleBar.id + ".html";
-					}
-				}
-			};
-			opt.parameters="action=ping" ;
-			var tmp = new Ajax.Request("../../rawman" , opt);
-			//$('mainscreen').src = page.titleBar.id + ".html";
-		}
-	}
-
-	
-
-	function fademainscreen(page, newpage) {
-		// Confirm Discard Changes goes here 
-		_$('tooltip').innerHTML = tooltip_default;
-		_$('mainscreen').style.display = "none";
-	}
-
-	function show_Acctooltip(name, tip){
-		if( loggedon != 1){ return; }
-		_$('tooltip').innerHTML = tip ;
-	}
-
-	function registerajax() {
-		Rico.Corner.round('tooltip_round', {compact:true});
-		if( navigator.userAgent.indexOf("MSIE") != -1 || navigator.userAgent.indexOf("Konqueror") != -1 || navigator.userAgent.indexOf("Safari") != -1 ){
-			gui_alert(browser_alert);
-		}
-		var pnameheight = 22;
-		var pheight = (503  - (pnameheight*panels.length) ) ;
-		accordion = new Rico.Accordion( $('configpanel'), { panelHeight: pheight,onHideTab:fademainscreen,onShowTab:showmainscreen });
-		//$('borderbox').style.height = $('screenholder').clientHeight;
-		//$('titlebar').style.width = $('borderbox').clientWidth - 12;
-		for (var i = 0; i < panels.length; i++) {
-			var w = _$(panels[i].name) ;
-			if (panels[i].name == 'home'){
-				w.style.height =  "19px";
-				continue;
-			}
-			w.realonclick = w.onclick;
-			w.realonmouseover = w.onmouseover;
-		}
-		started = 1;
-	}
-
-	astmanEngine.setURL('../../rawman');
-	astmanEngine.setEventCallback(eventeater.eventcb);
-
-	function Logoff() {
-		if(!confirm("Are you sure ?")){ return true; }
-		var opt2 = {
+	new PanelDef("status", "Active Channels", "accordion-icon.gif", "Monitor active channels."),
+
+	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")
+
+);
+
+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)?$(panels[i].name).realonclick: false;
+		w.onMouseOver = (loggedon == 1)?$(panels[i].name).realonmouseover:false;
+		w.style.visibility = (loggedon == 1)?'inherit':'hidden';
+	}
+}
+
+function loadscreen(srcbody) {
+	_$('mainscreen').style.display = '';
+	if (loggedon == 1){ astmanEngine.pollEvents(); }
+}
+
+function setstatus(status) {	_$('status').innerHTML = copyright + status;	}
+function showmainscreen(page) {
+	if (started) {
+		var opt = {
 			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);
+			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";
+				}
 			}
 		};
-		opt2.parameters ="action=logoff";
-		var tmp2 = new Ajax.Request("../../rawman", opt2);
-	}
-
-	function system_link(){
-		var newwindow_href = location.protocol + '//' + location.hostname + ':8003';
-		window.open(newwindow_href ,'mainwindow','width=1024,height=768,resizable=no, scrollbars=no, toolbar=no, location=no,status=yes, menubar=no')
-	}
-
+		opt.parameters="action=ping" ;
+		var tmp = new Ajax.Request("../../rawman" , opt);
+		//$('mainscreen').src = page.titleBar.id + ".html";
+	}
+}
+
+
+
+function fademainscreen(page, newpage) {
+	// Confirm Discard Changes goes here 
+	_$('tooltip').innerHTML = tooltip_default;
+	_$('mainscreen').style.display = "none";
+}
+
+function show_Acctooltip(name, tip){
+	if( loggedon != 1){ return; }
+	_$('tooltip').innerHTML = tip ;
+
+}
+
+function registerajax() {
+	Rico.Corner.round('tooltip_round', {compact:true});
+	if( navigator.userAgent.indexOf("MSIE") != -1 || navigator.userAgent.indexOf("Konqueror") != -1 || navigator.userAgent.indexOf("Safari") != -1 ){
+		gui_alert(browser_alert);
+	}
+	var pnameheight = 22;
+	var pheight = (503  - (pnameheight*panels.length) ) ;
+	accordion = new Rico.Accordion( $('configpanel'), { panelHeight: pheight,onHideTab:fademainscreen,onShowTab:showmainscreen });
+	//$('borderbox').style.height = $('screenholder').clientHeight;
+	//$('titlebar').style.width = $('borderbox').clientWidth - 12;
+	for (var i = 0; i < panels.length; i++) {
+		var w = _$(panels[i].name) ;
+		if (panels[i].name == 'home'){
+			w.style.height =  "19px";
+			continue;
+		}
+		w.realonclick = w.onclick;
+		w.realonmouseover = w.onmouseover;
+	}
+	started = 1;
+}
+
+astmanEngine.setURL('../../rawman');
+astmanEngine.setEventCallback(eventeater.eventcb);
+
+function Logoff() {
+	if(!confirm("Are you sure ?")){ return true; }
+	var opt2 = {
+		method: 'get',
+		asynchronous: true,
+		onSuccess: function() {	 
+			setLoggedOn(0);
+			loggedon == -1;
+			// reload the browser URL
+			window.location.href=window.location.href;
+		},
+		onFailure: function(t) {
+			gui_alert("Config Error: " + t.status + ": " + t.statusText);
+		}
+	};
+	opt2.parameters ="action=logoff";
+	var tmp2 = new Ajax.Request("../../rawman", opt2);
+}
+
+function system_link(){
+	var newwindow_href = location.protocol + '//' + location.hostname + ':8003';
+	window.open(newwindow_href ,'mainwindow','width=1024,height=768,resizable=no, scrollbars=no, toolbar=no, location=no,status=yes, menubar=no')
+}
+
+function reloadConfig(){
+	var opt = { 
+		method: 'get', 
+		asynchronous: true, 
+		onSuccess: function(t) { gui_alert("Reloaded"); } ,
+		onFailure: function(t) { gui_alert("Config Error: " + t.status + ": " + t.statusText); }
+	};
+	var uri = parent.build_action('renamecat', 0, "","", "", ""); 
+	opt.parameters="action=updateconfig&reload=yes&srcfilename=" + encodeURIComponent("extensions.conf") + "&dstfilename=" + encodeURIComponent("extensions.conf") + uri;
+	var tmp = new Ajax.Request("../../rawman", opt);
+}
 </script>
 <head>
 	<title>Asterisk Configuration GUI (Beta)</title>
@@ -251,7 +263,9 @@
 		<iframe width="540" height="505" frameborder="0" border="0" marginheight="0" marginwidth="0" src="home.html" id="mainscreen" style="position:absolute;top:48px;" SCROLLING=no></iframe>
 	</td>
 	<td valign=top width=250 height="505">
-		<div id="logoutlink" class="mainscreenTooltipBar" align=right style="font-weight:bold;cursor: pointer; cursor: hand;">&nbsp;</div>
+		<div class="mainscreenTooltipBar" align=right style="font-weight:bold;cursor: pointer; cursor: hand;">&nbsp;
+		<span id="reloadconfig"></span>&nbsp;&nbsp;&nbsp;&nbsp;<span id="logoutlink"></span>
+		</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>

Modified: trunk/config/cfgbasic.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/cfgbasic.html?view=diff&rev=459&r1=458&r2=459
==============================================================================
--- trunk/config/cfgbasic.html (original)
+++ trunk/config/cfgbasic.html Wed Mar 21 10:32:07 2007
@@ -28,189 +28,200 @@
 <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.eventcb = function(msgs) {
-		if (loggedon == 1){
-			astmanEngine.pollEvents();
-		}
-	}
-
-
-	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("moh", "Music On Hold", "accordion-icon.gif", " Music on hold sometimes keeps people less angry while they wait for an answer"),
-
-//		new PanelDef("sip", "SIP", "accordion-icon.gif", "SIP (Session Initiation Protocol) Configuration"),
-
-//		new PanelDef("iax", "IAX", "accordion-icon.gif", "IAX (Inter-Asterisk eXchange Protocol) Configuration"),
-
-//		new PanelDef("jabber", "Jabber", "accordion-icon.gif", "Jabber users configuration"),
-
-//		new PanelDef("jingle", "Jingle", "accordion-icon.gif", "Jingle configuration lets users connect to google talk networks"),
-
-//		new PanelDef("zapata", "Zap Channel", "accordion-icon.gif", "Zapata telephony interface configuration"),
-		
-		new PanelDef("status", "Active Channels", "accordion-icon.gif", "Monitor active channels."),
-
-		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")
-
-	);
-
-	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)?$(panels[i].name).realonclick: false;
-			w.onMouseOver = (loggedon == 1)?$(panels[i].name).realonmouseover:false;
-			w.style.visibility = (loggedon == 1)?'inherit':'hidden';
-		}
-	}
+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.eventcb = function(msgs) {
+	if (loggedon == 1){
+		astmanEngine.pollEvents();
+	}
+}
+
+
+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("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 loadscreen(srcbody) {
-		_$('mainscreen').style.display = '';
-		if (loggedon == 1){ astmanEngine.pollEvents(); }
-	}
-	
-	function setstatus(status) {	_$('status').innerHTML = copyright + status;	}
-	function showmainscreen(page) {
-		if (started) {
-			var opt = {
-				method: 'get',
-				asynchronous: true,
-				onComplete: function (originalRequest){
-					if ( originalRequest.responseText.match("Error") ) {
-						window.location.href=window.location.href;
-						return ;
-					}
-					if ( originalRequest.responseText.match("Pong") ) {
-							_$('mainscreen').src = page.titleBar.id + ".html";
-					}
-				}
-			};
-			opt.parameters="action=ping" ;
-			var tmp = new Ajax.Request("../../rawman" , opt);
-			//$('mainscreen').src = page.titleBar.id + ".html";
-		}
-	}
-
-	
-
-	function fademainscreen(page, newpage) {
-		// Confirm Discard Changes goes here 
-		_$('tooltip').innerHTML = tooltip_default;
-		_$('mainscreen').style.display = "none";
-	}
-
-	function show_Acctooltip(name, tip){
-		if( loggedon != 1){ return; }
-		_$('tooltip').innerHTML = tip ;
-
-	}
-
-	function registerajax() {
-		Rico.Corner.round('tooltip_round', {compact:true});
-		if( navigator.userAgent.indexOf("MSIE") != -1 || navigator.userAgent.indexOf("Konqueror") != -1 || navigator.userAgent.indexOf("Safari") != -1 ){
-			gui_alert(browser_alert);
-		}
-		var pnameheight = 22;
-		var pheight = (503  - (pnameheight*panels.length) ) ;
-		accordion = new Rico.Accordion( $('configpanel'), { panelHeight: pheight,onHideTab:fademainscreen,onShowTab:showmainscreen });
-		//$('borderbox').style.height = $('screenholder').clientHeight;
-		//$('titlebar').style.width = $('borderbox').clientWidth - 12;
-		for (var i = 0; i < panels.length; i++) {
-			var w = _$(panels[i].name) ;
-			if (panels[i].name == 'home'){
-				w.style.height =  "19px";
-				continue;
-			}
-			w.realonclick = w.onclick;
-			w.realonmouseover = w.onmouseover;
-		}
-		started = 1;
-	}
-
-	astmanEngine.setURL('../../rawman');
-	astmanEngine.setEventCallback(eventeater.eventcb);
-
-	function Logoff() {
-		if(!confirm("Are you sure ?")){ return true; }
-		var opt2 = {
+	new PanelDef("status", "Active Channels", "accordion-icon.gif", "Monitor active channels."),
+
+	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")
+
+);
+
+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)?$(panels[i].name).realonclick: false;
+		w.onMouseOver = (loggedon == 1)?$(panels[i].name).realonmouseover:false;
+		w.style.visibility = (loggedon == 1)?'inherit':'hidden';
+	}
+}
+
+function loadscreen(srcbody) {
+	_$('mainscreen').style.display = '';
+	if (loggedon == 1){ astmanEngine.pollEvents(); }
+}
+
+function setstatus(status) {	_$('status').innerHTML = copyright + status;	}
+function showmainscreen(page) {
+	if (started) {
+		var opt = {
 			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);
+			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";
+				}
 			}
 		};
-		opt2.parameters ="action=logoff";
-		var tmp2 = new Ajax.Request("../../rawman", opt2);
-	}
-
-	function system_link(){
-		var newwindow_href = location.protocol + '//' + location.hostname + ':8003';
-		window.open(newwindow_href ,'mainwindow','width=1024,height=768,resizable=no, scrollbars=no, toolbar=no, location=no,status=yes, menubar=no')
-	}
-
+		opt.parameters="action=ping" ;
+		var tmp = new Ajax.Request("../../rawman" , opt);
+		//$('mainscreen').src = page.titleBar.id + ".html";
+	}
+}
+
+
+
+function fademainscreen(page, newpage) {
+	// Confirm Discard Changes goes here 
+	_$('tooltip').innerHTML = tooltip_default;
+	_$('mainscreen').style.display = "none";
+}
+
+function show_Acctooltip(name, tip){
+	if( loggedon != 1){ return; }
+	_$('tooltip').innerHTML = tip ;
+
+}
+
+function registerajax() {
+	Rico.Corner.round('tooltip_round', {compact:true});
+	if( navigator.userAgent.indexOf("MSIE") != -1 || navigator.userAgent.indexOf("Konqueror") != -1 || navigator.userAgent.indexOf("Safari") != -1 ){
+		gui_alert(browser_alert);
+	}
+	var pnameheight = 22;
+	var pheight = (503  - (pnameheight*panels.length) ) ;
+	accordion = new Rico.Accordion( $('configpanel'), { panelHeight: pheight,onHideTab:fademainscreen,onShowTab:showmainscreen });
+	//$('borderbox').style.height = $('screenholder').clientHeight;
+	//$('titlebar').style.width = $('borderbox').clientWidth - 12;
+	for (var i = 0; i < panels.length; i++) {
+		var w = _$(panels[i].name) ;
+		if (panels[i].name == 'home'){
+			w.style.height =  "19px";
+			continue;
+		}
+		w.realonclick = w.onclick;
+		w.realonmouseover = w.onmouseover;
+	}
+	started = 1;
+}
+
+astmanEngine.setURL('../../rawman');
+astmanEngine.setEventCallback(eventeater.eventcb);
+
+function Logoff() {
+	if(!confirm("Are you sure ?")){ return true; }
+	var opt2 = {
+		method: 'get',
+		asynchronous: true,
+		onSuccess: function() {	 
+			setLoggedOn(0);
+			loggedon == -1;
+			// reload the browser URL
+			window.location.href=window.location.href;
+		},
+		onFailure: function(t) {
+			gui_alert("Config Error: " + t.status + ": " + t.statusText);
+		}
+	};
+	opt2.parameters ="action=logoff";
+	var tmp2 = new Ajax.Request("../../rawman", opt2);
+}
+
+function system_link(){
+	var newwindow_href = location.protocol + '//' + location.hostname + ':8003';
+	window.open(newwindow_href ,'mainwindow','width=1024,height=768,resizable=no, scrollbars=no, toolbar=no, location=no,status=yes, menubar=no')
+}
+
+function reloadConfig(){
+	var opt = { 
+		method: 'get', 
+		asynchronous: true, 
+		onSuccess: function(t) { gui_alert("Reloaded"); } ,
+		onFailure: function(t) { gui_alert("Config Error: " + t.status + ": " + t.statusText); }
+	};
+	var uri = parent.build_action('renamecat', 0, "","", "", ""); 
+	opt.parameters="action=updateconfig&reload=yes&srcfilename=" + encodeURIComponent("extensions.conf") + "&dstfilename=" + encodeURIComponent("extensions.conf") + uri;
+	var tmp = new Ajax.Request("../../rawman", opt);
+}
 </script>
 <head>
 	<title>Asterisk Configuration GUI (Beta)</title>
@@ -252,7 +263,9 @@
 		<iframe width="540" height="505" frameborder="0" border="0" marginheight="0" marginwidth="0" src="home.html" id="mainscreen" style="position:absolute;top:48px;" SCROLLING=no></iframe>
 	</td>
 	<td valign=top width=250 height="505">
-		<div id="logoutlink" class="mainscreenTooltipBar" align=right style="font-weight:bold;cursor: pointer; cursor: hand;">&nbsp;</div>
+		<div class="mainscreenTooltipBar" align=right style="font-weight:bold;cursor: pointer; cursor: hand;">&nbsp;
+		<span id="reloadconfig"></span>&nbsp;&nbsp;&nbsp;&nbsp;<span id="logoutlink"></span>
+		</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>

Modified: trunk/config/home.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/home.html?view=diff&rev=459&r1=458&r2=459
==============================================================================
--- trunk/config/home.html (original)
+++ trunk/config/home.html Wed Mar 21 10:32:07 2007
@@ -32,7 +32,6 @@
 	_$('username').disabled = (f)?1:0;
 	_$('secret').disabled = (f)?1:0;
 	_$('logoff').disabled = (f)?0:1;
-	_$('reloadconfig').disabled = (f)?0:1;
 	_$('login').disabled = (f)?1:0;
 	if(!f){ try{ _$('username').focus();}catch(err){ } }
 }
@@ -64,8 +63,11 @@
 	_$('secret').className  = "input9_disabled";
 	updateButtons();
 	_$('statusbar').innerHTML = "<img src='images/tick.gif'><i>Connected!</i>";
+	parent.document.getElementById('reloadconfig').innerHTML = "ApplySettings";
+	parent.document.getElementById('reloadconfig').onclick = parent.reloadConfig ;
 	parent.document.getElementById('logoutlink').innerHTML = "Logout";
 	parent.document.getElementById('logoutlink').onclick = parent.Logoff ;
+
 }
 
 function loggedOff() {
@@ -177,18 +179,6 @@
 		parent.window.location.href = "./setup/install.html";
 	}
 
-}
-
-function reloadConfig(){
-	var opt = { 
-		method: 'get', 
-		asynchronous: true, 
-		onSuccess: function(t) { parent.gui_alert("Reloaded"); } ,
-		onFailure: function(t) { parent.gui_alert("Config Error: " + t.status + ": " + t.statusText); }
-	};
-	var uri = parent.build_action('renamecat', 0, "","", "", ""); 
-	opt.parameters="action=updateconfig&reload=yes&srcfilename=" + encodeURIComponent("extensions.conf") + "&dstfilename=" + encodeURIComponent("extensions.conf") + uri;
-	var tmp = new Ajax.Request("../../rawman", opt);
 }
 
 </script>
@@ -215,8 +205,6 @@
 			</td>
 		</tr>
 		<tr>	<td align='center' colspan='2'>
-				<input type="submit" id="reloadconfig" value="Reload Config" disabled=1 onClick="reloadConfig()">
-				&nbsp;&nbsp;&nbsp;&nbsp;
 				<input type="submit" id="login" value="Login" disabled=1 onClick="doLogin()" class="input">
 				&nbsp;&nbsp;&nbsp;&nbsp;
 				<input type="submit" id="logoff" value="Logoff" disabled=1 onClick="doLogoff()" class="input">
@@ -227,4 +215,4 @@
 	</tr>
 </table>
 </div>
-</body>
+</body>



More information about the asterisk-gui-commits mailing list