pari: branch 2.0 r3642 - /branches/2.0/config/js/astman.js
SVN commits to the Asterisk-GUI project
asterisk-gui-commits at lists.digium.com
Fri Aug 8 12:00:47 CDT 2008
Author: pari
Date: Fri Aug 8 12:00:46 2008
New Revision: 3642
URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=3642
Log:
return string instead of boolean ;
Modified:
branches/2.0/config/js/astman.js
Modified: branches/2.0/config/js/astman.js
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/config/js/astman.js?view=diff&rev=3642&r1=3641&r2=3642
==============================================================================
--- branches/2.0/config/js/astman.js (original)
+++ branches/2.0/config/js/astman.js Fri Aug 8 12:00:46 2008
@@ -2639,30 +2639,31 @@
listOfSynActions.prototype = {
new_action: function(action, cat, name, value, match){
+ var s="";
if( !parent.sessionData.PLATFORM.isAST_1_4 && this.FILE_CONTENT != null ){
// the update/delete/delcat commands fail in Asterisk 1.6.X/trunk if the corresponding category/variables are not found
// In Asterisk 1.4 we do not have to do this check
switch( action ){
case 'update':
- if( !this.FILE_CONTENT.hasOwnProperty(cat) || this.FILE_CONTENT[cat].indexOfLike(name+'=') == -1 ){
+ if( !this.FILE_CONTENT.hasOwnProperty(cat) ) return s;
+ if( this.FILE_CONTENT[cat].indexOfLike(name+'=') == -1 ){
action = 'append';
}
break;
case 'delete':
if( !this.FILE_CONTENT.hasOwnProperty(cat) || this.FILE_CONTENT[cat].indexOfLike(name+'=') == -1 ){
- return ;
+ return s;
}
break;
case 'delcat':
if( !this.FILE_CONTENT.hasOwnProperty(cat) ){
- return ;
+ return s;
}
break;
default: break;
}
}
- var s="";
var cnt = "" + this.actionCount;
if(this.actionCount > 5){
ASTGUI.ErrorLog('AG150'); // alert to developer
@@ -2733,23 +2734,25 @@
return this.current_batch_actionnumber;
},
build_action: function(action, count, cat, name, value, match){
+ var s="";
if( !parent.sessionData.PLATFORM.isAST_1_4 && this.FILE_CONTENT != null ){
// the update/delete/delcat commands fail in Asterisk 1.6.X/trunk if the corresponding category/variables are not found
// In Asterisk 1.4 we do not have to do this check
switch( action ){
case 'update':
- if( !this.FILE_CONTENT.hasOwnProperty(cat) || this.FILE_CONTENT[cat].indexOfLike(name+'=') == -1 ){
+ if( !this.FILE_CONTENT.hasOwnProperty(cat) ) return s;
+ if( this.FILE_CONTENT[cat].indexOfLike(name+'=') == -1 ){
action = 'append';
}
break;
case 'delete':
if( !this.FILE_CONTENT.hasOwnProperty(cat) || this.FILE_CONTENT[cat].indexOfLike(name+'=') == -1 ){
- return ;
+ return s;
}
break;
case 'delcat':
if( !this.FILE_CONTENT.hasOwnProperty(cat) ){
- return ;
+ return s;
}
break;
default: break;
@@ -2762,7 +2765,6 @@
// This should not be a problem for the time being, but I will fix this issue once i get everything else working with 'asterisk 1.4/1.6.0/trunk'
// Note: this is not an issue with listOfSynActions() as clearActions() will take care of updating the file changes
}
- var s="";
var cnt = "" + count;
while(cnt.length < 6)
cnt = "0" + cnt;
More information about the asterisk-gui-commits
mailing list