pari: branch appliance r376 - in /branches/appliance: ./ config/ config/scrip...

asterisk-gui-commits at lists.digium.com asterisk-gui-commits at lists.digium.com
Wed Feb 21 11:19:48 MST 2007


Author: pari
Date: Wed Feb 21 12:19:47 2007
New Revision: 376

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=376
Log:
Merged revisions 349-354,356-361,365,374-375 via svnmerge from 
https://origsvn.digium.com/svn/asterisk-gui/trunk

........
r349 | pari | 2007-02-15 22:00:58 -0600 (Thu, 15 Feb 2007) | 1 line

Removing alert that zapscan.conf is not found - Some one the forums complained that the gui is constantly throwing an alert that zapscan.conf is not found. So, this commit is for those people who are totally new to linux & asterisk and do not know to 'touch a missing file that the gui just complained about' - the gui now creates the required missing file 
........
r350 | pari | 2007-02-16 00:03:02 -0600 (Fri, 16 Feb 2007) | 1 line

fix: When 'No Changes made' - only save button is being disabled, but not the cancel button
........
r351 | pari | 2007-02-16 00:44:49 -0600 (Fri, 16 Feb 2007) | 1 line

fix: Save and cancel buttons are being enabled When keys like CTRL or CAPSLOCK are pressed
........
r352 | pari | 2007-02-16 12:24:29 -0600 (Fri, 16 Feb 2007) | 1 line

Added fromuser and contact fields - requested in http://bugs.digium.com/view.php?id=8854 
........
r353 | pari | 2007-02-16 12:59:35 -0600 (Fri, 16 Feb 2007) | 1 line

minor improvements to hover tab colors 
........
r354 | pari | 2007-02-16 13:21:04 -0600 (Fri, 16 Feb 2007) | 1 line

making some room so that we can add more options to the page in future
........
r356 | pari | 2007-02-17 14:03:01 -0600 (Sat, 17 Feb 2007) | 1 line

Allow Alphanumeric extensions for users who want to create SIP/IAX only extensions
........
r357 | pari | 2007-02-17 15:16:55 -0600 (Sat, 17 Feb 2007) | 1 line

setting default values that make more sense
........
r358 | pari | 2007-02-17 15:42:36 -0600 (Sat, 17 Feb 2007) | 1 line

fixing queues.html so that it would be compatible with the alphanumeric extensions as well. Note: The GUI does not yet provide a way for the agents to login
........
r359 | pari | 2007-02-17 23:14:43 -0600 (Sat, 17 Feb 2007) | 1 line

Handle the case where a calling rule is defined outside the GUI 
........
r360 | pari | 2007-02-18 02:28:31 -0600 (Sun, 18 Feb 2007) | 1 line

Donot allow a duplicate calling rules
........
r361 | pari | 2007-02-19 08:56:53 -0600 (Mon, 19 Feb 2007) | 1 line

fix for the bug reported in http://forums.digium.com/viewtopic.php?t=13698 
........
r365 | pari | 2007-02-19 12:47:40 -0600 (Mon, 19 Feb 2007) | 1 line

if contactinfo.conf or zapscan.conf are not found .. create those files without throwing an error at the user 
........
r374 | pari | 2007-02-20 13:11:24 -0600 (Tue, 20 Feb 2007) | 1 line

document Titles for all pages in the GUI
........
r375 | pari | 2007-02-20 13:15:02 -0600 (Tue, 20 Feb 2007) | 1 line

wrong place
........

Modified:
    branches/appliance/   (props changed)
    branches/appliance/config/backup.html
    branches/appliance/config/home.html
    branches/appliance/config/homeapp.html
    branches/appliance/config/iax.html
    branches/appliance/config/incoming.html
    branches/appliance/config/jabber.html
    branches/appliance/config/jingle.html
    branches/appliance/config/localexts.html
    branches/appliance/config/meetme.html
    branches/appliance/config/menus.html
    branches/appliance/config/moh.html
    branches/appliance/config/networking.html
    branches/appliance/config/numberplan.html
    branches/appliance/config/options.html
    branches/appliance/config/queues.html
    branches/appliance/config/record.html
    branches/appliance/config/scripts/astman.js
    branches/appliance/config/setup/3.html
    branches/appliance/config/setup/6.html
    branches/appliance/config/sip.html
    branches/appliance/config/status.html
    branches/appliance/config/stylesheets/rico.css
    branches/appliance/config/stylesheets/schwing.css
    branches/appliance/config/sysinfo.html
    branches/appliance/config/trunks.html
    branches/appliance/config/users.html
    branches/appliance/config/voicemail.html
    branches/appliance/config/zapata.html

Propchange: branches/appliance/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Feb 21 12:19:47 2007
@@ -1,1 +1,1 @@
-/trunk:1-347
+/trunk:1-375

Modified: branches/appliance/config/backup.html
URL: http://svn.digium.com/view/asterisk-gui/branches/appliance/config/backup.html?view=diff&rev=376&r1=375&r2=376
==============================================================================
--- branches/appliance/config/backup.html (original)
+++ branches/appliance/config/backup.html Wed Feb 21 12:19:47 2007
@@ -28,6 +28,7 @@
 var bkpfile ;
 
 function localajaxinit() {
+	setWindowTitle("Backup");
 	parent.loadscreen(this);
 	$('status_message').style.top  = 	100;
 	$('status_message').style.left  = 	100;

Modified: branches/appliance/config/home.html
URL: http://svn.digium.com/view/asterisk-gui/branches/appliance/config/home.html?view=diff&rev=376&r1=375&r2=376
==============================================================================
--- branches/appliance/config/home.html (original)
+++ branches/appliance/config/home.html Wed Feb 21 12:19:47 2007
@@ -143,6 +143,7 @@
 		parent.astmanEngine.sendRequest('action=ping', demo.pongs);
 	}
 	function localinit() {
+		top.document.title = "Asterisk GUI (Beta) -- Home";
 		localajaminit();
 	}
 

Modified: branches/appliance/config/homeapp.html
URL: http://svn.digium.com/view/asterisk-gui/branches/appliance/config/homeapp.html?view=diff&rev=376&r1=375&r2=376
==============================================================================
--- branches/appliance/config/homeapp.html (original)
+++ branches/appliance/config/homeapp.html Wed Feb 21 12:19:47 2007
@@ -151,6 +151,7 @@
 		parent.astmanEngine.sendRequest('action=ping', demo.pongs);
 	}
 	function localinit() {
+		top.document.title = "Asterisk GUI (Beta) -- Home";
 		localajaxinit();
 		localajaminit();
 	}

Modified: branches/appliance/config/iax.html
URL: http://svn.digium.com/view/asterisk-gui/branches/appliance/config/iax.html?view=diff&rev=376&r1=375&r2=376
==============================================================================
--- branches/appliance/config/iax.html (original)
+++ branches/appliance/config/iax.html Wed Feb 21 12:19:47 2007
@@ -51,6 +51,7 @@
 
 
 function localajaxinit(){
+	setWindowTitle("IAX");
 	parent.loadscreen(this);
 		for (var x =0; x< fieldnames.length; x++ ) {
 			widgets[fieldnames[x]] = $(fieldnames[x]);

Modified: branches/appliance/config/incoming.html
URL: http://svn.digium.com/view/asterisk-gui/branches/appliance/config/incoming.html?view=diff&rev=376&r1=375&r2=376
==============================================================================
--- branches/appliance/config/incoming.html (original)
+++ branches/appliance/config/incoming.html Wed Feb 21 12:19:47 2007
@@ -454,6 +454,7 @@
 
 
 function localajaxinit() {
+	setWindowTitle("Incoming Calls");
 	for (var x =0; x < focus_fields.length; x++ ) {
 		$(focus_fields[x]).onfocus = function(){this.className = 'input9_hilight';}
 		$(focus_fields[x]).onblur = function(){this.className = 'input9';}

Modified: branches/appliance/config/jabber.html
URL: http://svn.digium.com/view/asterisk-gui/branches/appliance/config/jabber.html?view=diff&rev=376&r1=375&r2=376
==============================================================================
--- branches/appliance/config/jabber.html (original)
+++ branches/appliance/config/jabber.html Wed Feb 21 12:19:47 2007
@@ -52,6 +52,7 @@
 
 
 function localajaxinit() {
+		setWindowTitle("Jabber");
 		// Load the jabber.conf->users into the Users, associate the field to other fields
 		parent.loadscreen(this);
 		for (var x =0; x < fieldnames.length; x++) {

Modified: branches/appliance/config/jingle.html
URL: http://svn.digium.com/view/asterisk-gui/branches/appliance/config/jingle.html?view=diff&rev=376&r1=375&r2=376
==============================================================================
--- branches/appliance/config/jingle.html (original)
+++ branches/appliance/config/jingle.html Wed Feb 21 12:19:47 2007
@@ -157,6 +157,7 @@
 }
 
 function localajaxinit() {
+			setWindowTitle("Jingle");
 			// Load the jabber.conf->users into the Users, associate the field to other fields
 			parent.loadscreen(this);
 			for (var x =0; x < fieldnames.length; x++) {

Modified: branches/appliance/config/localexts.html
URL: http://svn.digium.com/view/asterisk-gui/branches/appliance/config/localexts.html?view=diff&rev=376&r1=375&r2=376
==============================================================================
--- branches/appliance/config/localexts.html (original)
+++ branches/appliance/config/localexts.html Wed Feb 21 12:19:47 2007
@@ -26,7 +26,7 @@
 <link href="stylesheets/schwing.css" media="all" rel="Stylesheet" type="text/css" />
 <script>
 var usercallbacks = new Object;
-var fieldnames = new Array('status', 'save','userbase','localextenlength','allow_aliasextns','vmsecret','hasvoicemail','hasdirectory','hassip','hasiax','hasmanager','callwaiting','threewaycalling','hasagent','cancel');
+var fieldnames = new Array('status', 'save','userbase','localextenlength','allow_aliasextns','vmsecret','hasvoicemail','hasdirectory','hassip','hasiax','hasmanager','callwaiting','threewaycalling','hasagent','cancel','allow_an_extns');
 var widgets = new Array;
 var focus_fields = new Array('localextenlength','userbase','vmsecret');
 
@@ -80,6 +80,7 @@
 
 
 function localajaxinit(){
+			setWindowTitle("Local Extension Settings");
 			for (var x =0 ; x < fieldnames.length ; x++ ) {
 				widgets[fieldnames[x]] = $(fieldnames[x]);
 				widgets[fieldnames[x]].disabled = true;
@@ -118,9 +119,9 @@
 <div class="mainscreenContentBox" id="userscontent">
 <TABLE align=center width="520" cellpadding=0 cellspacing=0 style="margin: 5px 0 0 0;">
 <TR>
-	<TD valign="bottom" align="center" class="tab"><a href="#" class="tab" style="border-bottom: 4px solid #000000; font-weight:bold; background: #FFFFFF; font-size: 13px">Local Extension settings</a></TD>
-	<TD><a href="options.html" class="tab" style="border-bottom: 0px solid #777788; font-weight:bold; background: #DDDDEE; font-size: 11px">Change Password</a></TD>
-	<TD valign="bottom" align="left"><a href="#" class="tab" onclick="tosetup();"  style="border-bottom: 0px solid #777788; font-weight:bold; background: #DDDDEE; font-size: 11px">Run Setup Wizard</a></TD> 
+	<TD valign="bottom" align="center" class="tab"><a href="#" class="tabselected">Local Extension settings</a></TD>
+	<TD><a href="options.html" class="tab">Change Password</a></TD>
+	<TD valign="bottom" align="left"><a href="#" class="tab" onclick="tosetup();">Run Setup Wizard</a></TD> 
 </TR>
 </TABLE>
 <BR>
@@ -130,28 +131,51 @@
 	<fieldset  style="width: 400px">
 		<legend>&nbsp;Local Extension Settings:&nbsp;</legend>
 		<table align='center'  width='390'  cellpadding=2 cellspacing=1>
-				<tr ><td class="field_text">
+				<tr ><td class="field_text" align=left>
 							Local Extensions are 
 							<select id="localextenlength" class="input9">
 								<option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option>
 							</select> digits long&nbsp;</td>
 				</tr>
-				<tr ><td class="field_text">Starting point of Allocation of extensions : <input type=text id="userbase" size=5  class="input9"></td></tr>
-				<tr ><td class="field_text" align="center"><input type=checkbox id="allow_aliasextns">Allow analog phones to be assigned to multiple extensions</td></tr>
+				<tr ><td class="field_text" align=left>Starting point of Allocation of extensions : <input type=text id="userbase" size=5  class="input9"></td></tr>
+				<tr ><td class="field_text" align="left"><input type=checkbox id="allow_aliasextns">Allow analog phones to be assigned to multiple extensions</td></tr>
+				<tr ><td class="field_text" align="left"><input type=checkbox id="allow_an_extns">Allow extensions to be AlphaNumeric (SIP/IAX users)</td></tr>
 			</table>
 	</fieldset><BR>
 	<fieldset style="width: 400px">
 		<legend>&nbsp;Default Settings for a New User:&nbsp;</legend>
 				<table align='center'  width='390'  cellpadding=2 cellspacing=1>
-				<tr onmouseover="show_tooltip('en', 'users', 16);"><td class="field_text" align="right">VM Password:</td><td><input size='5' id='vmsecret' pattern='^[0-9*]*$'  class="input8"></td></tr>
-				<tr onmouseover="show_tooltip('en', 'users', 8);"><td class="field_text" align="right">Voicemail:</td><td><input type='checkbox' id='hasvoicemail'></td></tr>
-				<tr onmouseover="show_tooltip('en', 'users', 9);"><td class="field_text"  align="right">In Directory:</td><td><input type='checkbox' id='hasdirectory'></td></tr>
-				<tr onmouseover="show_tooltip('en', 'users', 10);"><td class="field_text" align="right">SIP:</td><td><input type='checkbox' id='hassip'></td></tr>
-				<tr onmouseover="show_tooltip('en', 'users', 11);"><td class="field_text" align="right">IAX:</td><td><input type='checkbox' id='hasiax'></td></tr>
-				<tr onmouseover="show_tooltip('en', 'users', 12);"><td class="field_text" align="right">CTI:</td><td><input type='checkbox' id='hasmanager'></td></tr>
-				<tr onmouseover="show_tooltip('en', 'users', 13);"><td class="field_text" align="right">Call&nbsp;Waiting:</td><td><input type='checkbox' id='callwaiting'></td></tr>
-				<tr onmouseover="show_tooltip('en', 'users', 14);"><td class="field_text" align="right">3-Way&nbsp;Calling:</td><td><input type='checkbox' id='threewaycalling'></td></tr>
-				<tr onmouseover="show_tooltip('en', 'users', 15);"><td class="field_text" align="right">Is&nbsp;Agent:</td><td><input type='checkbox' id='hasagent' dfalt='1'><input type='hidden' dfalt='dynamic' id='host'></td>
+
+				<tr>			<td onmouseover="show_tooltip('en', 'users', 15);" class="field_text" align="right"><input type='checkbox' id='hasagent'></td>
+								<td onmouseover="show_tooltip('en', 'users', 15);" class="field_text" >Is Agent</td>
+								<td onmouseover="show_tooltip('en', 'users', 8);" align=right><input type='checkbox' id='hasvoicemail'></td>
+								<td onmouseover="show_tooltip('en', 'users', 8);" class="field_text" align="left">Voicemail</td>
+				</tr>
+				
+				
+				<tr>			<td onmouseover="show_tooltip('en', 'users', 9);" class="field_text" align="right"><input type='checkbox' id='hasdirectory'></td>
+								<td onmouseover="show_tooltip('en', 'users', 9);" class="field_text" >In Directory</td>
+								<td onmouseover="show_tooltip('en', 'users', 12);" align=right><input type='checkbox' id='hasmanager'></td>
+								<td onmouseover="show_tooltip('en', 'users', 12);" class="field_text" align="left">CTI</td>
+				</tr>
+
+				<tr>			<td onmouseover="show_tooltip('en', 'users', 10);" class="field_text" align="right"><input type='checkbox' id='hassip'></td>
+								<td onmouseover="show_tooltip('en', 'users', 10);"  class="field_text" >SIP</td>
+								<td onmouseover="show_tooltip('en', 'users', 11);" align=right><input type='checkbox' id='hasiax'></td>
+								<td onmouseover="show_tooltip('en', 'users', 11);" class="field_text" align="left">IAX</td>
+				</tr>
+
+				<tr>			<td onmouseover="show_tooltip('en', 'users', 13);" class="field_text" align="right"><input type='checkbox' id='callwaiting'></td>
+								<td onmouseover="show_tooltip('en', 'users', 13);" class="field_text" >Call Waiting</td>
+								<td onmouseover="show_tooltip('en', 'users', 14);" align=right><input type='checkbox' id='threewaycalling'></td>
+								<td onmouseover="show_tooltip('en', 'users', 14);" class="field_text" align="left">3-Way&nbsp;Calling</td>
+				</tr>
+
+				<tr>			
+								<td onmouseover="show_tooltip('en', 'users', 16);" align=right><input size='3' id='vmsecret' pattern='^[0-9*]*$'  class="input9">&nbsp;</td>
+								<td onmouseover="show_tooltip('en', 'users', 16);" class="field_text" align="left">VoiceMail Password</td>
+								<td align=right></td>
+								<td  class="field_text" align="left"></td>
 				</tr>
 				</table>
 	</fieldset>

Modified: branches/appliance/config/meetme.html
URL: http://svn.digium.com/view/asterisk-gui/branches/appliance/config/meetme.html?view=diff&rev=376&r1=375&r2=376
==============================================================================
--- branches/appliance/config/meetme.html (original)
+++ branches/appliance/config/meetme.html Wed Feb 21 12:19:47 2007
@@ -353,6 +353,7 @@
 		}
 	}
 	function localajaxinit() {
+		setWindowTitle("Conferencing");
 		$('advancedw').style.overflow = "hidden";
 		$('advancedw').style.height = 1;
 		$('advancedw').style.width = $('split').style.width;

Modified: branches/appliance/config/menus.html
URL: http://svn.digium.com/view/asterisk-gui/branches/appliance/config/menus.html?view=diff&rev=376&r1=375&r2=376
==============================================================================
--- branches/appliance/config/menus.html (original)
+++ branches/appliance/config/menus.html Wed Feb 21 12:19:47 2007
@@ -934,6 +934,7 @@
 
 
 function localajaxinit() {
+		setWindowTitle("Voice Menus");
 		$('message_text').innerHTML ="Saving Changes...";
 		for (x =0 ; x<fieldnames.length; x++){
 			widgets[fieldnames[x]] = $(fieldnames[x]);
@@ -1077,7 +1078,7 @@
 									<option value="GotoExtension">Goto Extension</option>
 									<option value="Hangup">Hangup</option>
 								</select>&nbsp;
-								<input type=text id="newstep_var" style="display:none" size=4 disabled>
+								<input type=text id="newstep_var" style="display:none" size=4 disabled class="input8">
 								<select id='add_newstep_extensions' style="display:none"   onChange=" $('newstep_var').value = $('add_newstep_extensions').value;"   class="input8"></select>
 								<select id='add_newstep_menus' style="display:none"    onChange=" $('newstep_var').value = $('add_newstep_menus').value;"   class="input8"></select>
 											<div id="combodiv_sounds">

Modified: branches/appliance/config/moh.html
URL: http://svn.digium.com/view/asterisk-gui/branches/appliance/config/moh.html?view=diff&rev=376&r1=375&r2=376
==============================================================================
--- branches/appliance/config/moh.html (original)
+++ branches/appliance/config/moh.html Wed Feb 21 12:19:47 2007
@@ -43,6 +43,7 @@
 }
 
 function localajaxinit() {
+			setWindowTitle("Music on Hold");
 			// Load the jabber.conf->users into the Users, associate the field to other fields
 			parent.loadscreen(this);
 			for (var x =0; x < fieldnames.length; x++) {

Modified: branches/appliance/config/networking.html
URL: http://svn.digium.com/view/asterisk-gui/branches/appliance/config/networking.html?view=diff&rev=376&r1=375&r2=376
==============================================================================
--- branches/appliance/config/networking.html (original)
+++ branches/appliance/config/networking.html Wed Feb 21 12:19:47 2007
@@ -89,6 +89,7 @@
 	}
 	
 	function localajaxinit() {
+		setWindowTitle("Network Settings");
 		$('advancedw').style.overflow = "hidden";
 		$('advancedw').style.height = 1;
 		$('advancedw').style.width = $('split').width;

Modified: branches/appliance/config/numberplan.html
URL: http://svn.digium.com/view/asterisk-gui/branches/appliance/config/numberplan.html?view=diff&rev=376&r1=375&r2=376
==============================================================================
--- branches/appliance/config/numberplan.html (original)
+++ branches/appliance/config/numberplan.html Wed Feb 21 12:19:47 2007
@@ -60,6 +60,7 @@
 
 function add_callingrule(){
 	isnewrule = true;
+	iscustom = false;
 	$('rulename').value = "";
 	$('trunks').selectedIndex = -1 ;
 	$('pattern').value = "";
@@ -120,8 +121,6 @@
 						var commentstring = "custom";
 					}else{
 						var commentstring = "standard";
-						//build a pattern into $('pattern').value
-						buildpatternstring();
 					}
 
 					var rule_string = $('pattern').value + ',' + this_priority + ',Macro(trunkdial,${' + $('trunks').value + '}/'+ $('prepend').value +'${EXTEN:' + $('strip').value + '})' ;
@@ -140,7 +139,7 @@
 									}
 									m[$('pattern').value][this_priority] = new ruleinanpdata($('trunks').value, $('strip').value, $('prepend').value);
 									m[$('pattern').value][this_priority].rulename =  $('rulename').value ; 
-									m[$('pattern').value][this_priority].ruledesc = parsepattern($('pattern').value,0) ;
+									m[$('pattern').value][this_priority].ruledesc = (iscustom) ? "custom" : parsepattern($('pattern').value,0) ;
 									oncomplete(); 
 						},
 						onFailure: function(t) {
@@ -156,15 +155,24 @@
 
 function saverule(){
 	if ( !checkfields() ) return false;
+	if( !iscustom){
+		buildpatternstring();
+	}
 	 if(isnewrule){ 
 					var newpriority=1;
 					var m = numberplansdata[$('extensions').value]['npdata'];
-					if( typeof m[$('pattern').value] !="undefined" ){
-						for ( var y in m[$('pattern').value] ){
-							if ( y == "extend"){break;}
-							newpriority++;
-						}
+
+					if(  m.hasOwnProperty($('pattern').value)  && m[$('pattern').value].hasOwnProperty(''+newpriority)  ) { 
+						alert("A rule for this pattern is already defined !") ; 
+						return ;
 					}
+
+//					if( typeof m[$('pattern').value] !="undefined" ){
+//						for ( var y in m[$('pattern').value] ){
+//							if ( m[$('pattern').value].hasOwnProperty( y ) ){break;}
+//							newpriority++;
+//						}
+//					}
 					add_rule_fromeditform( newpriority, oncomplete = function(){ show_npdata_table( $('extensions').value ); } );
 	 }else{	// update exiting rule
 			// delete existing rule
@@ -206,6 +214,8 @@
 			}
 			for ( k =0 ; k < z['npcomments'].length ; k++ ){
 					var temp = z['npcomments'][k].split(","); 
+					if( typeof y[temp[0]] == "undefined"){ continue ; }
+					if ( typeof y[temp[0]][temp[1]]  == "undefined" ){  continue ; }
 					y[temp[0]][temp[1]].rulename = temp[2] ;
 					if(temp[3] !="custom")
 						y[temp[0]][temp[1]].ruledesc = parsepattern(temp[0],0) ;
@@ -244,7 +254,7 @@
 								addrowtotable( x , sorted_priorities[z] , "undefined" , m[x][sorted_priorities[z]].digits2strip );
 						}else if(trunk_exists == 0){
 								rules_nosp.push(m[x][sorted_priorities[z]].rulename) ;
-								$('trunks').selectedIndex = -1;							
+								//$('trunks').selectedIndex = -1;							
 								addrowtotable( x , sorted_priorities[z] , "invalid" , m[x][sorted_priorities[z]].digits2strip );							
 						}else{
 								addrowtotable( x , sorted_priorities[z] , m[x][sorted_priorities[z]].trunk , m[x][sorted_priorities[z]].digits2strip );
@@ -330,11 +340,12 @@
 		newCell0.align="center";
 
 		var newCell1 = newRow.insertCell(1);
-		newCell1.innerHTML =  m[a][b].rulename ; 
+		newCell1.innerHTML =  (m[a][b].rulename) ? m[a][b].rulename : "Not Defined" ; 
 		newCell1.width=90;
 
 		var newCell2 = newRow.insertCell(2);
-		newCell2.innerHTML =  m[a][b].ruledesc ; 
+		newCell2.innerHTML =  (m[a][b].ruledesc) ? m[a][b].ruledesc : a ; 
+		if(newCell2.innerHTML == "custom"){ newCell2.innerHTML = "custom ("+ a + ")"; }
 
 		if(c == "invalid" || c== "undefined"  ){
 			var newCell3 = newRow.insertCell(3);
@@ -412,9 +423,11 @@
 		$('strip').value = m[a][b].digits2strip;
 		$('prepend').value = m[a][b].prepend;
 		$('save_a').disabled = 1;
-		if( m[a][b].ruledesc == 'custom' ){
+		if( m[a][b].ruledesc == 'custom' || !m[a][b].ruledesc ){
 			// if this is a custom pattern then donot try to parse the pattern
 			iscustom = true;
+			(m[a][b].rulename) ? $('rulename').value = m[a][b].rulename : $('rulename').value = "";
+			m[a][b].ruledesc = 'custom' ;
 			$('define_advanced').style.display="";
 			$('define_usual').style.display="none";
 		}else{
@@ -555,6 +568,7 @@
 }
 
 function localajaxinit(){
+	setWindowTitle("Calling Rules");
 	for (var x =0; x < fieldnames.length; x++ ) {
 		widgets[fieldnames[x]] = $(fieldnames[x]);
 		widgets[fieldnames[x]].disabled = true;

Modified: branches/appliance/config/options.html
URL: http://svn.digium.com/view/asterisk-gui/branches/appliance/config/options.html?view=diff&rev=376&r1=375&r2=376
==============================================================================
--- branches/appliance/config/options.html (original)
+++ branches/appliance/config/options.html Wed Feb 21 12:19:47 2007
@@ -214,6 +214,7 @@
 }
 
 function localajaxinit(){
+	setWindowTitle("Options");
 	for (var x =0; x < fieldnames.length; x++) {
 		widgets[fieldnames[x]] = $(fieldnames[x]);
 		widgets[fieldnames[x]].disabled = true;
@@ -237,9 +238,9 @@
 
 <TABLE align=center width="520" cellpadding=0 cellspacing=0 style="margin: 5px 0 0 0;">
 <TR>
-	<TD valign="bottom" align="center"><a href="localexts.html" class="tab" style="border-bottom: 0px solid #777788; font-weight:bold; background: #DDDDEE; font-size: 11px">Local Extension settings</a></TD>
-	<TD><a href="#" class="tab" style="border-bottom: 4px solid #000000; font-weight:bold; background: #FFFFFF; font-size: 13px">Change Password</a></TD>
-	<TD valign="bottom" align="left"><a href="#" onclick="tosetup();" class="tab" style="border-bottom: 0px solid #777788; font-weight:bold; background: #DDDDEE; font-size: 11px">Run Setup Wizard</a></TD> 
+	<TD valign="bottom" align="center"><a href="localexts.html" class="tab">Local Extension settings</a></TD>
+	<TD><a href="#" class="tabselected">Change Password</a></TD>
+	<TD valign="bottom" align="left"><a href="#" onclick="tosetup();" class="tab">Run Setup Wizard</a></TD> 
 </TR>
 </TABLE>
 <BR>

Modified: branches/appliance/config/queues.html
URL: http://svn.digium.com/view/asterisk-gui/branches/appliance/config/queues.html?view=diff&rev=376&r1=375&r2=376
==============================================================================
--- branches/appliance/config/queues.html (original)
+++ branches/appliance/config/queues.html Wed Feb 21 12:19:47 2007
@@ -202,7 +202,7 @@
 				q =0;
 				for (k=0;k< $('agents').length ;k++ ){
 						if( $('agents').options[k].selected ){
-							queueagents [r][q] = $('agents').options[k].innerHTML.substr(0,localextenlength);
+							queueagents [r][q] = $('agents').options[k].innerHTML.split(' -- ')[0] ;
 							q = q+1;
 						}
 				}
@@ -229,7 +229,7 @@
 				for (k=0;k< $('agents').length ;k++ ){
 						selectedagent = "selectedagent" + k;
 						if( $(selectedagent).checked  ){
-							queueagents [j][q] = $('agents').options[k].innerHTML.substr(0,localextenlength);
+							queueagents [j][q] = $('agents').options[k].innerHTML.split(' -- ')[0] ;
 							$('agents').options[k].selected = true;
 							q = q+1;
 						}else{
@@ -350,13 +350,13 @@
 		$('testmulti').innerHTML ="";		
 		for (k=0;k< $('agents').length ;k++ ){
 			selectedagent = "selectedagent" + k;
-			if( InArray( queueagents [j], $('agents').options[k].innerHTML.substr(0,localextenlength) ) ){
+			var str_checked = "";
+			$('agents').options[k].selected = false;
+			if( InArray( queueagents [j], $('agents').options[k].innerHTML.split(' -- ')[0] ) ){
 				$('agents').options[k].selected = true;	
-				$('testmulti').innerHTML += '<LABEL FOR=' + selectedagent + '><INPUT id="' + selectedagent + '" TYPE="CHECKBOX" VALUE="'+ $('agents').options[k].innerHTML.substr(0,localextenlength) + '" checked onclick="$(\'save_q\').disabled=false; $(\'cancel\').disabled=false;">&nbsp;' + $('agents').options[k].innerHTML.substr(localextenlength+4) +' (' + $('agents').options[k].innerHTML.substr(0,localextenlength) + ')' + '</LABEL><BR>';
-			}else{
-				$('agents').options[k].selected = false;
-				$('testmulti').innerHTML += '<LABEL FOR=' + selectedagent + '><INPUT id="' + selectedagent + '" TYPE="CHECKBOX" VALUE="'+ $('agents').options[k].innerHTML.substr(0,localextenlength) + '" onclick="$(\'save_q\').disabled=false; $(\'cancel\').disabled=false;">&nbsp;' + $('agents').options[k].innerHTML.substr(localextenlength+4) +' (' + $('agents').options[k].innerHTML.substr(0,localextenlength) + ')' +  '</LABEL><BR>';
+				str_checked = " checked ";
 			}
+			$('testmulti').innerHTML += '<LABEL FOR=' + selectedagent + '><INPUT id="' + selectedagent + '" TYPE="CHECKBOX" VALUE="'+ $('agents').options[k].innerHTML.split(' -- ')[0] + '"'+ str_checked + ' onclick="$(\'save_q\').disabled=false; $(\'cancel\').disabled=false;">&nbsp;' + $('agents').options[k].innerHTML.split(' -- ')[1] +' (' + $('agents').options[k].innerHTML.split(' -- ')[0]+ ')' + '</LABEL><BR>';
 		}
 		$('save_q').disabled = false;
 }
@@ -382,7 +382,7 @@
 		for (k=0;k< $('agents').length ;k++ ){
 				selectedagent = "selectedagent" + k;
 				$('agents').options[k].selected = false;
-				$('testmulti').innerHTML += '<LABEL FOR=' + selectedagent + '><INPUT id="' + selectedagent + '" TYPE="CHECKBOX" VALUE="'+ $('agents').options[k].innerHTML.substr(0,localextenlength) + '" onclick="$(\'save_q\').disabled=false; $(\'cancel\').disabled=false;">&nbsp;' + $('agents').options[k].innerHTML.substr(localextenlength+4) +' (' + $('agents').options[k].innerHTML.substr(0,localextenlength) + ')' +  '</LABEL><BR>';
+				$('testmulti').innerHTML += '<LABEL FOR=' + selectedagent + '><INPUT id="' + selectedagent + '" TYPE="CHECKBOX" VALUE="'+ $('agents').options[k].innerHTML.split(' -- ')[0] + '" onclick="$(\'save_q\').disabled=false; $(\'cancel\').disabled=false;">&nbsp;' + $('agents').options[k].innerHTML.split(' -- ')[1] +' (' + $('agents').options[k].innerHTML.split(' -- ')[0] + ')' +  '</LABEL><BR>';
 		}
 	return tmp;
 }
@@ -424,6 +424,7 @@
 ////////
 
 function localajaxinit() {
+	setWindowTitle("Call Queues");
 //	$('advancedi').style.width = $('split').width - 60;
 	if( navigator.userAgent.indexOf("MSIE") != -1){
 		togglefeatures = function(){ } ;
@@ -488,7 +489,7 @@
 																	</tr>
 																	<tr onmouseover="show_tooltip('en', 'queues', 3);" >
 																			<td valign='top' class="field_text">Agents:</td>
-																			<td><select size="4" multiple='true' id='agents' style='width:200px; display:none;'></select>
+																			<td><select multiple='true' id='agents' style='display:none;'></select>
 																				<div id="testmulti" style='border:1px solid; font-size: 8pt; height:75px; width: 200px;overflow :auto;'></div>
 																			</td>
 																	</tr>

Modified: branches/appliance/config/record.html
URL: http://svn.digium.com/view/asterisk-gui/branches/appliance/config/record.html?view=diff&rev=376&r1=375&r2=376
==============================================================================
--- branches/appliance/config/record.html (original)
+++ branches/appliance/config/record.html Wed Feb 21 12:19:47 2007
@@ -246,6 +246,7 @@
 }
 
 function localajaxinit() {
+	setWindowTitle("Record a Menu");
 	for (var x =0; x < focus_fields.length; x++ ) {
 		$(focus_fields[x]).onfocus = function(){this.className = 'input8_hilight';}
 		$(focus_fields[x]).onblur = function(){this.className = 'input8';}

Modified: branches/appliance/config/scripts/astman.js
URL: http://svn.digium.com/view/asterisk-gui/branches/appliance/config/scripts/astman.js?view=diff&rev=376&r1=375&r2=376
==============================================================================
--- branches/appliance/config/scripts/astman.js (original)
+++ branches/appliance/config/scripts/astman.js Wed Feb 21 12:19:47 2007
@@ -20,12 +20,17 @@
  */
 
  var sc_displaytime = 1000;
+ var asterisk_guiappname =  "Asterisk GUI (Beta)";
  var asterisk_guitools = "asterisk_guitools";
  var asterisk_guitoolsversion = "0.7";
  var asterisk_guiversion = "$Revision$";
 var sortbynames = false;
 var dragdata = new Object;
 var asterisk_guiTDPrefix = "DID_";
+
+function setWindowTitle(a){
+	top.document.title = asterisk_guiappname + " -- " + a ;
+}
 
 function startDrag(event, movethis ){
 	dragdata.movethis = movethis ;
@@ -945,6 +950,8 @@
 		}
 		if (box.widgets['save'])
 			box.widgets['save'].disabled = true;
+		if (box.widgets['cancel'])
+			box.widgets['cancel'].disabled = true;
 	}
 }
 
@@ -1494,7 +1501,7 @@
 							return true;
 						}
 						widgets[x].onkeyup = function(event) {
-							if (event.keyCode ==9){return true;}
+							if (this.oldvalue == this.value){return true;}
 							pattern = this.getAttribute('pattern');
 							if (pattern && check_pattern(pattern, this.oldvalue) && !check_pattern(pattern, this.value)) {
 									this.value = this.oldvalue;
@@ -1549,14 +1556,15 @@
 			widgets['status'].innerHTML = "";
 	};
 	this.doConfig = function(t, box) {
-		if(t[0].headers['message']){
-			if( box.config_file == "zapscan.conf" ){
-				alert( "Note: Unable to find /etc/asterisk/zapscan.conf\nPlease run Zapscan manually ! \n\n Click 'OK' to try loading the rest of the page." );
-			} else if( t[0].headers['message'] == "Config file not found" && box.config_file != "zapscan.conf"){
-				alert( "Asterisk says it cannot find a required config file (" + box.config_file + ") \n You will be now redirected to the main page !" );
-				parent.window.location.href = parent.window.location.href ;
-				return ;
-			}
+		if( t[0].headers['message'] && t[0].headers['message'] == "Config file not found" ){
+					if( box.config_file == "zapscan.conf" || box.config_file == "contactinfo.conf" ){
+						parent.astmanEngine.run_tool("/bin/touch /etc/asterisk/"+box.config_file,	function(){	  window.location.href = window.location.href ; } );
+						return ;
+					} else {
+						alert( "Asterisk says it cannot find a required config file (" + box.config_file + ") \n You will be now redirected to the main page !" );
+						parent.window.location.href = parent.window.location.href ;
+						return ;
+					}
 		}
 		var x,y=0;
 		var cfg = new Object;

Modified: branches/appliance/config/setup/3.html
URL: http://svn.digium.com/view/asterisk-gui/branches/appliance/config/setup/3.html?view=diff&rev=376&r1=375&r2=376
==============================================================================
--- branches/appliance/config/setup/3.html (original)
+++ branches/appliance/config/setup/3.html Wed Feb 21 12:19:47 2007
@@ -110,6 +110,7 @@
 
 function store_extlength(){
 	parent.localextenlength = $('localextenlength').value ;
+	parent.userbase = $('userbase').value ;
 }
 
 function update_spae(){
@@ -149,9 +150,9 @@
 					<select id="devices" style="display:none"></select> <input type=button id="save" value="Submit" style="display:none">
 					<div class="heading">Step 2 of <script>document.write(parent.numberofsteps);</script>&nbsp;&nbsp;- Local Extension Settings</div>
 					<p class="subheading">	Local Extensions are <select id="localextenlength">
-																	<option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option></select> digits long&nbsp;
+																	<option value="2">2</option><option value="3">3</option><option value="4" selected>4</option><option value="5">5</option></select> digits long&nbsp;
 					</p>
-					<p class="subheading">Starting point of Allocation of extensions : <input type=text id="userbase" size=5>	</p>
+					<p class="subheading">Starting point of Allocation of extensions : <input type=text id="userbase" size=5 dfalt="6000">	</p>
 					<p class="subheading"><input type=checkbox id="allow_aliasextns"> Allow analog phones to be assigned to multiple extensions</p>
 			<!--  this page -->
 			</td>

Modified: branches/appliance/config/setup/6.html
URL: http://svn.digium.com/view/asterisk-gui/branches/appliance/config/setup/6.html?view=diff&rev=376&r1=375&r2=376
==============================================================================
--- branches/appliance/config/setup/6.html (original)
+++ branches/appliance/config/setup/6.html Wed Feb 21 12:19:47 2007
@@ -180,7 +180,22 @@
 	$('name').onkeydown = newexten;
 	$('name').disabled = false;
 	if (whichexten.length ==0 ){
-		alert("Looks like a default Voicemail Extension is not yet configured \n\n Please set an \'Extension for Checking messages\'");
+		//alert("Looks like a default Voicemail Extension is not yet configured \n\n Please set an \'Extension for Checking messages\'");
+			switch (parent.localextenlength){
+			case "2":
+				$('name').value = parent.userbase.charAt(0) + "5";
+				break;
+			case "3":
+				$('name').value = parent.userbase.charAt(0) + "50";
+				break;
+			case "4":
+				$('name').value = parent.userbase.charAt(0) + "500";
+				break;
+			case "5":
+				$('name').value = parent.userbase.charAt(0) + "5000";
+				break;
+			default : $('name').value = "8500";
+			}
 	}else{
 					if( parent.localextenlength != $('name').value.length ){
 							if(	parent.localextenlength < $('name').value.length ){
@@ -241,7 +256,7 @@
 												<option value='10'>10</option>
 												<option value='25'>25</option>
 												<option value='100'>100</option>
-												<option value='250'>250</option>
+												<option value='250' selected>250</option>
 												<option value='500'>500</option>
 												<option value='1000'>1000</option>
 												</select>
@@ -252,13 +267,13 @@
 												<option value='60'>1 minute</option>
 												<option value='120'>2 minutes</option>
 												<option value='300'>5 minutes</option>
-												<option value='900'>15 minutes</option>
+												<option value='900' selected>15 minutes</option>
 												<option value='1800'>30 minutes</option>
 												<option value='0'>Unlimited</option>
 												</select>
 							</td>
 					</tr>
-					<tr><td>Max&nbsp;greeting&nbsp;(seconds)</td><td>&nbsp;<input size=4 id='maxgreet' pattern='^\d*$' class="input8"></td></tr>
+					<tr><td>Max&nbsp;greeting&nbsp;(seconds)</td><td>&nbsp;<input size=4 id='maxgreet' pattern='^\d*$' class="input8" dfalt=60></td></tr>
 					<tr><td colspan='2' align='center'><div style="height:15px" id='status'></div></td></tr>
 			</table>					
 			<div style="display:none"><input type='button' id='save' value='Save'>&nbsp;<input type='button' id='cancel' value='Cancel'></div>

Modified: branches/appliance/config/sip.html
URL: http://svn.digium.com/view/asterisk-gui/branches/appliance/config/sip.html?view=diff&rev=376&r1=375&r2=376
==============================================================================
--- branches/appliance/config/sip.html (original)
+++ branches/appliance/config/sip.html Wed Feb 21 12:19:47 2007
@@ -28,6 +28,7 @@
 }
 
 function localajaxinit(){
+		setWindowTitle("SIP");
 		for (var x =0; x < fieldnames.length; x++ ) {
 			widgets[fieldnames[x]] = $(fieldnames[x]);
 			widgets[fieldnames[x]].disabled = true;

Modified: branches/appliance/config/status.html
URL: http://svn.digium.com/view/asterisk-gui/branches/appliance/config/status.html?view=diff&rev=376&r1=375&r2=376
==============================================================================
--- branches/appliance/config/status.html (original)
+++ branches/appliance/config/status.html Wed Feb 21 12:19:47 2007
@@ -113,6 +113,7 @@
 
 
 function localajaxinit(){
+		setWindowTitle("Active Channels");
 		refreshChannelsList() ;
 		parent.astmanEngine.setEventCallback(parent.eventeater.eventcd );
 		parent.loadscreen(this);

Modified: branches/appliance/config/stylesheets/rico.css
URL: http://svn.digium.com/view/asterisk-gui/branches/appliance/config/stylesheets/rico.css?view=diff&rev=376&r1=375&r2=376
==============================================================================
--- branches/appliance/config/stylesheets/rico.css (original)
+++ branches/appliance/config/stylesheets/rico.css Wed Feb 21 12:19:47 2007
@@ -243,28 +243,4 @@
    margin: 6px 0px 6px 0px;
    }
 
-/* for DHTML tabs */
-  a.tab { 
-		border-bottom: 0px solid #778;
-		font: bold 11px arial,Verdana, sans-serif;
-		margin: 0;
-		display: inline;
-		padding: 2px 0.5em;
-		margin-left: 3px;
-		border: 0px solid #778;
-		background: #DDE;
-		text-decoration: none;
-		color: #448; 
-		height: 11px;
- }
-
-a.tab:visited { 
-		color: #448; 
-}
-
-a.tab:hover { 
-		color: #000;
-		background: #AAE;

[... 271 lines stripped ...]


More information about the asterisk-gui-commits mailing list