pari: branch 2.0 r3636 - /branches/2.0/config/js/pbx.js
SVN commits to the Asterisk-GUI project
asterisk-gui-commits at lists.digium.com
Thu Aug 7 14:07:51 CDT 2008
Author: pari
Date: Thu Aug 7 14:07:51 2008
New Revision: 3636
URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=3636
Log:
again Asterisk 1.6/trunk will fail a "updateconfig -> delete" request when the variable does not exist.
fixing in a couple of places, where we were doing blind deletes (to make sure there are no traces of any previous configuration)
This still needs to be fixed in the rest of the gui, on my way ..
Modified:
branches/2.0/config/js/pbx.js
Modified: branches/2.0/config/js/pbx.js
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/config/js/pbx.js?view=diff&rev=3636&r1=3635&r2=3636
==============================================================================
--- branches/2.0/config/js/pbx.js (original)
+++ branches/2.0/config/js/pbx.js Thu Aug 7 14:07:51 2008
@@ -625,6 +625,13 @@
// note: this function updates sessionData.pbxinfo['users'] before actually making the ajax requests
// we need to address this issue at some point in future
userinfo = ASTGUI.toCustomObject(userinfo) ;
+
+ var x = new listOfActions();
+ x.filename('users.conf');
+ if( sessionData.pbxinfo['users'].hasOwnProperty(exten) ){
+ x.new_action('delcat', exten, '', '');
+ }
+
var disallow = userinfo.getProperty('disallow') || 'all' ;
var allow = userinfo.getProperty('allow') || 'all' ;
sessionData.pbxinfo['users'][exten] = userinfo ;
@@ -632,9 +639,6 @@
sessionData.pbxinfo['users'][exten]['allow'] = allow ;
delete userinfo.disallow ;
delete userinfo.allow ;
- var x = new listOfActions();
- x.filename('users.conf');
- x.new_action('delcat', exten, '', '');
x.new_action('newcat', exten, '', '');
x.new_action('append', exten, 'username', exten );
x.new_action('append', exten, 'transfer', 'yes' );
@@ -642,11 +646,8 @@
x.new_action('append', exten, 'allow', allow );
x.new_action('append', exten, 'mailbox', userinfo.mailbox || exten );
sessionData.pbxinfo['users'][exten]['mailbox'] = userinfo.mailbox || exten ;
-
x.new_action('append', exten, 'call-limit', '100' );
sessionData.pbxinfo['users'][exten]['mailbox'] = '100' ;
-
-
if(userinfo.mailbox) delete userinfo.mailbox;
for( var d in userinfo ){ if( userinfo.hasOwnProperty(d) ) {
x.new_action( 'append', exten, d, userinfo[d] );
@@ -1164,7 +1165,9 @@
}
var x = new listOfActions();
x.filename('extensions.conf');
- x.new_action('delcat', dp_name, '', '');
+ if( sessionData.pbxinfo.callingPlans.hasOwnProperty(dp_name) ){
+ x.new_action('delcat', dp_name, '', '') ;
+ }
x.new_action('newcat', dp_name , '', ''); // create new callplan
dp.includes.each( function(include_context) {
x.new_action( 'append', dp_name , 'include' , include_context );
More information about the asterisk-gui-commits
mailing list