pari: branch asterisknow r2132 - /branches/asterisknow/config/
SVN commits to the Asterisk-GUI project
asterisk-gui-commits at lists.digium.com
Fri Jan 11 17:51:28 CST 2008
Author: pari
Date: Fri Jan 11 17:51:27 2008
New Revision: 2132
URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=2132
Log:
bug fix: initiate USER_ZAPCHAN as empty string, which is causing the gui
to set the require_restart flag to true ( comparing 'undefined' against '' )
Modified:
branches/asterisknow/config/meetme.html
branches/asterisknow/config/queues.html
branches/asterisknow/config/users.html
Modified: branches/asterisknow/config/meetme.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/meetme.html?view=diff&rev=2132&r1=2131&r2=2132
==============================================================================
--- branches/asterisknow/config/meetme.html (original)
+++ branches/asterisknow/config/meetme.html Fri Jan 11 17:51:27 2008
@@ -123,10 +123,11 @@
var x;
var gen = _$('hiddenusers').stored_config.catbyname['general'];
var _ext = $('extensions') ;
+ try{
if (gen){
- x = gen.fieldbyname['userbase'];
+ x = (gen.fieldbyname['userbase'])?gen.fieldbyname['userbase']:6000;
for( var f=0; f < _ext.options.length ; f++ ){
- if( x < _ext.options[f].innerHTML.split(' -- ')[0] ){ break; }
+ if( x < Number(_ext.options[f].innerHTML.split(' -- ')[0]) ){ break; }
x++;
}
}else{
@@ -136,6 +137,7 @@
x = 6000; // a default value if one is not defined in users.conf's general context
}
}
+ }catch(err){x=6000;}
_$('pin').value = '';
_$('pinadmin').value = '';
enable_disable_fields(1);
Modified: branches/asterisknow/config/queues.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/queues.html?view=diff&rev=2132&r1=2131&r2=2132
==============================================================================
--- branches/asterisknow/config/queues.html (original)
+++ branches/asterisknow/config/queues.html Fri Jan 11 17:51:27 2008
@@ -229,7 +229,7 @@
callbacks.format = function (t,x){
if ((t.name == 'general')){
if ( t.fieldbyname['localextenlength'] && t.fieldbyname['localextenlength'].length){ localextenlength = parseInt(t.fieldbyname['localextenlength']) ; }
- if ( t.fieldbyname['userbase'] && t.fieldbyname['userbase'].length){ userbase = t.fieldbyname['userbase'] ; }
+ userbase = ( t.fieldbyname['userbase'] && t.fieldbyname['userbase'].length ) ? t.fieldbyname['userbase'] : 6000 ;
return null;
}
//if (t.name.substring(0,6) == 'trunk_')
@@ -303,19 +303,21 @@
queuecallbacks.newcategory = function(t) {
var tmp = null;
$('save_q').disabled=false;
+ try{
if ($('queues').stored_config.catbyname['general']){
tmp = objcopy($('queues').stored_config.catbyname['general']);
- x = userbase ;
+ var x = userbase ;
for( var f=0; f < $('queues').options.length ; f++ ){
if( x < $('queues').options[f].innerHTML.split(' -- ')[0] )
break;
x++;
- }
- tmp.name = x;
+ }
}else{
- tmp.name = 6000 ; // a default value if one is not defined in users.conf's general context
- }
-
+ var x = 6000 ; // a default value if one is not defined in users.conf's general context
+ }
+ }catch(err){ var x = 6000 ; }
+
+ tmp.name = x;
$('testmulti').innerHTML ="";
for (k=0;k< $('agents').length ;k++ ){
selectedagent = "selectedagent" + k;
Modified: branches/asterisknow/config/users.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/users.html?view=diff&rev=2132&r1=2131&r2=2132
==============================================================================
--- branches/asterisknow/config/users.html (original)
+++ branches/asterisknow/config/users.html Fri Jan 11 17:51:27 2008
@@ -38,7 +38,7 @@
var fieldnames_buynow = ['cust_firstName', 'cust_lastName', 'cust_company', 'cust_email', 'cust_phone', 'cust_street', 'cust_city', 'cust_state', 'cust_zip', 'cust_country'];
var userinfowidgets = {};
var userinfo_callbacks = {};
-var USER_ZAPCHAN ; // this global variable is used to know if the selected user's zapchan is changed between
+var USER_ZAPCHAN = '' ; // this global variable is used to know if the selected user's zapchan is changed between
// callbacks.postselect and callbacks.savechanges, if it is changed we set parent.REQUIRE_RESTART to true;
// and if parent.REQUIRE_RESTART is true - we nolonger care about updating/keeping track of this variable anyway.
@@ -163,6 +163,7 @@
gen.fieldbyname['disallow'] = 'all';
tmp = objcopy(gen);
+ try{
if (gen){
x = gen.fieldbyname['userbase'];
for( var f=0; f < _devices.options.length ; f++ ){
@@ -176,8 +177,9 @@
x = 6000; // a default value if one is not defined in users.conf's general context
}
}
+ if(isNaN(x)){x=6000;}
+ }catch(err){ x = 6000; }
tmp.name = x
-
return tmp;
}
callbacks.identifier = "extension";
More information about the asterisk-gui-commits
mailing list