pari: branch 1.4 r1305 - /branches/1.4/config/

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Tue Aug 7 11:23:36 CDT 2007


Author: pari
Date: Tue Aug  7 11:23:36 2007
New Revision: 1305

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=1305
Log:
Making the advanced options more accessible

Modified:
    branches/1.4/config/cfgbasic.html
    branches/1.4/config/localexts.html
    branches/1.4/config/options.html

Modified: branches/1.4/config/cfgbasic.html
URL: http://svn.digium.com/view/asterisk-gui/branches/1.4/config/cfgbasic.html?view=diff&rev=1305&r1=1304&r2=1305
==============================================================================
--- branches/1.4/config/cfgbasic.html (original)
+++ branches/1.4/config/cfgbasic.html Tue Aug  7 11:23:36 2007
@@ -33,6 +33,43 @@
 var asterisk_guitools_inextconf = 0;
 eventeater.pingstatus = false;
 var keepPinging;
+var MainScreenPanels = [];
+var newMSpanel = function(s){
+	var r = {};
+	r.PanelName = s[0];
+	r.FileName = s[1];
+	r.PanelDesc = s[2];
+	MainScreenPanels.push(r);
+};
+
+function updateMainScreenPanels(){
+	MainScreenPanels = [];
+	newMSpanel( ["Home", "home.html", "Asterisk Configuration Panel - Please click on a panel to manage related features"]);
+	newMSpanel( ["Users", "users.html", "Users is a short cut for quickly adding and removing all the necessary configuration components for any new phone."]);
+	newMSpanel( ["Conferencing", "meetme.html", "MeetMe conference bridging allow quick, ad-hoc conferences with or without security."]);
+	newMSpanel( ["Voicemail", "voicemail.html", "General settings for voicemail"]);
+	newMSpanel( ["Call Queues", "queues.html", "Call queues allow calls to be sequenced to one or more agents."]);
+	newMSpanel( ["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."]);
+	newMSpanel( ["Calling Rules", "numberplan.html", "The Calling Rules define dialing permissions and least cost routing rules."]);
+	newMSpanel( ["Incoming Calls", "incoming.html", "Define how your incoming calls should be handled & configure DID (Direct inward Dialing)"]);
+	newMSpanel( ["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"]);
+	newMSpanel( ["Time Based Rules", "timerules.html", "define call routing rules based on date and time"]);
+	newMSpanel( ["Call Parking", "callparking.html", "configure call parking features"]);
+	newMSpanel( ["Ring Groups", "ringgroups.html", "define RingGroups to dial more than one extension"]);
+	newMSpanel( ["Record a Menu", "record.html", "Allows you to record custom voicemenus over a phone"]);
+	newMSpanel( ["Active Channels", "status.html", "Monitor active channels."]);
+	newMSpanel( ["Graphs", "graphs.html", "View Graphs of your System Information."]);
+	newMSpanel( ["System Info", "sysinfo.html", "System Information."]);
+	newMSpanel( ["Asterisk Logs", "syslog.html", "Asterisk Log messages."]);
+	// newpanel( ["CDR Configuration", "cdr_conf.html", "CDR Engine Configuration."]); // Uncomment when cdr_conf.html is finished, there are still some errors. 
+	newMSpanel( ["CDR Reader", "cdr.html", "Read all your call records from Asterisk."]);
+	newMSpanel( ["File Editor", "feditor.html", "Edit Asterisk Config Files"]);
+	newMSpanel( ["Asterisk CLI", "cli.html", "Asterisk Command Line Interface"]);
+	newMSpanel( ["GUI Access", "http_options.html", "GUI Access settings."]);
+	newMSpanel( ["Backup", "backup.html", "Backup Management."]);
+	newMSpanel( ["Options", "localexts.html", "Admin Settings"]);
+}
+
 
 
 function fit_toScreen(){
@@ -142,7 +179,6 @@
 	_$( s.id + "_U" ).style.height = _$('configpanel').pheight;
 	_$( s.id + "_U" ).style.display = "";
 
-	_$('AdvancedOptionsSelect').selectedIndex=-1;
 	_$('mainscreen').style.display = "none";
 	_$('mainscreen').src = s.id + ".html";
 	_$('mainscreen').currentpage = s.id + ".html";
@@ -150,6 +186,7 @@
 
 function returnpanels(){
 	var panels = [];
+	var u;
 
 	var newpanel = function(s){
 		var r = {};
@@ -159,36 +196,16 @@
 		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( ["Time Based Rules", "timerules.html", "define call routing rules based on date and time"]);
-	newpanel( ["Call Parking", "callparking.html", "configure call parking features"]);
-	newpanel( ["Ring Groups", "ringgroups.html", "define RingGroups to dial more than one extension"]);
-	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( ["Asterisk Logs", "syslog.html", "Asterisk Log messages."]);
-	// newpanel( ["CDR Configuration", "cdr_conf.html", "CDR Engine Configuration."]); // Uncomment when cdr_conf.html is finished, there are still some errors. 
-	newpanel( ["CDR Reader", "cdr.html", "Read all your call records from Asterisk."]);
-	newpanel( ["File Editor", "feditor.html", "Edit Asterisk Config Files"]);
-	newpanel( ["Asterisk CLI", "cli.html", "Asterisk Command Line Interface"]);
-	newpanel( ["GUI Access", "http_options.html", "GUI Access settings."]);
-	newpanel( ["Backup", "backup.html", "Backup Management."]);
-	newpanel( ["Options", "localexts.html", "Admin Settings"]);
+	for( var y=0; y < MainScreenPanels.length ; y++){
+		u = MainScreenPanels[y];
+		newpanel([ u.PanelName, u.FileName, u.PanelDesc ]);
+	}
 	return panels;
 }
 
 
 function pingevery(a){
-	window.setTimeout(makeping, 1000);
+	setTimeout( makeping, 1000);
 	keepPinging = setInterval( makeping, a*250 );
 }
 
@@ -229,9 +246,9 @@
 }
 
 function registerajax() {
+	updateMainScreenPanels();
 	fit_toScreen();
 	ASTGUI.events.add( window , 'resize', fit_toScreen );
-	pao();
 	astmanEngine = new Astman();
 	astmanEngine.setURL(asterisk_rawmanPath );
 
@@ -242,7 +259,7 @@
 	}
 }
 
-function Logoff() {
+function Logoff(){
 	if(!confirm("Are you sure ?")){ return true; }
 	makerequest("","","action=logoff", function(t){ window.location.href=window.location.href; } );
 }
@@ -261,20 +278,6 @@
 	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';
@@ -349,24 +352,4 @@
 		</td>
 </tr>
 </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="moh.html">Music on Hold</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="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/1.4/config/localexts.html
URL: http://svn.digium.com/view/asterisk-gui/branches/1.4/config/localexts.html?view=diff&rev=1305&r1=1304&r2=1305
==============================================================================
--- branches/1.4/config/localexts.html (original)
+++ branches/1.4/config/localexts.html Tue Aug  7 11:23:36 2007
@@ -115,10 +115,11 @@
 
 function localajaxinit(){
 	ASTGUI.events.add(document, 'mouseover', show_tooltip);
-	if (top._$('AdvancedOptions').style.display == "none"){
-		_$('advbasic').innerHTML = '(Show Advanced Options)';
+
+	if (top.isAdvancedMode){
+		_$('advbasic').innerHTML = 'Basic' ;
 	}else{
-		_$('advbasic').innerHTML = '(Hide Advanced Options)';
+		_$('advbasic').innerHTML = 'Advanced' ;
 	}
 
 	setWindowTitle("Local Extension Settings");
@@ -158,30 +159,78 @@
 	} catch(e){ }
 }
 
-
 function flipadvbasic(){
-	if(_$('advbasic').innerHTML.toLowerCase().match('show') ){
-		_$('advbasic').innerHTML = '(Hide Advanced Options)';
-		top._$('AdvancedOptions').style.display = '';
-		top._$('AdvancedOptionsSelect').selectedIndex=-1;
-		return;
-	}
-
-	if(_$('advbasic').innerHTML.toLowerCase().match('hide') ){
-		_$('advbasic').innerHTML = '(Show Advanced Options)';
-		top._$('AdvancedOptions').style.display = 'none';
-		return;
-	}
-}
-
+	var sel_opt = function(){
+		top._$( "home_U" ).style.height = "1px";
+		top._$( "home_U" ).style.display = "none";
+		top._$( "localexts_U" ).style.height = top._$('configpanel').pheight;
+		top._$( "localexts_U" ).style.display = "";
+	};
+
+	if(_$('advbasic').innerHTML.toLowerCase().match('advanced') ){
+		_$('advbasic').innerHTML = 'Basic';
+		top.isAdvancedMode = true;
+
+		var add_ADVpanel = function(s){
+			var r = {};
+			r.PanelName = s[0];
+			r.FileName = s[1];
+			r.PanelDesc = s[2];
+			top.MainScreenPanels.splice( top.MainScreenPanels.length-1 ,0,r)
+		};
+
+		add_ADVpanel( ["VM Email settings", "emailsettings.html", "Voicemail Email Template"]);
+		add_ADVpanel( ["Global SIP Settings", "sip.html", "Global SIP Settings"]);
+		add_ADVpanel( ["Global IAX Settings", "iax.html", "Global IAX Settings"]);
+//		add_ADVpanel( ["Music on Hold", "moh.html", "Music On Hold"]);
+//		add_ADVpanel( ["Jabber", "jabber.html", "Jabber"]);
+//		add_ADVpanel( ["Jingle", "jingle.html", "Jingle"]);
+
+		ASTGUI.domActions.removeAllChilds( top._$('configpanel') );
+		top.createpanels();
+		top.fit_toScreen();
+		top.setLoggedOn(1);
+		sel_opt();
+		return;
+	}
+
+	if(_$('advbasic').innerHTML.toLowerCase().match('basic') ){
+		top.isAdvancedMode = false;
+		_$('advbasic').innerHTML = 'Advanced';
+		ASTGUI.domActions.removeAllChilds( top._$('configpanel') );
+		top.updateMainScreenPanels();
+		top.createpanels();
+		top.fit_toScreen();
+		top.setLoggedOn(1);
+		//top._$('AdvancedOptions').style.display = 'none';
+		sel_opt();
+		return;
+	}
+}
+
+
+function tosetup(){
+        parent.window.location.href = "./setup/install.html";
+}
 
 </script>
 <body id="foo" onload="localajaxinit()" bgcolor="EFEFEF"  onunload="free_mem()">
 <div class="mainscreenTitleBar">
 	<span style="margin-left: 4px;font-weight:bold">Admin Settings</span>
-	<span style="margin-left: 14px;font-weight:bold; cursor: pointer" id="advbasic" onclick="flipadvbasic();">(Show Advanced Options)</span>
 </div>
 <div class="mainscreenContentBox" id="userscontent">
+<TABLE align=center width="100%" cellpadding=0 cellspacing=0 style="margin: 5px 0 8px 0;">
+<TR>
+	<TD valign="bottom" align="center" class="tab"><a href="#" class="tabselected">Local Extension settings</a></TD>
+	<TD valign="bottom" align="left">
+		<a href="#" class="tab" onclick="flipadvbasic();">
+		<span style="font-weight:bold; cursor: pointer" id="advbasic">Advanced Options</span>
+		</a>
+	</TD>
+	<TD valign="bottom" align="left"><a href="options.html" class="tab">Change Password</a></TD>
+	<TD valign="bottom" align="left"><a href="#" class="tab" onclick="tosetup();">Setup Wizard</a></TD>
+</TR>
+</TABLE>
 <table class="mainscreenTable" align="center">
 <tr>	
 <td align="center" valign="top">

Modified: branches/1.4/config/options.html
URL: http://svn.digium.com/view/asterisk-gui/branches/1.4/config/options.html?view=diff&rev=1305&r1=1304&r2=1305
==============================================================================
--- branches/1.4/config/options.html (original)
+++ branches/1.4/config/options.html Tue Aug  7 11:23:36 2007
@@ -78,15 +78,25 @@
 	_$('newpass').focus();
 }
 
+
+function tosetup(){
+        parent.window.location.href = "./setup/install.html";
+}
 </script>
 <body id="foo" onload="localajaxinit()" bgcolor="EFEFEF">
 <div class="mainscreenTitleBar"><span style="margin-left: 4px;font-weight:bold">Change Password</span></div>
 <div class="mainscreenContentBox" id="userscontent">
-<BR>
+<TABLE align=center width="100%" cellpadding=0 cellspacing=0 style="margin: 5px 0 6 0;">
+<TR>
+        <TD valign="bottom" align="center"><a href="localexts.html" class="tab">Local Extension settings</a></TD>
+        <TD valign="bottom" align="left"><a href="#" class="tabselected">Change Password</a></TD>
+        <TD valign="bottom" align="left"><a href="#" class="tab" onclick="tosetup();">Setup Wizard</a></TD>
+</TR>
+</TABLE>
 <table class="mainscreenTable" align="center">
 	<tr valign="top" height="18"><td align="center"></td></tr>
 	<tr>	<td align="center" valign="top">
-		<div id="channellist" class="chanlist_small" style="width: 320px; height:110">
+		<div id="channellist" class="chanlist_small" style="width: 80%;">
 		<table cellpadding=2 cellspacing=2 border=0>
 			<tr>	<td colspan=2 height=5></td></tr>
 			<tr>	<td class="field_text" tip="en,options,1">Enter New Password:</td>




More information about the asterisk-gui-commits mailing list