espiceland: branch 2.0 r5174 - /branches/2.0/config/js/astman.js
SVN commits to the Asterisk-GUI project
asterisk-gui-commits at lists.digium.com
Wed Apr 13 15:30:44 CDT 2011
Author: espiceland
Date: Wed Apr 13 15:30:41 2011
New Revision: 5174
URL: http://svnview.digium.com/svn/asterisk-gui?view=rev&rev=5174
Log:
Fix bug in extensions.conf app argument parsing function where string was added to return array only if it was empty. Also fix bug in function to empty a context where an already-empty context would cause an error and for callback functions to be ignored.
Modified:
branches/2.0/config/js/astman.js
Modified: branches/2.0/config/js/astman.js
URL: http://svnview.digium.com/svn/asterisk-gui/branches/2.0/config/js/astman.js?view=diff&rev=5174&r1=5173&r2=5174
==============================================================================
--- branches/2.0/config/js/astman.js (original)
+++ branches/2.0/config/js/astman.js Wed Apr 13 15:30:41 2011
@@ -1450,8 +1450,12 @@
});
x.callActions(ct.cb);
//}
- }catch(err){
- top.log.error(err.message);
+ } catch(err) {
+ if (err.contains("is null")) { /* Context was already empty */
+ ct.cb();
+ } else {
+ top.log.error(err.message);
+ }
}
},
@@ -1729,8 +1733,8 @@
var depth = 0;
var len = str.length;
for(var i=0; i<len; i++) {
- var char = str.charAt(i);
- switch(char) {
+ var next = str.charAt(i);
+ switch(next) {
case '(':
depth++;
break;
@@ -1754,16 +1758,16 @@
if (depth) {
depth--;
} else {
- stack.push("" + buffer + char);
+ stack.push("" + buffer + next);
buffer = '';
continue;
}
break;
}
- buffer += char;
- }
-
- if (buffer == '') {
+ buffer += next;
+ }
+
+ if (buffer != '') {
stack.push(buffer);
}
@@ -1771,7 +1775,6 @@
};
if(x.contains(',') ){
- nested_parse(x,',');
return nested_parse(x,',');
}
if(x.contains('|') ){
@@ -2936,11 +2939,12 @@
return toJSO( params.configFile_output );
};
- top.log.ajax("AJAX Request : reading '" + params.filename + "'");
if( top.sessionData.FileCache.hasOwnProperty(params.filename) && top.sessionData.FileCache[params.filename].modified == false){ // if file is in cache and is not modified since
+ top.log.debug("reading '" + params.filename + "' from cache.");
var s = top.sessionData.FileCache[params.filename].content ;
}else{
+ top.log.ajax("AJAX Request : reading '" + params.filename + "'");
if( parent.sessionData.PLATFORM.isAST_1_6 ){
var s = $.ajax({ url: ASTGUI.paths.rawman+'?action=getconfig&filename='+params.filename+'&category='+params.context, async: false }).responseText;
}else{
More information about the asterisk-gui-commits
mailing list