pari: branch 2.0 r4249 - /branches/2.0/config/js/astman.js

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Mon Dec 1 15:49:41 CST 2008


Author: pari
Date: Mon Dec  1 15:49:40 2008
New Revision: 4249

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=4249
Log:

update ASTGUI.loadHTML() to async mode in listSystemFiles()



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=4249&r1=4248&r2=4249
==============================================================================
--- branches/2.0/config/js/astman.js (original)
+++ branches/2.0/config/js/astman.js Mon Dec  1 15:49:40 2008
@@ -1234,16 +1234,17 @@
 		// list of files in 'dir' will be sent to callBackFunction as an array
 		try{
 		this.systemCmd( top.sessionData.directories.script_ListFiles + ' ' +  dir , function(){
-			var op = ASTGUI.loadHTML( top.sessionData.directories.output_SysInfo );
-			var tmp_files = op.split('\n');
-			var files = [];
-			for( var i =0 ; i < tmp_files.length ; i++){
-				if( typeof tmp_files[i] == "undefined" ){ continue; }
-				tmp_files[i] = tmp_files[i].trim();
-				if( tmp_files[i] == "" ){ continue; }
-				files.push(tmp_files[i]);
-			}
-			cb(files);
+			ASTGUI.loadHTML( top.sessionData.directories.output_SysInfo , function(op){
+				var tmp_files = op.split('\n');
+				var files = [];
+				for( var i =0 ; i < tmp_files.length ; i++){
+					if( typeof tmp_files[i] == "undefined" ){ continue; }
+					tmp_files[i] = tmp_files[i].trim();
+					if( tmp_files[i] == "" ){ continue; }
+					files.push(tmp_files[i]);
+				}
+				cb(files);
+			});
 		});
 		}catch(err){
 			ASTGUI.Log.Error(err.description);




More information about the asterisk-gui-commits mailing list