pari: trunk r268 - in /trunk/config: ./ setup/

asterisk-gui-commits at lists.digium.com asterisk-gui-commits at lists.digium.com
Wed Jan 17 16:13:20 MST 2007


Author: pari
Date: Wed Jan 17 17:13:19 2007
New Revision: 268

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=268
Log:
lots of minor changes and fixes

Modified:
    trunk/config/cfgadvanced.html
    trunk/config/cfgappliance.html
    trunk/config/cfgbasic.html
    trunk/config/localexts.html
    trunk/config/meetme.html
    trunk/config/setup/2.html
    trunk/config/setup/3.html
    trunk/config/setup/4.html
    trunk/config/setup/5.html
    trunk/config/setup/6.html
    trunk/config/setup/7.html
    trunk/config/users.html
    trunk/config/voicemail.html

Modified: trunk/config/cfgadvanced.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/cfgadvanced.html?view=diff&rev=268&r1=267&r2=268
==============================================================================
--- trunk/config/cfgadvanced.html (original)
+++ trunk/config/cfgadvanced.html Wed Jan 17 17:13:19 2007
@@ -213,7 +213,7 @@
 							<!-- <a href="#" onclick=" system_link()">System Configuration</a>&nbsp;|&nbsp; -->
 							<a target='_extern' href="http://www.digium.com/en/company/profile/">About Digium</a>&nbsp;|&nbsp;
 							<a target='_extern' href="http://www.asterisknow.org/bugs">Report a Bug</a>&nbsp;|&nbsp;
-							<a href="#">Help</a>&nbsp;
+							<a target='_extern' href="http://www.asterisknow.org/help">Help</a>&nbsp;
 							<input type="hidden" id="login_name">
 							</td>
 </tr>

Modified: trunk/config/cfgappliance.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/cfgappliance.html?view=diff&rev=268&r1=267&r2=268
==============================================================================
--- trunk/config/cfgappliance.html (original)
+++ trunk/config/cfgappliance.html Wed Jan 17 17:13:19 2007
@@ -198,7 +198,7 @@
 <tr height=47><td valign="bottom" align='right' bgcolor='white' height=47><img align='left' src="images/digiumlogo.gif" align="left"></td>
 							<td valign='bottom' align='right' bgcolor='white' colspan=2><a target='_extern' href="http://www.digium.com/en/company/profile/">About Digium</a>&nbsp;|&nbsp;
 							<a target='_extern' href="http://www.asterisknow.org/bugs">Report a Bug</a>&nbsp;|&nbsp;
-							<a href="#">Help</a>&nbsp;
+							<a target='_extern' href="http://www.asterisknow.org/help">Help</a>&nbsp;
 							<input type="hidden" id="login_name">
 							</td>
 </tr>

Modified: trunk/config/cfgbasic.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/cfgbasic.html?view=diff&rev=268&r1=267&r2=268
==============================================================================
--- trunk/config/cfgbasic.html (original)
+++ trunk/config/cfgbasic.html Wed Jan 17 17:13:19 2007
@@ -212,7 +212,7 @@
 									<!-- <a href="#" onclick=" system_link()">System Configuration</a>&nbsp;|&nbsp; -->
 									<a target='_extern' href="http://www.digium.com/en/company/profile/">About Digium</a>&nbsp;|&nbsp;
 									<a target='_extern' href="http://www.asterisknow.org/bugs">Report a Bug</a>&nbsp;|&nbsp;
-									<a href="#">Help</a>&nbsp;
+									<a target='_extern' href="http://www.asterisknow.org/help">Help</a>&nbsp;
 									<input type="hidden" id="login_name">
 							</td>
 </tr>

Modified: trunk/config/localexts.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/localexts.html?view=diff&rev=268&r1=267&r2=268
==============================================================================
--- trunk/config/localexts.html (original)
+++ trunk/config/localexts.html Wed Jan 17 17:13:19 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','disallow_aliasextns');
+var fieldnames = new Array('status', 'save','userbase','localextenlength','allow_aliasextns');
 var widgets = new Array;
 
 function tosetup(){
@@ -118,7 +118,7 @@
 					<select id="devices" style="display:none"></select> 
 					<p class="field_text">	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>
 					<p class="field_text">	Starting point of Allocation of extensions : <input type=text id="userbase" size=5>	</p>
-					<p class="field_text"> <input type=checkbox id="disallow_aliasextns"> Do not allow analog phones assigned to multiple extensions</p>
+					<p class="field_text"> <input type=checkbox id="allow_aliasextns">Allow analog phones to be assigned to multiple extensions</p>
 					<center>
 							<div style="height:15px" id='status'></div><BR>
 							<input type=button id="save" value="Save">

Modified: trunk/config/meetme.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/meetme.html?view=diff&rev=268&r1=267&r2=268
==============================================================================
--- trunk/config/meetme.html (original)
+++ trunk/config/meetme.html Wed Jan 17 17:13:19 2007
@@ -35,6 +35,7 @@
 	var callbacks = new Object;
 	var usercallbacks = new Object;
 	var localextenlength;
+	var temp_selectedexten;
 	var fieldnames = new Array(
 				'name', 'delete', 'status', 'newitem', 
 				'music','menu', 'announce',
@@ -175,6 +176,7 @@
 				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;
 	}
 	callbacks.newcategory = function() {
 		var tmp = null;
@@ -201,11 +203,13 @@
 			return false;
 		}
 
-		for(var k=0; k<$('extensions').length; k++ ){
-			var tmp = $('extensions').options[k].innerHTML.split(' -- '); 
-			if( tmp[0] ==  $('name').value   ){
-				alert("Sorry, an entry named " + $('name').value + " already exists!");
-				return false;
+		if(temp_selectedexten != $('name').value ){
+			for(var k=0; k<$('extensions').length; k++ ){
+				var tmp = $('extensions').options[k].innerHTML.split(' -- '); 
+				if( tmp[0] ==  $('name').value   ){
+					alert("Sorry, an entry named " + $('name').value + " already exists!");
+					return false;
+				}
 			}
 		}
 

Modified: trunk/config/setup/2.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/setup/2.html?view=diff&rev=268&r1=267&r2=268
==============================================================================
--- trunk/config/setup/2.html (original)
+++ trunk/config/setup/2.html Wed Jan 17 17:13:19 2007
@@ -219,7 +219,7 @@
 			<!--  this page -->
 				<div id='sysinfo' style="display:none"></div>
 				<div class="heading">Step 2 of <script>document.write(parent.numberofsteps);</script>&nbsp;&nbsp;- Date & Time Settings</div>
-				<div class="subheading">Current System Time </div>
+				<div class="subheading">Please configure the current local system time:</div>
 					 <TABLE cellpadding=6 cellspacing=1 border=0 class="timeinfo">
 					 <TR>
 					 	<TD>Day </TD>

Modified: trunk/config/setup/3.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/setup/3.html?view=diff&rev=268&r1=267&r2=268
==============================================================================
--- trunk/config/setup/3.html (original)
+++ trunk/config/setup/3.html Wed Jan 17 17:13:19 2007
@@ -8,7 +8,7 @@
 <!--
 var rawman_url;
 var usercallbacks = new Object;
-var fieldnames = new Array( 'save','userbase','localextenlength','disallow_aliasextns');
+var fieldnames = new Array( 'save','userbase','localextenlength','allow_aliasextns');
 var widgets = new Array;
 var go = "";
 var nextpage = "4.html";
@@ -150,7 +150,7 @@
 																	<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="subheading">Starting point of Allocation of extensions : <input type=text id="userbase" size=5>	</p>
-					<p class="subheading"><input type=checkbox id="disallow_aliasextns"> Do not allow analog phones assigned to multiple extensions</p>
+					<p class="subheading"><input type=checkbox id="allow_aliasextns"> Allow analog phones to be assigned to multiple extensions</p>
 			<!--  this page -->
 			</td>
 		</tr>

Modified: trunk/config/setup/4.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/setup/4.html?view=diff&rev=268&r1=267&r2=268
==============================================================================
--- trunk/config/setup/4.html (original)
+++ trunk/config/setup/4.html Wed Jan 17 17:13:19 2007
@@ -529,8 +529,11 @@
 		var newRow = $('serviceproviderstable').insertRow(-1);
 		var newCell0 = newRow.insertCell(0);
 		newCell0 .align = "center";
-		newCell0 .innerHTML = "<BR>You donot have any <I>Service Providers</I> defined<BR><BR> Please click on the 'Add Service Provider' button<BR> to add a service provider<BR><BR>" ;
+		$('new').style.display= "none";
+		newCell0 .innerHTML = "<BR>You do not have any <I>Service Providers</I> defined<BR><BR>  <Input type=button onclick=\"$('new').click()\" value=\"Add Service Provider\"><BR><BR>" ;
 		return true;
+	}else{
+		$('new').style.display= "none";
 	}
 
 	$('table_one').style.display="";	
@@ -758,6 +761,9 @@
 										<td></td>
 									</tr>
 									<tr>
+										<td colspan=2>Please enter your Service Provider information:</td>
+									</tr>
+									<tr>
 										<td class="field_text">Comment:</td>
 										<td><input type="text" id="customvoip_name" size=14 onkeyup=" $('cancel').disabled= false;$('save').disabled= false;"  class="input8"></td>
 									</tr>

Modified: trunk/config/setup/5.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/setup/5.html?view=diff&rev=268&r1=267&r2=268
==============================================================================
--- trunk/config/setup/5.html (original)
+++ trunk/config/setup/5.html Wed Jan 17 17:13:19 2007
@@ -468,7 +468,7 @@
 			<td valign=top align=center>
 			<!--  this page -->
 					<select id="extensions" style="display:none"></select>
-					<div class="heading">Step 5 of <script>document.write(parent.numberofsteps);</script>&nbsp;&nbsp;-  Calling Rules</div>
+					<div class="heading">Step 5 of <script>document.write(parent.numberofsteps);</script>&nbsp;&nbsp;-  Outbound Calling Rules</div>
 			<table class="table_blacksm" cellpadding=2 cellspacing=2 border=0 align=center width=500 id="table_one">
 				<tr>	<td width=35>S.No</td>
 						<td width=90>RuleName</td>

Modified: trunk/config/setup/6.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/setup/6.html?view=diff&rev=268&r1=267&r2=268
==============================================================================
--- trunk/config/setup/6.html (original)
+++ trunk/config/setup/6.html Wed Jan 17 17:13:19 2007
@@ -231,7 +231,7 @@
 					<select id='hiddenvoicemail' style="display:none"></select>
 					<select id="extensions" style="display:none"></select>
 
-					<div class="heading">Step 6 of <script>document.write(parent.numberofsteps);</script>&nbsp;&nbsp;-  Voicemail Settings</div>
+					<div class="heading">Step 6 of <script>document.write(parent.numberofsteps);</script>&nbsp;&nbsp;-  VoiceMail Settings</div>
 		<table cellpadding=2 cellspacing=2 border=0 align=center  class="subheading">
 					<tr><td>Extension for checking messages:</td><td>&nbsp;<input size='5' id='name' pattern='^\d*$' onKeyUp="$('cancel').disabled=false;"  class="input8" ></td></tr>
 					<tr><td>Attach recordings to e-mail:</td><td><input type='checkbox' id='attach'></td></tr>

Modified: trunk/config/setup/7.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/setup/7.html?view=diff&rev=268&r1=267&r2=268
==============================================================================
--- trunk/config/setup/7.html (original)
+++ trunk/config/setup/7.html Wed Jan 17 17:13:19 2007
@@ -16,10 +16,17 @@
 var numcallbacks = new Object;
 var extencallbacks = new Object;
 var fieldnames = new Array( 'delete', 'status', 'new', 'save', 'cancel','name','fullname','secret','email','cid_number','zapchan','context','hasvoicemail','hasdirectory','hassip','hasiax','hasmanager','callwaiting','threewaycalling','mailbox','hasagent','group','host');
+var allow_aliasextns;
 
 callbacks.format = function(t) {
-	if ((t.name == 'general'))
+	if ((t.name == 'general')){
+		if (t.fieldbyname['allow_aliasextns'] && t.fieldbyname['allow_aliasextns'].length){
+			allow_aliasextns =  t.fieldbyname['allow_aliasextns'] ;
+		}else{
+			allow_aliasextns = 'no' ;
+		}
 		return null;
+	}
 	//if (t.name.substring(0,6) == 'trunk_')
 	if ( t.fieldbyname['context'] == asterisk_guiTDPrefix + t.name )
 		return null;
@@ -92,6 +99,18 @@
 		}
 	}
 
+	if(allow_aliasextns == "no"){	// check whether the selected analog line is assigned to another user extension
+			var tmp_usedanaloglines = [] ;
+			for ( var i=1; i < $('devices').stored_config.categories.length ; i++){
+					if ( $('devices').stored_config.categories[i].fieldbyname['zapchan'] && $('devices').stored_config.categories[i].fieldbyname.zapchan.length )
+						tmp_usedanaloglines.push($('devices').stored_config.categories[i].fieldbyname.zapchan);
+			}
+			if ( InArray(tmp_usedanaloglines,$('zapchan').value)){
+				alert("This Analog Phone has already been assigned to another user extension.\n Please select a different Phone");
+				return false;
+			}
+	}
+
 	return true;
 }
 
@@ -111,10 +130,18 @@
 }
 
 phonecallbacks.loaded = function() {
+	
+	if( $('zapchan').options.length == 0) {
+		$('zapchan').style.display="none";
+		$('noanaloglines').style.display="";
+	}
+
 	var noneopt = document.createElement("OPTION");
 	$('zapchan').options.add(noneopt,0);
 	noneopt.value = "";
 	noneopt.innerText = "None";
+
+
 	parent.astmanEngine.config2list("extensions.conf", $('context'), new Array(), numcallbacks);
 }
 
@@ -333,7 +360,9 @@
 							<TD>Caller id:</TD>
 							<TD><input size='12' id='cid_number'  pattern='^[\d\-]*$' class="input8"></TD>
 							<TD>Analog Phone:</TD>
-							<TD><select size="1" id='zapchan' style='width:120px' class="input8"></select></TD>
+							<TD><select size="1" id='zapchan' style='width:120px' class="input8"></select>
+									<span id="noanaloglines" style="display:none"><I>&nbsp;No Analog lines installed.</I></span>
+							</TD>
 						</TR>
 						<TR>
 							<TD>Calling Rule:</TD>

Modified: trunk/config/users.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/users.html?view=diff&rev=268&r1=267&r2=268
==============================================================================
--- trunk/config/users.html (original)
+++ trunk/config/users.html Wed Jan 17 17:13:19 2007
@@ -35,7 +35,7 @@
 	var numcallbacks = new Object;
 	var fieldnames = new Array( 'delete', 'status', 'new', 'save', 'cancel','name','fullname','secret','email','cid_number','zapchan','context', 'hasvoicemail','hasdirectory','hassip','hasiax','hasmanager','callwaiting','threewaycalling','mailbox','hasagent','group','host');
 	var localextenlength;
-	var disallow_aliasextns;
+	var allow_aliasextns;
 
 	extencallbacks.format = function(t, x) {
 		if ((t.name != specialcontext))
@@ -57,10 +57,10 @@
 						}else{
 							localextenlength = 4;
 						}
-						if (t.fieldbyname['disallow_aliasextns'] && t.fieldbyname['disallow_aliasextns'].length){
-							disallow_aliasextns =  t.fieldbyname['disallow_aliasextns'] ;
+						if (t.fieldbyname['allow_aliasextns'] && t.fieldbyname['allow_aliasextns'].length){
+							allow_aliasextns =  t.fieldbyname['allow_aliasextns'] ;
 						}else{
-							disallow_aliasextns = 'no' ;
+							allow_aliasextns = 'no' ;
 						}
 				return null;
 			}
@@ -126,7 +126,7 @@
 			return false;
 		}
 
-		if(disallow_aliasextns == "yes"){	// check whether the selected analog line is assigned to another user extension
+		if(allow_aliasextns == "no"){	// check whether the selected analog line is assigned to another user extension
 				var tmp_usedanaloglines = [] ;
 				for ( var i=1; i < $('devices').stored_config.categories.length ; i++){
 						if ( $('devices').stored_config.categories[i].fieldbyname['zapchan'] && $('devices').stored_config.categories[i].fieldbyname.zapchan.length )
@@ -138,11 +138,13 @@
 				}
 		}
 
-		for(var k=0; k<$('devices').length; k++ ){
-			var tmp = $('devices').options[k].innerHTML.split(' -- '); 
-			if( tmp[0] ==  $('name').value   ){
-				alert("Sorry, an entry named " + $('name').value + " already exists!");
-				return false;
+		if($('devices').value != $('name').value){
+			for(var k=0; k<$('devices').length; k++ ){
+				var tmp = $('devices').options[k].innerHTML.split(' -- '); 
+				if( tmp[0] ==  $('name').value ){
+					alert("Sorry, an entry named " + $('name').value + " already exists!");
+					return false;
+				}
 			}
 		}
 
@@ -219,6 +221,10 @@
 	}
 
 	phonecallbacks.loaded = function() {
+		if( $('zapchan').options.length == 0) {
+			$('zapchan').style.display="none";
+			$('noanaloglines').style.display="";
+		}
 		var noneopt = document.createElement("OPTION");
 		//try {
 		$('zapchan').options.add(noneopt,0);
@@ -305,7 +311,8 @@
 												<tr onmouseover="show_tooltip('en', 'users', 2);"><td class="field_text">Password:</td><td><input size='5' id='secret' pattern='^[a-zA-Z_0-9]*$'  class="input8"></td></tr>
 												<tr onmouseover="show_tooltip('en', 'users', 3);"><td class="field_text">E-mail:</td><td><input size='20' id='email' pattern='^[0-9a-zA-Z\.\-\_\@]*$' class="input8"></td></tr>
 												<tr onmouseover="show_tooltip('en', 'users', 4);"><td class="field_text">Caller ID:</td><td><input size='12' id='cid_number'  pattern='^[\d\-]*$' class="input8"></td></tr>
-												<tr onmouseover="show_tooltip('en', 'users', 5);"><td class="field_text">Analog Phone:</td><td><select size="1" id='zapchan' style='width:120px' class="input8"></select></td></tr>
+												<tr onmouseover="show_tooltip('en', 'users', 5);"><td class="field_text">Analog Phone:</td><td><select size="1" id='zapchan' style='width:120px' class="input8"></select>
+												<span id="noanaloglines" style="display:none"><I>&nbsp;No Analog lines installed.</I></span></td></tr>
 												<tr onmouseover="show_tooltip('en', 'users', 6);"><td class="field_text">Dial Plan:</td><td><select size='1' id='context' style='width:120px' class="input8"></select></td></tr>
 												<tr><td colspan='2' align='center'><div style="height:15px" id='status'></div></td></tr>
 												<tr><td colspan='2' align='center'><input type='hidden' id='mailbox'><input type='hidden' id='group'></td></tr>

Modified: trunk/config/voicemail.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/voicemail.html?view=diff&rev=268&r1=267&r2=268
==============================================================================
--- trunk/config/voicemail.html (original)
+++ trunk/config/voicemail.html Wed Jan 17 17:13:19 2007
@@ -70,6 +70,15 @@
 		if (!check_patternonfields( ['name', 'maxgreet'] ) ){
 			return false;
 		}
+
+		for(var k=0; k<$('extensions').length; k++ ){
+			var tmp = $('extensions').options[k].innerHTML.split(' -- '); 
+			if( tmp[0] ==  $('name').value   ){
+				alert("Sorry, an entry named " + $('name').value + " already exists!");
+				return false;
+			}
+		}
+
 		return true;
 	}
 



More information about the asterisk-gui-commits mailing list