Update of /cvsroot/magicajax/magicajax/Core/script
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32035/Core/script
Modified Files:
AjaxCallObject.js
Log Message:
Multiple trace windows if multiple AjaxCalls are 'loading'.
All trace windows closes before postback/form submit.
Index: AjaxCallObject.js
===================================================================
RCS file: /cvsroot/magicajax/magicajax/Core/script/AjaxCallObject.js,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** AjaxCallObject.js 22 Nov 2005 21:34:20 -0000 1.20
--- AjaxCallObject.js 23 Nov 2005 09:05:06 -0000 1.21
***************
*** 8,12 ****
__PreviousOnPageBeforeUnload = null;
__PreviousOnPageUnload = null;
! __TraceWindow = null;
function AjaxCallObject()
--- 8,12 ----
__PreviousOnPageBeforeUnload = null;
__PreviousOnPageUnload = null;
! __TraceWindows = new Array();
function AjaxCallObject()
***************
*** 96,99 ****
--- 96,100 ----
AjaxCallObject.prototype.OnFormSubmit = function()
{
+ AJAXCbo.ClearTracingWindows();
document.forms[0][__PageStateCacheName].value = "";
***************
*** 129,132 ****
--- 130,134 ----
AjaxCallObject.prototype.DoPostBack = function(eventTarget, eventArgument)
{
+ AJAXCbo.ClearTracingWindows();
document.forms[0][__PageStateCacheName].value = "";
***************
*** 430,436 ****
AjaxCallObject.prototype.CreateTracingWindow = function()
{
! if (__TraceWindow == null || __TraceWindow.closed)
! __TraceWindow = window.open("","_blank","location=no,resizable=yes,scrollbars=yes");
! this.TraceWindow = __TraceWindow;
}
--- 432,450 ----
AjaxCallObject.prototype.CreateTracingWindow = function()
{
! this.TraceWindow = window.open("","_blank","location=no,resizable=yes,scrollbars=yes");
! __TraceWindows.push(this.TraceWindow);
! }
!
! AjaxCallObject.prototype.ClearTracingWindows = function()
! {
! for (var i=0; i < __TraceWindows.length; i++)
! {
! if (__TraceWindows[i].closed || __TraceWindows[i].TraceFinished)
! {
! __TraceWindows[i].close();
! __TraceWindows.splice(i, 1);
! i--;
! }
! }
}
***************
*** 461,464 ****
--- 475,479 ----
this.WriteTrace("<b>------------------------------</b><br>");
this.TraceWindow.document.close();
+ this.TraceWindow.TraceFinished = true;
}
|