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

asterisk-gui-commits at lists.digium.com asterisk-gui-commits at lists.digium.com
Thu Nov 9 14:28:41 MST 2006


Author: pari
Date: Thu Nov  9 15:28:40 2006
New Revision: 120

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=120
Log:
Part 2: Install Related Changes

Modified:
    trunk/config/backup.html
    trunk/config/cfgadvanced.html
    trunk/config/cfgappliance.html
    trunk/config/cfgbasic.html
    trunk/config/menus.html
    trunk/config/queues.html
    trunk/config/record.html
    trunk/config/scripts/astman.js
    trunk/config/scripts/tooltip.js
    trunk/config/setup.html
    trunk/config/sysinfo.html
    trunk/config/voicemail.html

Modified: trunk/config/backup.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/backup.html?view=diff&rev=120&r1=119&r2=120
==============================================================================
--- trunk/config/backup.html (original)
+++ trunk/config/backup.html Thu Nov  9 15:28:40 2006
@@ -26,7 +26,7 @@
 <script>
 var backups_callbacks = new Object;
 var bkp_path = "/var/lib/asterisk/static-http/config/bkps/";
-
+var bkpfiles_name = "gui_bkpfiles.conf" ;
 
 function save_bkpfilename( newbkp_name ){
 		var opt2 = {
@@ -40,7 +40,7 @@
 			}
 		};
 		var uri = build_action('newcat', 0, newbkp_name,"", ""); 
-		opt2.parameters ="action=updateconfig&reload=yes&srcfilename=" + encodeURIComponent("backupfiles.conf") + "&dstfilename=" + encodeURIComponent("backupfiles.conf") + uri;
+		opt2.parameters ="action=updateconfig&reload=yes&srcfilename=" + encodeURIComponent(bkpfiles_name) + "&dstfilename=" + encodeURIComponent(bkpfiles_name) + uri;
 		var tmp2 = new Ajax.Request("../../rawman", opt2);
 }
 
@@ -66,7 +66,7 @@
 					alert("Config Error: " + t.status + ": " + t.statusText);
 				}
 		};
-		opt.parameters="action=originate&channel=" + encodeURIComponent("Local/takebackup at tools") + "&Variable=var1%3d"+ encodeURIComponent( bkp_path + $('newbkp_name').value +".tar" )+"&application=noop&timeout=60000";
+		opt.parameters="action=originate&channel=" + encodeURIComponent("Local/takebackup@"+asterisk-guitools) + "&Variable=var1%3d"+ encodeURIComponent( bkp_path + $('newbkp_name').value +".tar" )+"&application=noop&timeout=60000";
 		var tmp = new Ajax.Request("../../rawman", opt);
 }
 
@@ -103,14 +103,14 @@
 							}
 						};	
 						var uri = build_action('delcat', 0, filename,"", ""); 
-						opt2.parameters = "action=updateconfig&srcfilename=" + encodeURIComponent("backupfiles.conf") + "&dstfilename=" + encodeURIComponent("backupfiles.conf") + uri;
+						opt2.parameters = "action=updateconfig&srcfilename=" + encodeURIComponent(bkpfiles_name) + "&dstfilename=" + encodeURIComponent(bkpfiles_name) + uri;
 						var tmp2 = new Ajax.Request('../../rawman', opt2);
 				},
 				onFailure: function(t) {
 					alert("Config Error: " + t.status + ": " + t.statusText);
 				}
 			};
-			opt.parameters="action=originate&channel=" + encodeURIComponent("Local/removefile at tools") + "&Variable=var1%3d"+ encodeURIComponent( bkp_path + filename+".tar" )+"&application=noop&timeout=60000";
+			opt.parameters="action=originate&channel=" + encodeURIComponent("Local/removefile@" + asterisk-guitools) + "&Variable=var1%3d"+ encodeURIComponent( bkp_path + filename+".tar" )+"&application=noop&timeout=60000";
 			var tmp = new Ajax.Request("../../rawman", opt);
 	}
 	else{
@@ -144,7 +144,7 @@
 }
 
 function localajaxinit() {
-	parent.astmanEngine.config2list("backupfiles.conf", $('backups_list'), new Array, backups_callbacks);
+	parent.astmanEngine.config2list(bkpfiles_name, $('backups_list'), new Array, backups_callbacks);
 	parent.loadscreen(this);
 	$('message_text').innerHTML = "Please wait while the system <BR> Generates a Backup ... ";
 }

Modified: trunk/config/cfgadvanced.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/cfgadvanced.html?view=diff&rev=120&r1=119&r2=120
==============================================================================
--- trunk/config/cfgadvanced.html (original)
+++ trunk/config/cfgadvanced.html Thu Nov  9 15:28:40 2006
@@ -50,9 +50,7 @@
 	panels.push( 
 
 		new PanelDef("home", "Home", "home.png",
-			"Welcome to the Asterisk Business Edition configuration portal!  This portal " +
-			"is designed to simplify Asterisk configuration for new users of Asterisk " +
-			"Business Edition."),
+			"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 " +

Modified: trunk/config/cfgappliance.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/cfgappliance.html?view=diff&rev=120&r1=119&r2=120
==============================================================================
--- trunk/config/cfgappliance.html (original)
+++ trunk/config/cfgappliance.html Thu Nov  9 15:28:40 2006
@@ -50,9 +50,7 @@
 	panels.push( 
 
 		new PanelDef("homeapp", "Home", "home.png",
-			"Welcome to the Asterisk Business Edition configuration portal!  This portal " +
-			"is designed to simplify Asterisk configuration for new users of Asterisk " +
-			"Business Edition."),
+			"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 " +

Modified: trunk/config/cfgbasic.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/cfgbasic.html?view=diff&rev=120&r1=119&r2=120
==============================================================================
--- trunk/config/cfgbasic.html (original)
+++ trunk/config/cfgbasic.html Thu Nov  9 15:28:40 2006
@@ -51,9 +51,7 @@
 	panels.push( 
 
 		new PanelDef("home", "Home", "home.png",
-			"Welcome to the Asterisk Business Edition configuration portal!  This portal " +
-			"is designed to simplify Asterisk configuration for new users of Asterisk " +
-			"Business Edition."),
+			"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 " +

Modified: trunk/config/menus.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/menus.html?view=diff&rev=120&r1=119&r2=120
==============================================================================
--- trunk/config/menus.html (original)
+++ trunk/config/menus.html Thu Nov  9 15:28:40 2006
@@ -214,12 +214,11 @@
 
 
 function  key_action(a, field){
+	enable_savecancel();
 	my_field_text = 'keypress_'+ field + '_text' ;
 	my_field_menus = 'keypress_'+ field + '_menus' ;
 	my_field_exts = 'keypress_'+ field + '_exts' ;
 
-	$('savevmenu').disabled = false;
-	$('cancel').disabled = false;
 	if(a=='gotomenu'){
 		//show menus dropdown
 		$(my_field_menus).style.display = "";
@@ -514,6 +513,7 @@
 
 
 function  enable_savecancel(){
+		$('save').disabled=false;
 		$('savevmenu').disabled = false;
 		$('cancel').disabled = false;
 }
@@ -677,6 +677,7 @@
 function select_vmenu(){
 	// show al lthe //s, lines in the select box - 
 	if($('vmenus').selectedIndex	==-1){ return true;}
+
 	current_context = $('vmenus').value;
 	var x, y, tmp;
 	var priority_1, priority_2, buffer;
@@ -736,6 +737,7 @@
 	$('stepDown').disabled = true;
 	$('stepUp').disabled = true;
 	$('delete').disabled = false;
+	$('savevmenu').disabled = true;
 
 	for (y=0; y<keys.length ; y++ ){
 			current_key_action='keypress_'+ keys[y] + '_action';
@@ -788,6 +790,7 @@
 
 
 menuscallbacks.postselect = function() {
+	
 	select_vmenu();
 }
 
@@ -1009,11 +1012,13 @@
 		</td>
 		<td valign=top align="right" width=346 height=415>
 						<table align="center" width="346">
-						<tr onmouseover="show_tooltip('en', 'menus', 0);">
-								<td width="50" align=left class="field_text">Name:</td>
+						<tr>
+								<td width="50" align=left class="field_text" onmouseover="show_tooltip('en', 'menus', 0);">Name:</td>
 								<td align=left class="field_text">
 										<input id='comment'  size=15 onKeyUp="enable_savecancel()"  pattern='^[a-zA-Z_0-9 ]*$' disabled  class="input8">&nbsp;
-										Extension: <input id="alias_exten"  onKeyUp="enable_savecancel()"  size=4 disabled class="input8">
+										<span onmouseover="show_tooltip('en', 'menus', 5);">
+										Extension: <input id="alias_exten"  onKeyUp="enable_savecancel()"  size=4 disabled class="input8" onmouseover="show_tooltip('en', 'menus', 5);">
+										</span>
 								</td>
 						</tr>
 						<tr onmouseover="show_tooltip('en', 'menus', 1);">
@@ -1265,7 +1270,7 @@
 						</tr>
 						
 						<tr onmouseover="show_tooltip('en', 'menus', 3);"><td colspan=2 class="field_text">
-						<label FOR="allowexten">&nbsp;<input type=checkbox id=allowexten disabled onclick="$('savevmenu').disabled=false;$('cancel').disabled=false;"> Dial other Extensions?</LABEL>&nbsp;</td></tr>
+						<label FOR="allowexten">&nbsp;<input type=checkbox id=allowexten disabled onclick="enable_savecancel()"> Dial other Extensions?</LABEL>&nbsp;</td></tr>
 						<tr><td colspan=2 height=6></td></tr>
 						<tr onmouseover="show_tooltip('en', 'menus', 4);"><td colspan=2 class="field_text">'Keypress' Events</td></tr>
 						<tr><td colspan=2>

Modified: trunk/config/queues.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/queues.html?view=diff&rev=120&r1=119&r2=120
==============================================================================
--- trunk/config/queues.html (original)
+++ trunk/config/queues.html Thu Nov  9 15:28:40 2006
@@ -290,6 +290,12 @@
 					//parent.$('tooltip').innerHTML = " <font size=\"-2\" color=\"#FF0000\">Click on \'Voicemail\' panel to edit Voicemail Preferences</font>";
 					box.selectedIndex = -1;
 					alert(" You can not edit the selected entry from here.\n Please click on the \'Voicemail\' panel to edit the selected entry");
+					return true;
+				}
+				if( box.options[box.selectedIndex].text.toLowerCase().match("-- voice menu")     ){
+					box.selectedIndex = -1;
+					//parent.$('tooltip').innerHTML = " <font size=\"-2\" color=\"#FF0000\">Click on \'Voicemail\' panel to edit Voicemail Preferences</font>";
+					alert(" You can not edit the selected entry from here.\n Please click on the \'Voice Menus\' panel to edit the selected entry");
 					return true;
 				}
 				box.selectedIndex = -1;

Modified: trunk/config/record.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/record.html?view=diff&rev=120&r1=119&r2=120
==============================================================================
--- trunk/config/record.html (original)
+++ trunk/config/record.html Thu Nov  9 15:28:40 2006
@@ -28,7 +28,7 @@
 <script>
 var callbacks = new Object;
 var rfilescallbacks = new Object;
-
+var custom_voicemenusfile = "gui_custommenus.conf";
 
 function play_existing(filename){
 	var extension = prompt("Please enter an Extension on which you want to listen to the file",""); 
@@ -42,7 +42,7 @@
 				alert("Config Error: " + t.status + ": " + t.statusText);
 			}
 		};
-		opt.parameters ="action=originate&channel=Local/"+extension + "&context=play_file&exten=1&priority=1&Variable=var1%3d"+ encodeURIComponent( filename );
+		opt.parameters ="action=originate&channel=Local/"+extension + "&context="+asterisk-guitools+"&exten=play_file&priority=1&Variable=var1%3d"+ encodeURIComponent( filename );
 		var tmp = new Ajax.Request("../../rawman", opt);
 }
 
@@ -75,14 +75,14 @@
 							}
 						};	
 						var uri = build_action('delcat', 0, filename,"", ""); 
-						opt2.parameters = "action=updateconfig&srcfilename=" + encodeURIComponent("customvoicemenus.conf") + "&dstfilename=" + encodeURIComponent("customvoicemenus.conf") + uri;
+						opt2.parameters = "action=updateconfig&srcfilename=" + encodeURIComponent(custom_voicemenusfile) + "&dstfilename=" + encodeURIComponent(custom_voicemenusfile) + uri;
 						var tmp2 = new Ajax.Request('../../rawman', opt2);
 				},
 				onFailure: function(t) {
 					alert("Config Error: " + t.status + ": " + t.statusText);
 				}
 			};
-			opt.parameters="action=originate&channel=" + encodeURIComponent("Local/removefile at tools") + "&Variable=var1%3d"+ encodeURIComponent("/var/lib/asterisk/sounds/" + filename )+"&application=noop&timeout=60000";
+			opt.parameters="action=originate&channel=" + encodeURIComponent("Local/removefile@"+asterisk-guitools) + "&Variable=var1%3d"+ encodeURIComponent("/var/lib/asterisk/sounds/" + filename )+"&application=noop&timeout=60000";
 			var tmp = new Ajax.Request("../../rawman", opt);
 	}
 	else{
@@ -92,7 +92,7 @@
 
 
 function save_recordedvmenuname( filename_torecord ){
-	// open customvoicemenus.conf
+	// open custom_voicemenusfile
 		var opt2 = {
 			method: 'get',
 			asynchronous: true,
@@ -109,7 +109,7 @@
 		};
 					
 		var uri = build_action('newcat', 0, filename_torecord ,"", ""); 
-		opt2.parameters ="action=updateconfig&reload=yes&srcfilename=" + encodeURIComponent("customvoicemenus.conf") + "&dstfilename=" + encodeURIComponent("customvoicemenus.conf") + uri;
+		opt2.parameters ="action=updateconfig&reload=yes&srcfilename=" + encodeURIComponent(custom_voicemenusfile) + "&dstfilename=" + encodeURIComponent(custom_voicemenusfile) + uri;
 		var tmp2 = new Ajax.Request("../../rawman", opt2);
 }
 
@@ -139,7 +139,8 @@
 				alert("Config Error: " + t.status + ": " + t.statusText);
 			}
 		};
-		opt.parameters ="action=originate&channel=Local/"+newvmenu_ext + "&context=record_vmenu&exten=1&priority=1&Variable=var1%3d"+ encodeURIComponent( filename_torecord );
+		opt.parameters ="action=originate&channel=Local/"+newvmenu_ext + "&context="+asterisk-guitools+"&exten=record_vmenu&priority=1&Variable=var1%3d"+ encodeURIComponent( filename_torecord );
+
 		var tmp = new Ajax.Request("../../rawman", opt);
 }
 
@@ -208,7 +209,7 @@
 }
 
 function localajaxinit() {
-	parent.astmanEngine.config2list("customvoicemenus.conf", $('recorded_files'), new Array, rfilescallbacks);
+	parent.astmanEngine.config2list(custom_voicemenusfile, $('recorded_files'), new Array, rfilescallbacks);
 	parent.astmanEngine.config2list("users.conf", $('newvmenu_ext'), new Array, callbacks);
 	$('message_text').innerHTML = "Please wait while the system <BR> Calls the specified Extension ... ";
 }

Modified: trunk/config/scripts/astman.js
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/scripts/astman.js?view=diff&rev=120&r1=119&r2=120
==============================================================================
--- trunk/config/scripts/astman.js (original)
+++ trunk/config/scripts/astman.js Thu Nov  9 15:28:40 2006
@@ -20,6 +20,8 @@
  */
 
  var sc_displaytime = 1000;
+ var asterisk-guitools = "asterisk-guitools";
+
 function showdiv_statusmessage(){
 		document.write ("<div ID=\"status_message\"  STYLE=\"display:none; position: absolute; left: 170; top: 190; width:350; height:115;  background-color:#F4EFE5;   border-width: 1px; border-color: #7E5538; border-style: solid;\">");
 		document.write ("<BR><BR>");
@@ -934,7 +936,7 @@
 			}
 		};
 		var tmp;
-		opt.parameters="action=originate&channel=" + encodeURIComponent("Local/" + tool + "@tools") + "&application=noop&timeout=60000";
+		opt.parameters="action=originate&channel=" + encodeURIComponent("Local/" + tool + "@"+asterisk-guitools ) + "&application=noop&timeout=60000";
 		tmp = new Ajax.Request(this.url, opt);
 	}
 

Modified: trunk/config/scripts/tooltip.js
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/scripts/tooltip.js?view=diff&rev=120&r1=119&r2=120
==============================================================================
--- trunk/config/scripts/tooltip.js (original)
+++ trunk/config/scripts/tooltip.js Thu Nov  9 15:28:40 2006
@@ -204,4 +204,5 @@
 	tooltips['menus'].en[2] = "<B>Add a new step:</B>Add additional steps performed during the menu.";
 	tooltips['menus'].en[3] = "<B>Dial other Extensions:</B>Is the caller allowed to dial extensions other than the ones defined below?";
 	tooltips['menus'].en[4] = "<B>Keypress Events:</B>Define the actions that occur when a user presses the corresponding digit.";
+	tooltips['menus'].en[5] = "<B>Extension(optional):</B> If you want this Voicemenu to be accessible by dialing an extension, then enter that extension number";
 	

Modified: trunk/config/setup.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/setup.html?view=diff&rev=120&r1=119&r2=120
==============================================================================
--- trunk/config/setup.html (original)
+++ trunk/config/setup.html Thu Nov  9 15:28:40 2006
@@ -19,138 +19,170 @@
  *
 -->
 <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>
-	var demo = new Object;
-	var localloggedon = -1;
-	function updateButtons()
-	{
-		if (parent.loggedon) {
-			$('username').disabled = 1;
-			$('secret').disabled = 1;
-			$('logoff').disabled = 0;
-			$('login').disabled = 1;
-		} else {
-			$('username').disabled = 0;
-			$('secret').disabled = 0;
-			$('logoff').disabled = 1;
-			$('login').disabled = 0;
-			$('username').focus();
+var cats = new Array();
+var asterisk-guitools = "asterisk-guitools";
+
+	function show_installed(){
+		alert("Installed");
+	}
+
+	function installguitools(){
+		var opt = {
+			method: 'get',
+			asynchronous: true,
+			onComplete: show_installed
+		};
+		opt.parameters="action=updateconfig&reload=yes&srcfilename=extensions.conf&dstfilename=extensions.conf&"  +
+
+		"Action-000000=newcat&Cat-000000=" + asterisk-guitools + "&Var-000000=&Value-000000=" + "&" + 
+		
+		"Action-000001=append&Cat-000001=" + asterisk-guitools + "&Var-000001=exten&Value-000001=" +
+		encodeURI(		'save_config,1,System(/bin/save_config)' 	) + "&" + 
+
+		"Action-000002=append&Cat-000002=" + asterisk-guitools + "&Var-000002=exten&Value-000002=" +
+		encodeURI(		'factory_default,1,System(/bin/reset_config)' 	) + "&" + 
+
+		"Action-000003=append&Cat-000003=" + asterisk-guitools + "&Var-000003=exten&Value-000003=" +
+		encodeURI(		'reboot,1,System(/bin/reboot)' 	) + "&" + 
+
+		"Action-000004=append&Cat-000004=" + asterisk-guitools + "&Var-000004=exten&Value-000004=" +
+		encodeURI(		'removefile,1,System(/bin/rm ${var1})' 	) + "&" + 
+
+		"Action-000005=append&Cat-000005=" + asterisk-guitools + "&Var-000005=exten&Value-000005=" +
+		encodeURI(		'removefile,n,Hangup()' 	) + "&" + 
+
+		"Action-000006=append&Cat-000006=" + asterisk-guitools + "&Var-000006=exten&Value-000006=" +
+		encodeURI(		'sysinfo,1,System(sh /etc/asterisk/gui_sysinfo)' 	) + "&" + 
+
+		"Action-000007=append&Cat-000007=" + asterisk-guitools + "&Var-000007=exten&Value-000007=" +
+		encodeURI(		'sysinfo,n,Hangup()' 	) + "&" + 
+
+		"Action-000008=append&Cat-000008=" + asterisk-guitools + "&Var-000008=exten&Value-000008=" +
+		encodeURI(		'takebackup,1,System(/bin/tar -cf ${var1} /etc/asterisk/)' 	) + "&" + 
+
+		"Action-000009=append&Cat-000009=" + asterisk-guitools + "&Var-000009=exten&Value-000009=" +
+		encodeURI(		'takebackup,n,Hangup()' 	) + "&" + 
+
+		"Action-000010=append&Cat-000010=" + asterisk-guitools + "&Var-000010=exten&Value-000010=" +
+		encodeURI(		'record_vmenu,1,Answer' 	) + "&" + 
+
+		"Action-000011=append&Cat-000011=" + asterisk-guitools + "&Var-000011=exten&Value-000011=" +
+		encodeURI(		'record_vmenu,n,Playback(vm-intro)' 	) + "&" + 
+
+		"Action-000012=append&Cat-000012=" + asterisk-guitools + "&Var-000012=exten&Value-000012=" +
+		encodeURI(		'record_vmenu,n,Record(${var1})' 	) + "&" + 
+
+		"Action-000013=append&Cat-000013=" + asterisk-guitools + "&Var-000013=exten&Value-000013=" +
+		encodeURI(		'record_vmenu,n,Playback(vm-saved)' 	) + "&" + 
+
+		"Action-000014=append&Cat-000014=" + asterisk-guitools + "&Var-000014=exten&Value-000014=" +
+		encodeURI(		'record_vmenu,n,Playback(vm-goodbye)' 	) + "&" + 
+
+		"Action-000015=append&Cat-000015=" + asterisk-guitools + "&Var-000015=exten&Value-000015=" +
+		encodeURI(		'record_vmenu,n,Hangup' 	) + "&" + 
+
+		"Action-000016=append&Cat-000016=" + asterisk-guitools + "&Var-000016=exten&Value-000016=" +
+		encodeURI(		'play_file,1,Answer' 	) + "&" + 
+
+		"Action-000017=append&Cat-000017=" + asterisk-guitools + "&Var-000017=exten&Value-000017=" +
+		encodeURI(		'play_file,n,Playback(${var1})' 	) + "&" + 
+
+		"Action-000018=append&Cat-000018=" + asterisk-guitools + "&Var-000018=exten&Value-000018=" +
+		encodeURI(		'play_file,n,Hangup'  )  ;
+
+		var tmp = new Ajax.Request("../../rawman", opt);
+
+	/*
+	exten => 
+*/
+		
+	}
+
+	function getextconf(){
+		var opt = {
+			method: 'get',
+			asynchronous: true,
+			onComplete: showExtconfig
+		};
+		opt.parameters="action=getconfig&filename=extensions.conf" ;
+		var tmp = new Ajax.Request("../../rawman", opt);
+	}
+
+	function showExtconfig(originalRequest){
+		// now parse the output and search for [gui-tools]
+		var lines = originalRequest.responseText.split("\n");
+		for( var i=0 ; i < lines.length ; i++){
+				if ( lines[i].substr(0,9) == "Category-"  ){
+					var tmp = lines[i].split(": ");
+					if( tmp[1].match(asterisk-guitools) ){
+						alert("Already Installed");
+						return false;
+					}
+					cats.push(tmp[1]);
+				}
 		}
+		
+		// Install the [asterisk-guitools] section in extensions.conf
+		installguitools();
 	}
 	
-	function loggedOn() {
-		if ((parent.loggedon == 1) && (localloggedon == 1))
-			return;
-		parent.setLoggedOn(1);
-		localloggedon = 1;
-		updateButtons();
-		$('statusbar').innerHTML = "<i>Connected!</i>";
-		parent.document.getElementById('logoutlink').innerHTML = "Logout";
-		parent.document.getElementById('logoutlink').onclick = parent.Logoff ;
-		parent.astmanEngine.pollEvents();
+
+	function doLogin(){
+			var opt = {
+				method: 'get',
+				asynchronous: true,
+				onComplete: showResponse
+			};
+			opt.parameters="action=login&reload=yes&username="+ $('username').value + "&secret=" + $('secret').value ;
+			var tmp = new Ajax.Request("../../rawman", opt);
 	}
-	
-	function loggedOff() {
-		if ((parent.loggedon == 0) && (localloggedon == 0))
-			return;
-		parent.setLoggedOn(0);
-		parent.document.getElementById('logoutlink').innerHTML = "&nbsp;";
-		localloggedon = 0;
-		updateButtons();
-	}
-	
-	demo.logoffs = function(msgs) {
-		$('statusbar').innerHTML = msgs[0].headers['message'];
-		loggedOff();
-	};
 
-	demo.logins = function(msgs) {
-		$('statusbar').innerHTML = msgs[0].headers['message'];
-		resp = msgs[0].headers['response'];
-		if (resp == "Success")
-			loggedOn();
-		else
-			loggedOff();
-	};
-	
-	demo.pongs  = function(msgs) {
-		resp = msgs[0].headers['response'];
-		if (resp == "Pong") {
-			$('statusbar').innerHTML = "<i>Already connected...</i>";
-			loggedOn();
-		} else {
-			$('statusbar').innerHTML = "<i>Please login...</i>";
-			loggedOff();
+	function showResponse(originalRequest){
+		if ( originalRequest.responseText.match("Success") ) {
+			getextconf();
+			// user authenticated .. check if [tools] is installed in extensions.conf ( we probably need astman.js to do this)
+			// if not then install the [tools]
 		}
 	}
 
-	function localajaxinit() {
-		parent.loadscreen(this);
+
+
+	function install(){
+			var opt = {
+				method: 'get',
+				asynchronous: true,
+				onComplete: doLogin
+			};
+			opt.parameters="action=logoff" ;
+			var tmp = new Ajax.Request("../../rawman", opt);
 	}
 
-	function doLogin() {
-		$('statusbar').innerHTML = "<i>Logging in...</i>";
-		parent.astmanEngine.sendRequest('action=login&username=' + $('username').value + "&secret=" + $('secret').value, demo.logins);
-	}
-	
-	function doLogoff() {
-		$('statusbar').innerHTML = "<i>Logging off...</i>";
-		parent.astmanEngine.sendRequest('action=logoff', demo.logoffs);
-	}
-	function localajaminit() {	
-		parent.astmanEngine.sendRequest('action=ping', demo.pongs);
-	}
+
 	function localinit() {
-		localajaxinit();
-		localajaminit();
+
 	}
 
 </script>
-
-
-<body id="foo" onload="localinit()" topmargin=0  bgcolor="EFEFEF">
-<div class="mainscreenTitleBar">
-	<span style="margin-left: 4px;font-weight:bold">Welcome to the Asterisk Configuration Panel</span>
-</div>
-<div class="mainscreenContentBox" id="mailboxcontent">
-<table class="mainscreenTable" width="100%">
-	<tr valign="top">
-		<td colspan=2>
-			<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></tr>
-				<tr><td>Secret:</td><td><input disabled=1 type="password" id="secret" class="input9" size=12></td></tr>
-				<tr><td colspan=2 align="center">
-				  <div id="statusbar">
-					<span style="margin-left: 4px;font-weight:bold">&nbsp;</span>
-				  </div>
-				</td></tr>
-
-				<tr><td align='center' colspan='2'>
-							<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">
-
-							<div style="display:none">
-									<TABLE cellpadding=2 cellspacing=1 border=0 bgcolor="#D7D7D7" width=400>
-									<TR><TD bgcolor="#F3F5F6" height="25"><font face="arial" size="2" color="#727986"><B>&nbsp;&nbsp;&nbsp;Welcome to Asterisk GUI</B></font></TD></TR>
-									<TR><TD bgcolor="#FFFFFF">
-												<div ><font face="arial" size="2" color="#727986">Welcome to Asterisk Configuration GUI - You can do blah blah blah using this tool. If you need help or further explanation about anything, just move your mouse on to the field and a brief description about the item will be displayed in the tooltip area.</font>
-												</div>
-												</TD>
-									</TR>
-									</TABLE>
-							</div>
-
-						</td>
-				</tr>
-			</table>
-		</td>
+<body id="foo" onload="localinit()" topmargin=0  bgcolor="FFFFFF">
+<BR>
+<h2>Asterisk&trade; Configuration Engine</h2>
+<BR><BR>
+<center>
+	<span style="margin-left: 4px;font-weight:bold"> This would install a 'asterisk-guitools' context in your extensions.conf </span><BR>
+	Please enter your username and password defined in manager.conf
+<center>
+<BR>
+<table align="center">
+	<tr><td>Username:</td>
+			<td><input id="username"  size=12></td>
+	</tr>
+	<tr><td>Secret:</td>
+			<td><input type="password" id="secret" size=12></td>
+	</tr>
+	<tr><td align='center' colspan='2'>
+				<input type="button" id="login" value="Install" onClick="install()" >
+			</td>
 	</tr>
 </table>
-</div>
-</body>
+</body>

Modified: trunk/config/sysinfo.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/sysinfo.html?view=diff&rev=120&r1=119&r2=120
==============================================================================
--- trunk/config/sysinfo.html (original)
+++ trunk/config/sysinfo.html Thu Nov  9 15:28:40 2006
@@ -124,7 +124,7 @@
 				alert("Config Error: " + t.status + ": " + t.statusText);
 			}
 		};
-		opt.parameters="action=originate&channel=" + encodeURIComponent("Local/sysinfo at tools") + "&application=noop&timeout=60000";
+		opt.parameters="action=originate&channel=" + encodeURIComponent("Local/sysinfo@"+asterisk-guitools) + "&application=noop&timeout=60000";
 		var tmp = new Ajax.Request("../../rawman", opt);
 		return;
 }

Modified: trunk/config/voicemail.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/voicemail.html?view=diff&rev=120&r1=119&r2=120
==============================================================================
--- trunk/config/voicemail.html (original)
+++ trunk/config/voicemail.html Thu Nov  9 15:28:40 2006
@@ -137,7 +137,7 @@
 		for( var i=0; i < fields_to_disable.length; i ++ ){
 				$(fields_to_disable[i]).disabled = false;
 		}
-		$('cancel').disabled = false;
+		//$('cancel').disabled = false;
 	}
 
 	callbacks.identifier = "extension";
@@ -246,7 +246,7 @@
 										<table cellspacing='0' cellpadding='0'>
 											<tr valign="top"><td>
 																			<table>
-																					<tr onmouseover="show_tooltip('en', 'voicemail', 0);" ><td class="field_text">Extension for checking messages:</td><td>&nbsp;<input size='5' id='name' pattern='^\d*$' class="input8"></td></tr>
+																					<tr onmouseover="show_tooltip('en', 'voicemail', 0);" ><td class="field_text">Extension for checking messages:</td><td>&nbsp;<input size='5' id='name' pattern='^\d*$' onKeyUp="$('cancel').disabled=false;" class="input8" ></td></tr>
 																					<tr onmouseover="show_tooltip('en', 'voicemail', 1);" ><td class="field_text">Attach recordings to e-mail:</td><td><input type='checkbox' id='attach'></td></tr>
 																					<tr onmouseover="show_tooltip('en', 'voicemail', 2);" ><td class="field_text">Say message Caller-ID:</td><td><input type='checkbox' id='saycid'></td></tr>
 																					<tr onmouseover="show_tooltip('en', 'voicemail', 3);" ><td class="field_text">Say message duration:</td><td><input type='checkbox' id='sayduration'></td></tr>



More information about the asterisk-gui-commits mailing list