espiceland: branch 2.0 r5089 - in /branches/2.0/config/js: iax.js sip.js
SVN commits to the Asterisk-GUI project
asterisk-gui-commits at lists.digium.com
Thu Oct 7 15:04:40 CDT 2010
Author: espiceland
Date: Thu Oct 7 15:04:37 2010
New Revision: 5089
URL: http://svnview.digium.com/svn/asterisk-gui?view=rev&rev=5089
Log:
Fix issue with advanced SIP and IAX settings where blanking out a value in the GUI resulted in the parameter remaining in the config file in the form "paramater=". Fixes ASTGUI-236.
Modified:
branches/2.0/config/js/iax.js
branches/2.0/config/js/sip.js
Modified: branches/2.0/config/js/iax.js
URL: http://svnview.digium.com/svn/asterisk-gui/branches/2.0/config/js/iax.js?view=diff&rev=5089&r1=5088&r2=5089
==============================================================================
--- branches/2.0/config/js/iax.js (original)
+++ branches/2.0/config/js/iax.js Thu Oct 7 15:04:37 2010
@@ -79,13 +79,15 @@
var x = new listOfActions('iax.conf');
var AG = ASTGUI.getFieldValue;
fieldnames.each( function(fld){
- var val = AG(fld) ;
- if (skip_ifempty.contains(fld)) {
- if (val.trim() == "") {
+ var val = AG(fld).trim();
+ if (val == "") {
+ if (skip_ifempty.contains(fld)) {
return;
}
+ x.new_action('delete', cat , fld , '') ;
+ }else{
+ x.new_action('update', cat , fld , val) ;
}
- x.new_action('update', cat , fld , val) ;
});
x.new_action('delete', cat , 'disallow', '' ) ;
x.new_action('delete', cat , 'allow', '' ) ;
Modified: branches/2.0/config/js/sip.js
URL: http://svnview.digium.com/svn/asterisk-gui/branches/2.0/config/js/sip.js?view=diff&rev=5089&r1=5088&r2=5089
==============================================================================
--- branches/2.0/config/js/sip.js (original)
+++ branches/2.0/config/js/sip.js Thu Oct 7 15:04:37 2010
@@ -82,13 +82,15 @@
var x = new listOfActions('sip.conf');
var AG = ASTGUI.getFieldValue;
fieldnames.each( function(fld){
- var val = AG(fld);
- if (skip_ifempty.contains(fld)) {
- if (val.trim() == "") {
+ var val = AG(fld).trim();
+ if (val == "") {
+ if (skip_ifempty.contains(fld)) {
return;
}
+ x.new_action('delete', cat , fld , '') ;
+ }else{
+ x.new_action('update', cat , fld , val) ;
}
- x.new_action('update', cat , fld , val) ;
});
x.new_action('delete', cat , 'disallow', '' ) ;
x.new_action('delete', cat , 'allow', '' ) ;
More information about the asterisk-gui-commits
mailing list