pari: trunk r389 - /trunk/config/
asterisk-gui-commits at lists.digium.com
asterisk-gui-commits at lists.digium.com
Wed Feb 28 10:37:05 MST 2007
Author: pari
Date: Wed Feb 28 11:37:04 2007
New Revision: 389
URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=389
Log:
New option to choose that 'Local Extensions can be any digits in length'
Modified:
trunk/config/localexts.html
trunk/config/meetme.html
trunk/config/menus.html
trunk/config/queues.html
trunk/config/users.html
trunk/config/voicemail.html
Modified: trunk/config/localexts.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/localexts.html?view=diff&rev=389&r1=388&r2=389
==============================================================================
--- trunk/config/localexts.html (original)
+++ trunk/config/localexts.html Wed Feb 28 11:37:04 2007
@@ -46,7 +46,7 @@
}
usercallbacks.beforeSaving= function(){
- if( $('localextenlength').value != $('userbase').value.length ){
+ if( $('localextenlength').value !=0 && $('localextenlength').value != $('userbase').value.length ){
alert("'length of Local Extensions' does not match \n the 'length of the Starting point of Allocation'");
return false;
}
@@ -97,6 +97,7 @@
function update_spae(){
+ if( $('localextenlength').value == 0 ) return;
if( $('localextenlength').value == $('userbase').value.length ) return;
if( $('localextenlength').value < $('userbase').value.length ){
$('userbase').value = $('userbase').value.substr(0,$('localextenlength').value);
@@ -138,8 +139,9 @@
<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 </td>
+ <option value="2">2 digits</option><option value="3">3 digits</option><option value="4">4 digits</option><option value="5">5 digits</option>
+ <option value="0">Varying</option>
+ </select> </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>
Modified: trunk/config/meetme.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/meetme.html?view=diff&rev=389&r1=388&r2=389
==============================================================================
--- trunk/config/meetme.html (original)
+++ trunk/config/meetme.html Wed Feb 28 11:37:04 2007
@@ -232,7 +232,9 @@
}
// check whether the length of extension is valid
- if( localextenlength != $('name').value.length){
+ if( !$('name').value.length ) { alert("Please enter an extension !"); $('name').focus(); return false; }
+
+ if( localextenlength !=0 && (localextenlength != $('name').value.length) ){
alert("Sorry, An Extension must be "+ localextenlength + " digits !");
$('name').focus();
return false;
Modified: trunk/config/menus.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/menus.html?view=diff&rev=389&r1=388&r2=389
==============================================================================
--- trunk/config/menus.html (original)
+++ trunk/config/menus.html Wed Feb 28 11:37:04 2007
@@ -367,7 +367,7 @@
function save_vmenu(){
- if( $('alias_exten').value.length > 0 && localextenlength != $('alias_exten').value.length){
+ if( $('alias_exten').value.length > 0 && localextenlength !=0 && localextenlength != $('alias_exten').value.length){
alert("Sorry, An Extension must be "+ localextenlength + " digits !");
$('alias_exten').focus();
return false;
Modified: trunk/config/queues.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/queues.html?view=diff&rev=389&r1=388&r2=389
==============================================================================
--- trunk/config/queues.html (original)
+++ trunk/config/queues.html Wed Feb 28 11:37:04 2007
@@ -178,8 +178,8 @@
$('fullname').focus();
return;
}
- if( localextenlength != $('name').value.length){
- alert("Sorry, An Extension must be "+ localextenlength + " digits !");
+ if( localextenlength !=0 && (localextenlength != $('name').value.length) ) {
+ alert("Sorry, An Extension must be "+ localextenlength + " digits !");
$('name').focus();
return ;
}
Modified: trunk/config/users.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/users.html?view=diff&rev=389&r1=388&r2=389
==============================================================================
--- trunk/config/users.html (original)
+++ trunk/config/users.html Wed Feb 28 11:37:04 2007
@@ -130,7 +130,7 @@
return false;
}
// check whether the length of extension is valid
- if( allow_an_extns == "no" && localextenlength != $('name').value.length){
+ if( localextenlength !=0 && (allow_an_extns == "no" && localextenlength != $('name').value.length) ){
alert("Sorry, User Extension must be "+ localextenlength + " digits !");
$('name').focus();
return false;
Modified: trunk/config/voicemail.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/voicemail.html?view=diff&rev=389&r1=388&r2=389
==============================================================================
--- trunk/config/voicemail.html (original)
+++ trunk/config/voicemail.html Wed Feb 28 11:37:04 2007
@@ -56,12 +56,7 @@
}
callbacks.beforeSaving = function(){
- // check whether the length of extension is valid
- if( localextenlength != $('name').value.length){
- alert("Sorry, An Extension must be "+ localextenlength + " digits !");
- $('name').focus();
- return false;
- }
+ if( !checklength() ){ return false; }
if (!check_patternonfields( ['name', 'maxgreet'] ) ){
return false;
}
@@ -213,11 +208,7 @@
voicemailcallbacks.beforeSaving = function(){
// check whether the length of extension is valid
- if( localextenlength != $('name').value.length){
- alert("Sorry, An Extension must be "+ localextenlength + " digits !");
- $('name').focus();
- return false;
- }
+ if( !checklength( ) ){ return false; }
if (!check_patternonfields( ['name', 'maxgreet'] ) ){
return false;
}
@@ -258,6 +249,19 @@
return "General";
}
+ function checklength(){
+ // check whether the length of extension is valid
+ if( !$('name').value.length ) { alert("Please enter an extension !"); $('name').focus(); return false; }
+
+ if( localextenlength !=0 && ( localextenlength != $('name').value.length ) ) {
+ alert("Sorry, An Extension must be "+ localextenlength + " digits !");
+ $('name').focus();
+ return false;
+ }
+ return true;
+ }
+
+
function localajaxinit() {
setWindowTitle("Voicemail");
//$('advancedi').style.width = $('split').width - 60;
More information about the asterisk-gui-commits
mailing list