pari: branch asterisknow r347 - in /branches/asterisknow: ./ config/ config/s...

asterisk-gui-commits at lists.digium.com asterisk-gui-commits at lists.digium.com
Thu Feb 15 20:45:55 MST 2007


Author: pari
Date: Thu Feb 15 21:45:54 2007
New Revision: 347

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=347
Log:
Merged revisions 333-346 via svnmerge from 
https://origsvn.digium.com/svn/asterisk-gui/trunk

........
r333 | pari | 2007-02-13 09:13:02 -0600 (Tue, 13 Feb 2007) | 1 line

Was looking at http://bugs.digium.com/view.php?id=8764 the other day. Removing it as one of the options for 'add new step'. Wondering why i put it there the first place.
........
r334 | pari | 2007-02-13 17:07:30 -0600 (Tue, 13 Feb 2007) | 1 line

feature: assign an MOH class for queues
........
r335 | pari | 2007-02-13 17:46:50 -0600 (Tue, 13 Feb 2007) | 1 line

bug Fix: Create exception for zapscan.conf - for cases where zapscan not found on the target system or installed in some other folder. As mentioned in http://bugs.digium.com/view.php?id=9047 
........
r336 | pari | 2007-02-14 15:11:53 -0600 (Wed, 14 Feb 2007) | 1 line

Major fixes for conferencing - as reported in http://bugs.digium.com/view.php?id=8791 
........
r337 | pari | 2007-02-14 18:11:23 -0600 (Wed, 14 Feb 2007) | 1 line

bug fix: getting 'an entry names xxxx already exists' alert when there is no other conference bridge by that name 
........
r338 | pari | 2007-02-14 18:13:57 -0600 (Wed, 14 Feb 2007) | 1 line

changing the postion of cancel button - just to be consistent through out the gui
........
r339 | pari | 2007-02-14 18:44:04 -0600 (Wed, 14 Feb 2007) | 1 line

Fix: Voicemail Password (vmsecret)
........
r340 | pari | 2007-02-14 18:55:40 -0600 (Wed, 14 Feb 2007) | 1 line

bugfix: error while editing a user after cancelling a New entry
........
r341 | pari | 2007-02-14 19:21:56 -0600 (Wed, 14 Feb 2007) | 1 line

fix: touch gui_cusommenus.conf if it does not exist - http://bugs.digium.com/view.php?id=9072 
........
r342 | pari | 2007-02-15 15:56:04 -0600 (Thu, 15 Feb 2007) | 1 line

Bug Fix: hasOwnProperty - the right way
........
r343 | pari | 2007-02-15 16:28:28 -0600 (Thu, 15 Feb 2007) | 1 line

removed 'Date & Time' in setup wizard, unnecessary feature causing too many bugs. Will enable if people really want the feature.
........
r344 | pari | 2007-02-15 20:30:34 -0600 (Thu, 15 Feb 2007) | 1 line

customize default settings that appear when a new user is created
........
r345 | pari | 2007-02-15 20:59:05 -0600 (Thu, 15 Feb 2007) | 1 line

fix: error on line 1025 when text is empty
........
r346 | pari | 2007-02-15 21:25:25 -0600 (Thu, 15 Feb 2007) | 1 line

option to reset changes
........

Modified:
    branches/asterisknow/   (props changed)
    branches/asterisknow/config/localexts.html
    branches/asterisknow/config/meetme.html
    branches/asterisknow/config/menus.html
    branches/asterisknow/config/numberplan.html
    branches/asterisknow/config/queues.html
    branches/asterisknow/config/record.html
    branches/asterisknow/config/scripts/astman.js
    branches/asterisknow/config/scripts/tooltip.js
    branches/asterisknow/config/setup/1.html
    branches/asterisknow/config/setup/10.html
    branches/asterisknow/config/setup/3.html
    branches/asterisknow/config/setup/4.html
    branches/asterisknow/config/setup/5.html
    branches/asterisknow/config/setup/6.html
    branches/asterisknow/config/setup/7.html
    branches/asterisknow/config/setup/install.html
    branches/asterisknow/config/users.html

Propchange: branches/asterisknow/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Feb 15 21:45:54 2007
@@ -1,1 +1,1 @@
-/trunk:1-330
+/trunk:1-346

Modified: branches/asterisknow/config/localexts.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/localexts.html?view=diff&rev=347&r1=346&r2=347
==============================================================================
--- branches/asterisknow/config/localexts.html (original)
+++ branches/asterisknow/config/localexts.html Thu Feb 15 21:45:54 2007
@@ -26,9 +26,9 @@
 <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');
+var fieldnames = new Array('status', 'save','userbase','localextenlength','allow_aliasextns','vmsecret','hasvoicemail','hasdirectory','hassip','hasiax','hasmanager','callwaiting','threewaycalling','hasagent','cancel');
 var widgets = new Array;
-var focus_fields = new Array('localextenlength','userbase');
+var focus_fields = new Array('localextenlength','userbase','vmsecret');
 
 function tosetup(){
 	parent.window.location.href = "./setup/install.html";
@@ -123,16 +123,42 @@
 	<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> 
 </TR>
 </TABLE>
-<BR><BR>
+<BR>
 <table class="mainscreenTable" align="center">
 	<tr>	<td align="center" valign="top">
 					<select id="devices" style="display:none"></select> 
-					<p class="field_text">	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;</p>
-					<p class="field_text">	Starting point of Allocation of extensions : <input type=text id="userbase" size=5  class="input9">	</p>
-					<p class="field_text"> <input type=checkbox id="allow_aliasextns">Allow analog phones to be assigned to multiple extensions</p>
+	<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">
+							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>
+			</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>
+				</table>
+	</fieldset>
 					<center>
 							<div style="height:15px" id='status'></div><BR>
 							<input type=button id="save" value="Save">
+							&nbsp;&nbsp;<input type=button id="cancel" value="Cancel">
 					</center>
 			</td>
 	</tr>

Modified: branches/asterisknow/config/meetme.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/meetme.html?view=diff&rev=347&r1=346&r2=347
==============================================================================
--- branches/asterisknow/config/meetme.html (original)
+++ branches/asterisknow/config/meetme.html Thu Feb 15 21:45:54 2007
@@ -33,14 +33,11 @@
 	var meetmes;
 	var callbacks = new Object;
 	var usercallbacks = new Object;
+	var meetmecallbacks = { };
 	var localextenlength;
 	var temp_selectedexten;
-	var fieldnames = new Array(
-				'name', 'delete', 'status', 'newitem', 
-				'music','menu', 'announce',
-				'room','record','waitmarked','setmarked','quiet',
-				'pin', 'pinadmin', 'save', 'cancel');
-	var focus_fields = new Array('name','pin','pinadmin','room');
+	var fieldnames = new Array( 'name', 'delete', 'status', 'newitem', 'music','menu', 'announce','room','record','waitmarked','setmarked','quiet','save', 'cancel') ;
+	var focus_fields = new Array('name','room', 'pin','pinadmin');
 	function changed_extension() {
 		var app;
 		tmp = $('extensions').value.split(']');
@@ -49,8 +46,18 @@
 		$('features').value = app.name.toLowerCase();
 	};
 
+		function enable_disable_fields(k){
+				if(k ==0){
+						$('pin').disabled = true ;
+						$('pinadmin').disabled = true ;
+				}else if ( k == 1 ){
+						$('pin').disabled = false ;
+						$('pinadmin').disabled = false ;
+				}
+		}
+
 	callbacks.fields2val = function(box, subfields) {
-		var flags = "d";
+		var flags = "";
 		var xargs="";
 		var room = '${EXTEN}';
 		if (subfields['music'] != 'no')
@@ -69,7 +76,7 @@
 			flags += 'q';
 		if (subfields['room'].length > 0)
 			room = subfields['room'];
-		return $('name').value + ",1,MeetMe(" + room + "," + flags + "," + subfields['pin'] + "," + subfields['pinadmin'] + ")";
+		return $('name').value + ",1,MeetMe(" + room + "|" + flags + ")";
 	}
 
 	callbacks.format = function(t, x) {
@@ -81,20 +88,12 @@
 			return null;
 		ret = format_extension($('extensions'), t, x);
 		if (ret) {
-			tmp = t.subfields[x].args.split(',');
+			tmp = t.subfields[x].args.split('|');
 			if (tmp[1]) {
 				tmp2 = tmp[1].split('');
 				for (y=0;y<tmp2.length;y++)
 					options[tmp2[y]] = 'yes';
 			}
-			if (tmp[2])
-				t.subfields[x].pin = tmp[2];
-			else
-				t.subfields[x].pin = '';
-			if (tmp[3])
-				t.subfields[x].pinadmin = tmp[3];
-			else
-				t.subfields[x].pinadmin = '';
 			if (tmp[0] == '${EXTEN}')
 				t.subfields[x].room = '';
 			else
@@ -156,8 +155,9 @@
 				}
 		}
 		tmp['name'] = x ;
-		tmp['pin'] = '';
-		tmp['pinadmin'] = '';
+		$('pin').value = '';
+		$('pinadmin').value = '';
+		enable_disable_fields(1);
 		tmp['music'] = 'yes';
 		tmp['menu'] = 'no';
 		tmp['announce'] = 'yes';
@@ -167,32 +167,51 @@
 	}
 	callbacks.postselect = function(box, val) {
 		parent.$('tooltip').innerHTML = parent.tooltip_default ; 
-		if( box.selectedIndex == -1)
+		$('pin').value = ""  ;		
+		$('pinadmin').value = "" ;
+		if( box.selectedIndex == -1){
+				 enable_disable_fields(0);
 				return true;
+		}
 		if(val == "reserved" ){
 				if( box.options[box.selectedIndex].text.toLowerCase().match("-- call queue")     ){
 					//parent.$('tooltip').innerHTML = " <font size=\"-2\" color=\"#FF0000\">Click on \'Call Queues\' panel to edit call queues </font>";
 					box.selectedIndex = -1;
+					 enable_disable_fields(0);
 					alert(" You can not edit the selected entry from here.\n Please click on the \'Call Queues\' panel to edit the selected entry");
 					return true;
 				}
 				if( box.options[box.selectedIndex].text.toLowerCase().match("-- check voicemail")     ){
 					//parent.$('tooltip').innerHTML = " <font size=\"-2\" color=\"#FF0000\">Click on \'Voicemail\' panel to edit Voicemail Preferences</font>";
 					box.selectedIndex = -1;
+				   enable_disable_fields(0);
 					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>";
+					 enable_disable_fields(0);
 					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;
+				 enable_disable_fields(0);
 				alert(" You can not edit the selected entry from here.\n Please click on the \'Users\' panel to edit the selected entry");
 				return true;
 		}
 		temp_selectedexten = $('name').value;
+		 enable_disable_fields(1);
+		var f = $('meetme_conf') ;
+		for ( var r=0; r < f.stored_config.catbyname.rooms.fields.length; r++ ) {
+				var k = f.stored_config.catbyname.rooms.fields[r].split(",");
+				if(k[0] == $('name').value ){
+					$('pin').value = k[1] ;		
+					$('pinadmin').value = k[2] ;
+					break;
+				}
+		}
+
 	}
 	callbacks.newcategory = function() {
 		var tmp = null;
@@ -209,6 +228,10 @@
 		return tmp;
 	}
 	callbacks.beforeSaving = function(){
+		if ( $('extensions').options[$('extensions').selectedIndex].text == "New Entry" ) {
+			temp_selectedexten = $('name').value ;
+		}
+
 		// check whether the length of extension is valid
 		if( localextenlength !=  $('name').value.length){
 				alert("Sorry, An Extension must be  "+ localextenlength  + " digits !");
@@ -233,7 +256,67 @@
 	}
 	callbacks.identifier = "extension";
 	callbacks.eachline = true;
-	
+
+	callbacks.savechanges = function(){
+		var f = $('meetme_conf') ;
+		var temp_rooms_r =  -1 ;
+		var oldvalue = "" ;
+		for ( var r=0; r < f.stored_config.catbyname.rooms.fields.length; r++ ) {
+				var k = f.stored_config.catbyname.rooms.fields[r].split(",");
+				if(k[0] == temp_selectedexten ){
+					oldvalue = f.stored_config.catbyname.rooms.fields[ r];
+					temp_rooms_r = r ;
+					break;
+				}
+		}
+		var newvalue = $('name').value + ","+ $('pin').value + "," + $('pinadmin').value;
+
+		if ( oldvalue ==  newvalue ){
+				$('save').disabled = true;
+				$('cancel').disabled = true;
+				return;
+		}else{
+				var uri = "";
+				var p = 0 ;
+				if( temp_rooms_r !=  -1 ){  // if is an existing conference
+						uri +=  build_action('delete', p, "rooms" ,"conf", "", oldvalue );  p++;
+				}
+					uri += build_action('append', p, "rooms","conf", newvalue );  p++;
+				var opt = { method: 'get', asynchronous: true, onComplete: function(){ 
+														if( temp_rooms_r ==  -1 ){ // add
+															 f.stored_config.catbyname.rooms.fields.push( newvalue );
+														 }else{  // update
+															 f.stored_config.catbyname.rooms.fields[temp_rooms_r] =  newvalue ;
+														 }
+														$('save').disabled = true; $('cancel').disabled = true;
+												} 
+									};
+				opt.parameters="action=updateconfig&reload=yes&srcfilename=" + encodeURIComponent("meetme.conf") + "&dstfilename=" + encodeURIComponent("meetme.conf") + uri;
+				var tmp = new Ajax.Request("../../rawman", opt);
+				return true;
+		}
+	}
+
+
+
+	callbacks.oncategorydelete = function(){
+			var f = $('meetme_conf') ;
+			for ( var r=0; r < f.stored_config.catbyname.rooms.fields.length; r++ ) {
+					var k = f.stored_config.catbyname.rooms.fields[r].split(",");
+					if(k[0] == temp_selectedexten ){
+						var uri =  build_action('delete', 0, "rooms" ,"conf", "", f.stored_config.catbyname.rooms.fields[r] );  
+						var opt = { method: 'get', asynchronous: true, onComplete: function(){ 
+										 f.stored_config.catbyname.rooms.fields.splice(r ,1);
+										}
+						};
+						opt.parameters="action=updateconfig&reload=yes&srcfilename=" + encodeURIComponent("meetme.conf") + "&dstfilename=" + encodeURIComponent("meetme.conf") + uri;
+						var tmp = new Ajax.Request("../../rawman", opt);
+						break;
+					}
+			}
+	}
+
+
 	usercallbacks.format = function(t) {
 		if ((t.name == 'general')){
 			if (t.fieldbyname['localextenlength'] && t.fieldbyname['localextenlength'].length){
@@ -281,9 +364,30 @@
 			widgets[fieldnames[x]].disabled = true;
 		}
 		for (var x =0; x < focus_fields.length; x++ ) {
-			widgets[focus_fields[x]].onfocus = function(){this.className = 'input8_hilight';}
-			widgets[focus_fields[x]].onblur = function(){this.className = 'input8';}
-		}
+			$( focus_fields[x] ).onfocus = function(){this.className = 'input8_hilight';}
+			$( focus_fields[x] ).onblur = function(){this.className = 'input8';}
+		}
+		 enable_disable_fields(0);
+		if ( $('pin').addEventListener	){
+					$('pin').addEventListener('keyup', function(){ $('save').disabled = false; $('cancel').disabled = false; } , false);
+					$('pinadmin').addEventListener('keyup', function(){ $('save').disabled = false; $('cancel').disabled = false; } , false);
+					$('pin').addEventListener('change', function(){ $('save').disabled = false; $('cancel').disabled = false; } , false);
+					$('pinadmin').addEventListener('change', function(){ $('save').disabled = false; $('cancel').disabled = false; } , false);
+		}else if( $('pin').attachEvent ){
+					$('pin').attachEvent('onkeyup', function(){ $('save').disabled = false; $('cancel').disabled = false; }  );
+					$('pinadmin').attachEvent('onkeyup', function(){ $('save').disabled = false; $('cancel').disabled = false; }  );
+					$('pin').attachEvent('onchange', function(){ $('save').disabled = false; $('cancel').disabled = false; }  );
+					$('pinadmin').attachEvent('onchange', function(){ $('save').disabled = false; $('cancel').disabled = false; }  );
+		}
+
+
+
+		parent.astmanEngine.config2list("meetme.conf", $('meetme_conf'), new Array(), meetmecallbacks);
+	}
+	meetmecallbacks.format = function(t) {
+		if(t.name == 'rooms' ){return t.name;}else{return null;}
+	}
+	meetmecallbacks.loaded = function() {
 		parent.astmanEngine.config2list("users.conf", $('hiddenusers'), new Array(), usercallbacks);
 	}
 </script>
@@ -302,7 +406,7 @@
 		<td><select disabled size="25" id="extensions" style="width:220px;" class="input10">	
 							<option>Loading...</option>	
 				</select>
-				<div style='visibility:hidden;overflow:hidden;width:0px;height:0px'>	<select id='hiddenusers'>	</select></div>
+				<div style='visibility:hidden;overflow:hidden;width:0px;height:0px'>	<select id='hiddenusers'>	</select><select id='meetme_conf'></select></div>
 		</td>
 		<td style="width:311px;height: 415px">
 					<div id='adjustments'>

Modified: branches/asterisknow/config/menus.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/menus.html?view=diff&rev=347&r1=346&r2=347
==============================================================================
--- branches/asterisknow/config/menus.html (original)
+++ branches/asterisknow/config/menus.html Thu Feb 15 21:45:54 2007
@@ -54,12 +54,12 @@
 		temp[2] = temp[2].replace(/\)/, "");
 		return "Play '" + temp[2] + "' & Listen for KeyPress";
 	}
-	if( temp[2].match("SetMusicOnHold") ){
-		// Background('') - whatever in the brackets
-		temp[2] = temp[2].replace(/SetMusicOnHold\(/, "");
-		temp[2] = temp[2].replace(/\)/, "");
-		return "Music on Hold  -  '" + temp[2] + "'";
-	}
+//	if( temp[2].match("SetMusicOnHold") ){
+//		// Background('') - whatever in the brackets
+//		temp[2] = temp[2].replace(/SetMusicOnHold\(/, "");
+//		temp[2] = temp[2].replace(/\)/, "");
+//		return "Music on Hold  -  '" + temp[2] + "'";
+//	}
 	if( temp[2].match("DigitTimeout") ){
 		temp[2] = temp[2].replace(/DigitTimeout\(/, "");
 		temp[2] = temp[2].replace(/\)/, "");
@@ -329,8 +329,8 @@
 		action_string = "s,"+ newpriority+ ",Answer";
 	}else if ( $('newstep_action').value == 'Background'  ){
 		action_string = "s,"+ newpriority+ ",Background(" + $('newstep_var').value + ")";
-	}else if ( $('newstep_action').value == 'SetMusicOnHold'  ){
-		action_string = "s,"+ newpriority+ ",SetMusicOnHold(" + $('newstep_var').value + ")";
+//	}else if ( $('newstep_action').value == 'SetMusicOnHold'  ){
+//		action_string = "s,"+ newpriority+ ",SetMusicOnHold(" + $('newstep_var').value + ")";
 	}else if ( $('newstep_action').value == 'DigitTimeout'  ){
 		action_string = "s,"+ newpriority+ ",DigitTimeout(" + $('newstep_var').value + ")";
 	}else if ( $('newstep_action').value == 'ResponseTimeout'  ){
@@ -664,7 +664,8 @@
 
 	if( $('newstep_action').value== "" || $('newstep_action').value== "Answer"  || $('newstep_action').value== "Hangup"  ){
 
-	}else if( $('newstep_action').value== "Background"  || $('newstep_action').value== "SetMusicOnHold" || $('newstep_action').value== "Playback" ){
+	}else if( $('newstep_action').value== "Background"  || $('newstep_action').value== "Playback" ){
+//	}else if( $('newstep_action').value== "Background"  || $('newstep_action').value== "SetMusicOnHold" || $('newstep_action').value== "Playback" ){
 		$('newstep_var').style.display = "";
 		$('newstep_var').size= 12;
 	}else if( $('newstep_action').value== "DigitTimeout"  || $('newstep_action').value== "ResponseTimeout" ||  $('newstep_action').value== "Wait"  ||  $('newstep_action').value== "WaitExten" ){
@@ -1066,7 +1067,7 @@
 									<option value=""> -- Select --</option>
 									<option value="Answer">Answer</option>
 									<option value="Background">Background</option>
-									<option value="SetMusicOnHold">SetMusicOnHold</option>
+									<!-- <option value="SetMusicOnHold">SetMusicOnHold</option> -->
 									<option value="DigitTimeout">DigitTimeout</option>
 									<option value="ResponseTimeout">ResponseTimeout</option>
 									<option value="Playback">Playback</option>

Modified: branches/asterisknow/config/numberplan.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/numberplan.html?view=diff&rev=347&r1=346&r2=347
==============================================================================
--- branches/asterisknow/config/numberplan.html (original)
+++ branches/asterisknow/config/numberplan.html Thu Feb 15 21:45:54 2007
@@ -186,7 +186,7 @@
 	//			parse "numberplansdata[t.name]['npcomments']" and add to "numberplansdata[t.name]['npdata']"
 	//	}
 	for(x in  numberplansdata){
-			if ( x == "extend"){ break;}
+			if (numberplansdata.hasOwnProperty(x)) {
 			var z = numberplansdata[x];
 			var y = z['npdata'];
 			for ( k =0 ; k < z['nprules'].length ; k++ ){
@@ -213,6 +213,7 @@
 						y[temp[0]][temp[1]].ruledesc = "custom" ;
 			}
 	}
+	}
 }
 
 function show_npdata_table(a){
@@ -222,11 +223,12 @@
 	var rules_nosp = new Array ;
 	var m = numberplansdata[a]['npdata'];
 	for( var x in  m ){	// x is the pattern
-				if ( x == "extend"){ break;}
+				 if (m.hasOwnProperty(x)) {
 				var sorted_priorities = [ ];
 				for ( var y in m[x] ){
-					if ( y == "extend"){break;}
+					 if (m[x].hasOwnProperty(y)) {
 					sorted_priorities.push(y);
+					}
 				}
 				sorted_priorities.sort();
 				for( var z=0; z < sorted_priorities.length ; z++ ){
@@ -247,6 +249,7 @@
 						}else{
 								addrowtotable( x , sorted_priorities[z] , m[x][sorted_priorities[z]].trunk , m[x][sorted_priorities[z]].digits2strip );
 						}
+				}
 				}
 	}
 

Modified: branches/asterisknow/config/queues.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/queues.html?view=diff&rev=347&r1=346&r2=347
==============================================================================
--- branches/asterisknow/config/queues.html (original)
+++ branches/asterisknow/config/queues.html Thu Feb 15 21:45:54 2007
@@ -28,6 +28,7 @@
 
 <script>
 var adstatus;
+var mohcallbacks = new Object;
 var queuecallbacks = new Object;
 var usercallbacks = new Object;
 var extencallbacks = new Object;
@@ -35,8 +36,8 @@
 var widgets = new Array;
 var queueagents = new  Array;
 var queuenames = new Array;
-var fieldnames = new Array( 'name', 'delete','save', 'status', 'new', 'cancel','fullname', 'strategy', 'timeout', 'wrapuptime','autofill','autopause','maxlen', 'joinempty',  'leavewhenempty', 'reportholdtime','agents');
-var focus_fields = new Array('name','fullname','strategy','timeout','wrapuptime','maxlen');
+var fieldnames = new Array( 'name', 'delete','save', 'status', 'new', 'cancel','fullname', 'strategy', 'timeout', 'wrapuptime','autofill','autopause','maxlen', 'joinempty',  'leavewhenempty', 'reportholdtime','agents','musicclass');
+var focus_fields = new Array('name','fullname','strategy','timeout','wrapuptime','maxlen','musicclass');
 
 var k =0;
 var j = -1; 
@@ -117,7 +118,7 @@
 		var p = 0;
 		var q = 0;
 		var r = 0;
-		var fields = new Array('fullname', 'strategy', 'timeout', 'wrapuptime','autofill','autopause','maxlen', 'joinempty',  'leavewhenempty', 'reportholdtime');
+		var fields = new Array('fullname', 'strategy', 'timeout', 'wrapuptime','autofill','autopause','maxlen', 'joinempty',  'leavewhenempty', 'reportholdtime','musicclass');
 		var otherfields_action, tmp;
 		var opt = {
 			method: 'get',
@@ -443,12 +444,19 @@
 		widgets[focus_fields[x]].onblur = function(){this.className = 'input8';}
 	}
 	adstatus = "hidden";
-	parent.astmanEngine.config2list("extensions.conf", $('extensions'), new Array(), extencallbacks);
+	parent.astmanEngine.config2list("musiconhold.conf", $('musicclass'), new Array(), mohcallbacks);
 	$('save_q').disabled = true;
 	$('message_text').innerHTML = " Saving Changes ... ";
 	return;
 }
 
+mohcallbacks.format = function(t) {
+			return t.name;
+}
+
+mohcallbacks.loaded = function() {
+	parent.astmanEngine.config2list("extensions.conf", $('extensions'), new Array(), extencallbacks);
+}
 </script>
 <body id="foo" onload="localajaxinit()"  bgcolor="EFEFEF">
 <div class="mainscreenTitleBar">
@@ -494,12 +502,22 @@
 																<table id='advancedi' align='center'>
 																		<tr onmouseover="show_tooltip('en', 'queues', 5);" ><td class="field_text">TimeOut:</td><td>&nbsp;<input size='2' id='timeout'  pattern='^\d*$' class="input8"></td></tr>
 																		<tr onmouseover="show_tooltip('en', 'queues', 6);" ><td class="field_text">Wrapup Time:</td><td>&nbsp;<input size='2' id='wrapuptime' pattern='^\d*$' class="input8"></td></tr>
-																		<tr onmouseover="show_tooltip('en', 'queues', 7);" ><td class="field_text">Auto Fill:</td><td><input type=checkbox id='autofill'></td></tr>
-																		<tr onmouseover="show_tooltip('en', 'queues', 8);" ><td class="field_text">Auto Pause:</td><td><input type=checkbox id='autopause'></td></tr>
+																		<tr>
+																				<td colspan=2>
+																					<span  class="field_text" onmouseover="show_tooltip('en', 'queues', 7);" ><input type=checkbox id='autofill'> Auto Fill</span>
+																					<span  class="field_text" onmouseover="show_tooltip('en', 'queues', 8);">&nbsp;&nbsp;<input type=checkbox id='autopause'>Auto Pause</span>
+																				</td>
+																		</tr>
+
 																		<tr onmouseover="show_tooltip('en', 'queues', 9);" ><td class="field_text">Max Len:</td><td>&nbsp;<input size='2' id='maxlen' pattern='^\d*$' class="input8"></td></tr>
 																		<tr onmouseover="show_tooltip('en', 'queues', 10);" ><td class="field_text">JoinEmpty:</td><td><input type=checkbox id='joinempty'></td></tr>
 																		<tr onmouseover="show_tooltip('en', 'queues', 11);" ><td class="field_text">LeaveWhenEmpty:</td><td><input type=checkbox id='leavewhenempty'></td></tr>
 																		<tr onmouseover="show_tooltip('en', 'queues', 12);" ><td class="field_text">Report Hold Time:</td><td><input type=checkbox id='reportholdtime'></td></tr>
+																		<tr>
+																				<td colspan=2  class="field_text">
+																					Music On Hold: <select id="musicclass" class="input8"></select>
+																				</td>
+																		</tr>
 																</table>
 													</div>
 										</td>

Modified: branches/asterisknow/config/record.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/record.html?view=diff&rev=347&r1=346&r2=347
==============================================================================
--- branches/asterisknow/config/record.html (original)
+++ branches/asterisknow/config/record.html Thu Feb 15 21:45:54 2007
@@ -250,6 +250,21 @@
 		$(focus_fields[x]).onfocus = function(){this.className = 'input8_hilight';}
 		$(focus_fields[x]).onblur = function(){this.className = 'input8';}
 	}
+
+	var opt = { method: 'get', asynchronous: true, onComplete: check_filexists };
+	opt.parameters="action=getconfig&filename="+ custom_voicemenusfile ;
+	var tmp = new Ajax.Request("../../rawman", opt);
+}
+
+function check_filexists(originalRequest){
+	if( originalRequest.responseText.indexOf("Config file not found") != -1 ){
+		parent.astmanEngine.run_tool("/bin/touch /etc/asterisk/"+custom_voicemenusfile ,	function(){	 load_page();  } );
+		return;
+	}
+	load_page();
+}
+
+function load_page(){
 	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 ... ";
@@ -328,8 +343,8 @@
 				</tr>
 				<tr>	<td colspan=2 align=center height=10></td></tr>
 				<tr>	<td colspan=2 align=center>
-						<input type="button" Value="Cancel" onclick="hide_record();" class="buttonbold">&nbsp;&nbsp;&nbsp;
-						<input type="button" id='record' Value="Record" onclick="record_new()" class="buttonbold"></td></tr>
+						<input type="button" id='record' Value="Record" onclick="record_new()" class="buttonbold">&nbsp;&nbsp;&nbsp;
+						<input type="button" Value="Cancel" onclick="hide_record();" class="buttonbold"></td></tr>
 				<tr>	<td colspan=2 align=center height=10></td></tr>
 			</table>
 		</div>

Modified: branches/asterisknow/config/scripts/astman.js
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/scripts/astman.js?view=diff&rev=347&r1=346&r2=347
==============================================================================
--- branches/asterisknow/config/scripts/astman.js (original)
+++ branches/asterisknow/config/scripts/astman.js Thu Feb 15 21:45:54 2007
@@ -847,7 +847,7 @@
 			alert("Config Error: " + t.status + ": " + t.statusText);
 		}
 	};
-	var uri;
+	var uri = "" ;
 	var tmp;
 	var temp;
 	var newval;
@@ -1022,10 +1022,13 @@
 
 function check_pattern(pattern, text)
 {
-	if (text.search(pattern) == -1)
-			return false;
-	else
-			return true;
+	if(typeof text != "undefined"){
+		if (text.search(pattern) == -1)
+				return false;
+		else
+				return true;
+	}
+	return true;
 }
 
 
@@ -1490,7 +1493,8 @@
 							this.oldvalue = this.value;
 							return true;
 						}
-						widgets[x].onkeyup = function() {
+						widgets[x].onkeyup = function(event) {
+							if (event.keyCode ==9){return true;}
 							pattern = this.getAttribute('pattern');
 							if (pattern && check_pattern(pattern, this.oldvalue) && !check_pattern(pattern, this.value)) {
 									this.value = this.oldvalue;
@@ -1546,7 +1550,9 @@
 	};
 	this.doConfig = function(t, box) {
 		if(t[0].headers['message']){
-			if( t[0].headers['message'] == "Config file not found"){
+			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 ;
@@ -1865,7 +1871,7 @@
 			var opt_new = document.createElement('option');
 			opt_new.text = e.options[f].text ;
 			opt_new.value = 'reserved';
-			if( navigator.userAgent.indexOf("Firefox") != -1 ){ opt_new.disabled = true; }
+			//if( navigator.userAgent.indexOf("Firefox") != -1 ){ opt_new.disabled = true; }
 			opt_new.style.color = "#ABABAB";
 
 			// Now decide where to add in u, and add it to u

Modified: branches/asterisknow/config/scripts/tooltip.js
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/scripts/tooltip.js?view=diff&rev=347&r1=346&r2=347
==============================================================================
--- branches/asterisknow/config/scripts/tooltip.js (original)
+++ branches/asterisknow/config/scripts/tooltip.js Thu Feb 15 21:45:54 2007
@@ -14,7 +14,7 @@
 
 	tooltips['users'] .en[0] = "<B>Extension:</B> The numbered extension, i.e. 1234, that will be associated with this particular User / Phone." ;  //Extension
 	tooltips['users'] .en[1] = "<B>Name:</B> A character-based name for this user, i.e. \"Bob Jones\" " ;  //Name
-	tooltips['users'] .en[2] = "<B>Password:</B> The password for this user or Phone, i.e. \"1234\" " ; //Password
+	tooltips['users'] .en[2] = "<B>Password:</B> The password for the user's sip/iax account , Ex: \"12u3b6\" " ; //Password
 	tooltips['users'] .en[3] = "<B>E-Mail:</B> The e-mail address for this user, i.e. \"bobjones at bobjones.null\"";  //E-mail
 	tooltips['users'] .en[4] = "<B>Caller ID:</B> The Caller ID (CID) string used when this user calls another user or number, i.e. \"800-555-1234\" "; //Caller ID
 	tooltips['users'] .en[5] = "<B>Analog Phone:</B> If this user is attached to an analog port on the system, please choose the port number here.";  //Analog Phone
@@ -28,6 +28,7 @@
 	tooltips['users'] .en[13] = "<B>Call Waiting:</B> Check this option if the User or Phone should have Call-Waiting capability."; //Call Waiting
 	tooltips['users'] .en[14] = "<B>3-Way Calling:</B>Check this option if the User or Phone should have 3-Way Calling capability."; //3-Way Calling:
 	tooltips['users'] .en[15] = "<B>Is Agent:</B> Check this option if this User or Phone is an Call Queue Member (Agent)"; //Is Agent:
+	tooltips['users'] .en[16] = "<B>VM Password:</B> Voicemail Password for this user, Ex: \"1234\"."; //Voicemail Password
 
 // Tooltips for Conferencing (meetme)
 	tooltips['meetme']= new Object;

Modified: branches/asterisknow/config/setup/1.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/setup/1.html?view=diff&rev=347&r1=346&r2=347
==============================================================================
--- branches/asterisknow/config/setup/1.html (original)
+++ branches/asterisknow/config/setup/1.html Thu Feb 15 21:45:54 2007
@@ -177,7 +177,7 @@
 	$('loginform').style.display = "none";
 	$('zapinfo').style.display = "block";
 	parent.$('next').disabled = false;
-	parent.$('next').onclick = function(){	 window.location.href="2.html"; };
+	parent.$('next').onclick = function(){	 window.location.href="3.html"; };
 	$('menu').style.display = "block";
 }
 
@@ -224,7 +224,7 @@
 					<table cellpadding=3 cellspacing=2 border=0 id="sidelist">
 						<tr><td width=3></td><td>Start</td></tr>
 						<tr><td></td><td class="slselected">Verify Analog Ports</td></tr>
-						<tr><td></td><td>Date & Time</td></tr>
+						<!-- <tr><td></td><td>Date & Time</td></tr> -->
 						<tr><td></td><td>Local Extension Settings</td></tr>
 						<tr><td></td><td>Service Providers</td></tr>
 						<tr><td></td><td>Calling Rules</td></tr>

Modified: branches/asterisknow/config/setup/10.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/setup/10.html?view=diff&rev=347&r1=346&r2=347
==============================================================================
--- branches/asterisknow/config/setup/10.html (original)
+++ branches/asterisknow/config/setup/10.html Thu Feb 15 21:45:54 2007
@@ -113,7 +113,7 @@
 					<table cellpadding=3 cellspacing=2 border=0 id="sidelist">
 						<tr><td width=3></td><td>Start</td></tr>
 						<tr><td></td><td>Verify Analog Ports</td></tr>
-						<tr><td></td><td>Date & Time</td></tr>
+						<!-- <tr><td></td><td>Date & Time</td></tr> -->
 						<tr><td></td><td>Local Extension Settings</td></tr>
 						<tr><td></td><td>Service Providers</td></tr>
 						<tr><td></td><td>Calling Rules</td></tr>

Modified: branches/asterisknow/config/setup/3.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/setup/3.html?view=diff&rev=347&r1=346&r2=347
==============================================================================
--- branches/asterisknow/config/setup/3.html (original)
+++ branches/asterisknow/config/setup/3.html Thu Feb 15 21:45:54 2007
@@ -12,7 +12,7 @@
 var widgets = new Array;
 var go = "";
 var nextpage = "4.html";
-var prevpage = "2.html";
+var prevpage = "1.html";
 
 function localinit(){
 	parent.$('next').disabled = true;
@@ -133,7 +133,7 @@
 					<table cellpadding=3 cellspacing=2 border=0 id="sidelist">
 						<tr><td width=3></td><td>Start</td></tr>
 						<tr><td></td><td>Verify Analog Ports</td></tr>
-						<tr><td></td><td>Date & Time</td></tr>
+						<!-- <tr><td></td><td>Date & Time</td></tr> -->
 						<tr><td></td><td class="slselected">Local Extension Settings</td></tr>
 						<tr><td></td><td>Service Providers</td></tr>
 						<tr><td></td><td>Calling Rules</td></tr>
@@ -147,7 +147,7 @@
 			<td valign=top align=center>
 			<!--  this page -->
 					<select id="devices" style="display:none"></select> <input type=button id="save" value="Submit" style="display:none">
-					<div class="heading">Step 3 of <script>document.write(parent.numberofsteps);</script>&nbsp;&nbsp;- Local Extension Settings</div>
+					<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;
 					</p>

Modified: branches/asterisknow/config/setup/4.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/setup/4.html?view=diff&rev=347&r1=346&r2=347
==============================================================================
--- branches/asterisknow/config/setup/4.html (original)
+++ branches/asterisknow/config/setup/4.html Thu Feb 15 21:45:54 2007
@@ -694,7 +694,7 @@
 					<table cellpadding=3 cellspacing=2 border=0 id="sidelist">
 						<tr><td width=3></td><td>Start</td></tr>
 						<tr><td></td><td>Verify Analog Ports</td></tr>
-						<tr><td></td><td>Date & Time</td></tr>
+						<!-- <tr><td></td><td>Date & Time</td></tr> -->
 						<tr><td></td><td>Local Extension Settings</td></tr>
 						<tr><td></td><td class="slselected">Service Providers</td></tr>
 						<tr><td></td><td>Calling Rules</td></tr>
@@ -710,7 +710,7 @@
 
 <select disabled size="1" id="devices" style="display:none"></select><input type='button' id='delete' value='Delete' style="display:none">
 <center>
-	<div class="heading">Step 4 of <script>document.write(parent.numberofsteps);</script>&nbsp;&nbsp;- Service Providers</div>
+	<div class="heading">Step 3 of <script>document.write(parent.numberofsteps);</script>&nbsp;&nbsp;- Service Providers</div>
 <table class="table_black" cellpadding=2 cellspacing=2 border=0 align=center width=500 id="table_one">
 	<tr>	<td width=40>S.No</td>
 			<td width="200">Service Provider</td>

Modified: branches/asterisknow/config/setup/5.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/setup/5.html?view=diff&rev=347&r1=346&r2=347

[... 126 lines stripped ...]


More information about the asterisk-gui-commits mailing list