Index: trunk/core/kernel/utility/debugger/debugger.js =================================================================== diff -u -r4996 -r5063 --- trunk/core/kernel/utility/debugger/debugger.js (.../debugger.js) (revision 4996) +++ trunk/core/kernel/utility/debugger/debugger.js (.../debugger.js) (revision 5063) @@ -2,13 +2,14 @@ DebugReq.timeout = 5000; //5 seconds -DebugReq.makeRequest = function(p_url, p_busyReq, p_progId, p_successCallBack, p_errorCallBack, p_pass) { +DebugReq.makeRequest = function(p_url, p_busyReq, p_progId, p_successCallBack, p_errorCallBack, p_pass, p_object) { //p_url: the web service url //p_busyReq: is a request for this object currently in progress? //p_progId: element id where progress HTML should be shown //p_successCallBack: callback function for successful response //p_errorCallBack: callback function for erroneous response //p_pass: string of params to pass to callback functions + //p_object: object of params to pass to callback functions if (p_busyReq) { return; } @@ -21,9 +22,9 @@ p_busyReq = false; window.clearTimeout(toId); if (req.status == 200) { - p_successCallBack(req,p_pass); + p_successCallBack(req,p_pass,p_object); } else { - p_errorCallBack(req,p_pass); + p_errorCallBack(req,p_pass,p_object); } } } @@ -141,26 +142,31 @@ } Debugger.prototype.Query = function() { - DebugReq.makeRequest(this.DebugURL, this.busyRequest, '', this.successCallback, this.errorCallback, ''); + DebugReq.makeRequest(this.DebugURL, this.busyRequest, '', this.successCallback, this.errorCallback, '', this); } -Debugger.prototype.successCallback = function(p_req, p_pass) { +Debugger.prototype.successCallback = function(p_req, p_pass, p_object) { var contents = p_req.responseText; - contents = contents.split($Debugger.RowSeparator); + contents = contents.split(p_object.RowSeparator); if (contents.length == 1) { alert('error: '+p_req.responseText); - $Debugger.IsQueried = true; + p_object.IsQueried = true; return ; } for (var $i = 0; $i < contents.length - 1; $i++) { - $Debugger.AppendRow(contents[$i]); + p_object.AppendRow(contents[$i]); } - $Debugger.Refresh(); + p_object.Refresh(); } +Debugger.prototype.errorCallback = function(p_req, p_pass, p_object) { + alert('AJAX ERROR: '+DebugReq.getErrorHtml(p_req)); + p_object.Refresh(); +} + Debugger.prototype.Refresh = function() { // progress mether row this.RemoveRow(0); @@ -169,11 +175,6 @@ this.DebuggerDIV.scrollLeft = 0; } -Debugger.prototype.errorCallback = function(p_req, p_pass) { - alert('AJAX ERROR: '+DebugReq.getErrorHtml(p_req)); - $Debugger.Refresh(); -} - Debugger.prototype.Resize = function($e) { if (!this.DebuggerDIV) return false; var $pageTop = document.all ? document.body.offsetTop + document.body.scrollTop : window.scrollY;