rem
stringlengths 0
126k
| add
stringlengths 0
441k
| context
stringlengths 15
136k
|
---|---|---|
error = function() { counter.error++ }; $.ajaxTimeout(0); $.ajax({url: "data/name.php", global: false, success: success, error: error, complete: function() { ok( counter.error == 0, 'Check sucesful request without globals' ); ok( counter.success == 1, 'Check sucesful request without globals' ); ok( counter.complete == 0, 'Check sucesful request without globals' ); | error = function() { counter.error++ }, complete = function() { counter.complete++ }; $('#foo').ajaxStart(complete).ajaxStop(complete).ajaxComplete(complete).ajaxError(error).ajaxSuccess(success); $.ajax({url: "data/name.php", success: success, error: error, complete: function() { ok( counter.error == 0, 'Check succesful request' ); ok( counter.success == 2, 'Check succesful request' ); ok( counter.complete == 3, 'Check succesful request' ); | test("test global handlers - failure", function() { expect(6); stop(); var counter = { complete: 0, success: 0, error: 0 }, success = function() { counter.success++ }, error = function() { counter.error++ }; $.ajaxTimeout(0); $.ajax({url: "data/name.php", global: false, success: success, error: error, complete: function() { ok( counter.error == 0, 'Check sucesful request without globals' ); ok( counter.success == 1, 'Check sucesful request without globals' ); ok( counter.complete == 0, 'Check sucesful request without globals' ); counter.error = counter.success = counter.complete = 0; $.ajaxTimeout(500); $.ajax({url: "data/name.php?wait=5", global: false, success: success, error: error, complete: function() { ok( counter.error == 1, 'Check failed request without globals' ); ok( counter.success == 0, 'Check failed request without globals' ); ok( counter.complete == 0, 'Check failed request without globals' ); start(); }}); }});}); |
$.ajax({url: "data/name.php?wait=5", global: false, success: success, error: error, complete: function() { ok( counter.error == 1, 'Check failed request without globals' ); ok( counter.success == 0, 'Check failed request without globals' ); ok( counter.complete == 0, 'Check failed request without globals' ); start(); | $.ajax({url: "data/name.php?wait=5", success: success, error: error, complete: function() { ok( counter.error == 2, 'Check failed request' ); ok( counter.success == 0, 'Check failed request' ); ok( counter.complete == 3, 'Check failed request' ); start(); | test("test global handlers - failure", function() { expect(6); stop(); var counter = { complete: 0, success: 0, error: 0 }, success = function() { counter.success++ }, error = function() { counter.error++ }; $.ajaxTimeout(0); $.ajax({url: "data/name.php", global: false, success: success, error: error, complete: function() { ok( counter.error == 0, 'Check sucesful request without globals' ); ok( counter.success == 1, 'Check sucesful request without globals' ); ok( counter.complete == 0, 'Check sucesful request without globals' ); counter.error = counter.success = counter.complete = 0; $.ajaxTimeout(500); $.ajax({url: "data/name.php?wait=5", global: false, success: success, error: error, complete: function() { ok( counter.error == 1, 'Check failed request without globals' ); ok( counter.success == 0, 'Check failed request without globals' ); ok( counter.complete == 0, 'Check failed request without globals' ); start(); }}); }});}); |
function() { gProgressMeterPanel.collapsed = true; gProgressCollapseTimer = null; }, 100); | setTimeout(function() { this.WebSearch(); }, 0); | function() { gProgressMeterPanel.collapsed = true; gProgressCollapseTimer = null; }, 100); |
}), arguments ); | })); | return this.pushStack( jQuery.map( this, function(a){ return jQuery.find(t,a); }), arguments ); |
return this.pushStack( jQuery.map( this, function(a){ return jQuery.find(t,a); }), arguments ); | return this.domManip(arguments, false, -1, function(a){ this.parentNode.insertBefore( a, this.nextSibling ); }); | return this.pushStack( jQuery.map( this, function(a){ return jQuery.find(t,a); }), arguments ); |
jQuery.ajax( "POST", url, jQuery.param(data), function(r) { if ( callback ) callback( jQuery.httpData(r,type) ); | jQuery.ajax( "POST", url, jQuery.param(data), function(r, status) { if ( callback ) callback( jQuery.httpData(r,type), status ); | jQuery.ajax( "POST", url, jQuery.param(data), function(r) { if ( callback ) callback( jQuery.httpData(r,type) ); }); |
jQuery.class.remove(this,c); | jQuery.className.remove(this,c); | return this.each(function(){ if (jQuery.hasWord(this,c)) jQuery.class.remove(this,c); else jQuery.class.add(this,c); }); |
jQuery.class.add(this,c); | jQuery.className.add(this,c); | return this.each(function(){ if (jQuery.hasWord(this,c)) jQuery.class.remove(this,c); else jQuery.class.add(this,c); }); |
return this.bind(o, function(e){ if ( this[o+f] !== null ) return true; this[o+f]++; return f.apply(this, [e]); }); | jQuery.safariTimer = setInterval(function(){ if ( document.readyState == "loaded" || document.readyState == "complete" ) { clearInterval( jQuery.safariTimer ); jQuery.safariTimer = null; jQuery.ready(); } }, 10); | return this.bind(o, function(e){ // TODO: Remove the event listener, instead of this hack // If this function has already been executed, stop if ( this[o+f] !== null ) return true; // Otherwise, mark as having been executed this[o+f]++; // And execute the bound function return f.apply(this, [e]); }); |
return this.domManip(arguments, false, -1, function(a){ this.parentNode.insertBefore( a, this.nextSibling ); }); | return this.pushStack( jQuery.map( this, function(a){ return jQuery.find(t,a); }), arguments ); | return this.domManip(arguments, false, -1, function(a){ this.parentNode.insertBefore( a, this.nextSibling ); }); |
if ( count++ ) return; | if ( count++ ) return true; | jQuery.event.add( this, o, function(e){ // If this function has already been executed, stop if ( count++ ) return; // And execute the bound function return f.apply(this, [e]); }); |
jQuery.event.add( this, o, function(e){ if ( count++ ) return true; return f.apply(this, [e]); }); | if (jQuery.browser.msie) jQuery(window).unload(function() { var event = jQuery.event, global = event.global; for (var type in global) { var els = global[type], i = els.length; if (i>0) do if (type != 'unload') event.remove(els[i-1], type); while (--i); } }); | jQuery.event.add( this, o, function(e){ // If this function has already been executed, stop if ( count++ ) return true; // And execute the bound function return f.apply(this, [e]); }); |
expect(6); | expect(8); | test("test global handlers - success", function() { expect(6); stop(); var counter = { complete: 0, success: 0, error: 0 }, success = function() { counter.success++ }, error = function() { counter.error++ }, complete = function() { counter.complete++ }; $('#foo').ajaxStart(complete).ajaxStop(complete).ajaxComplete(complete).ajaxError(error).ajaxSuccess(success); // start with successful test $.ajax({url: "data/name.php", success: success, error: error, complete: function() { ok( counter.error == 0, 'Check succesful request' ); ok( counter.success == 2, 'Check succesful request' ); ok( counter.complete == 3, 'Check succesful request' ); counter.error = counter.success = counter.complete = 0; $.ajaxTimeout(500); $.ajax({url: "data/name.php?wait=5", success: success, error: error, complete: function() { ok( counter.error == 2, 'Check failed request' ); ok( counter.success == 0, 'Check failed request' ); ok( counter.complete == 3, 'Check failed request' ); start(); }}); }});}); |
var counter = { complete: 0, success: 0, error: 0 }, | var counter = { complete: 0, success: 0, error: 0, send: 0 }, | test("test global handlers - success", function() { expect(6); stop(); var counter = { complete: 0, success: 0, error: 0 }, success = function() { counter.success++ }, error = function() { counter.error++ }, complete = function() { counter.complete++ }; $('#foo').ajaxStart(complete).ajaxStop(complete).ajaxComplete(complete).ajaxError(error).ajaxSuccess(success); // start with successful test $.ajax({url: "data/name.php", success: success, error: error, complete: function() { ok( counter.error == 0, 'Check succesful request' ); ok( counter.success == 2, 'Check succesful request' ); ok( counter.complete == 3, 'Check succesful request' ); counter.error = counter.success = counter.complete = 0; $.ajaxTimeout(500); $.ajax({url: "data/name.php?wait=5", success: success, error: error, complete: function() { ok( counter.error == 2, 'Check failed request' ); ok( counter.success == 0, 'Check failed request' ); ok( counter.complete == 3, 'Check failed request' ); start(); }}); }});}); |
complete = function() { counter.complete++ }; | complete = function() { counter.complete++ }, send = function() { counter.send++ }; | test("test global handlers - success", function() { expect(6); stop(); var counter = { complete: 0, success: 0, error: 0 }, success = function() { counter.success++ }, error = function() { counter.error++ }, complete = function() { counter.complete++ }; $('#foo').ajaxStart(complete).ajaxStop(complete).ajaxComplete(complete).ajaxError(error).ajaxSuccess(success); // start with successful test $.ajax({url: "data/name.php", success: success, error: error, complete: function() { ok( counter.error == 0, 'Check succesful request' ); ok( counter.success == 2, 'Check succesful request' ); ok( counter.complete == 3, 'Check succesful request' ); counter.error = counter.success = counter.complete = 0; $.ajaxTimeout(500); $.ajax({url: "data/name.php?wait=5", success: success, error: error, complete: function() { ok( counter.error == 2, 'Check failed request' ); ok( counter.success == 0, 'Check failed request' ); ok( counter.complete == 3, 'Check failed request' ); start(); }}); }});}); |
$('#foo').ajaxStart(complete).ajaxStop(complete).ajaxComplete(complete).ajaxError(error).ajaxSuccess(success); | $('#foo').ajaxStart(complete).ajaxStop(complete).ajaxSend(send).ajaxComplete(complete).ajaxError(error).ajaxSuccess(success); | test("test global handlers - success", function() { expect(6); stop(); var counter = { complete: 0, success: 0, error: 0 }, success = function() { counter.success++ }, error = function() { counter.error++ }, complete = function() { counter.complete++ }; $('#foo').ajaxStart(complete).ajaxStop(complete).ajaxComplete(complete).ajaxError(error).ajaxSuccess(success); // start with successful test $.ajax({url: "data/name.php", success: success, error: error, complete: function() { ok( counter.error == 0, 'Check succesful request' ); ok( counter.success == 2, 'Check succesful request' ); ok( counter.complete == 3, 'Check succesful request' ); counter.error = counter.success = counter.complete = 0; $.ajaxTimeout(500); $.ajax({url: "data/name.php?wait=5", success: success, error: error, complete: function() { ok( counter.error == 2, 'Check failed request' ); ok( counter.success == 0, 'Check failed request' ); ok( counter.complete == 3, 'Check failed request' ); start(); }}); }});}); |
$.ajax({url: "data/name.php", success: success, error: error, complete: function() { | $.ajax({url: "data/name.php", beforeSend: send, success: success, error: error, complete: function() { | test("test global handlers - success", function() { expect(6); stop(); var counter = { complete: 0, success: 0, error: 0 }, success = function() { counter.success++ }, error = function() { counter.error++ }, complete = function() { counter.complete++ }; $('#foo').ajaxStart(complete).ajaxStop(complete).ajaxComplete(complete).ajaxError(error).ajaxSuccess(success); // start with successful test $.ajax({url: "data/name.php", success: success, error: error, complete: function() { ok( counter.error == 0, 'Check succesful request' ); ok( counter.success == 2, 'Check succesful request' ); ok( counter.complete == 3, 'Check succesful request' ); counter.error = counter.success = counter.complete = 0; $.ajaxTimeout(500); $.ajax({url: "data/name.php?wait=5", success: success, error: error, complete: function() { ok( counter.error == 2, 'Check failed request' ); ok( counter.success == 0, 'Check failed request' ); ok( counter.complete == 3, 'Check failed request' ); start(); }}); }});}); |
counter.error = counter.success = counter.complete = 0; | ok( counter.send == 2, 'Check succesful request' ); counter.error = counter.success = counter.complete = counter.send = 0; | test("test global handlers - success", function() { expect(6); stop(); var counter = { complete: 0, success: 0, error: 0 }, success = function() { counter.success++ }, error = function() { counter.error++ }, complete = function() { counter.complete++ }; $('#foo').ajaxStart(complete).ajaxStop(complete).ajaxComplete(complete).ajaxError(error).ajaxSuccess(success); // start with successful test $.ajax({url: "data/name.php", success: success, error: error, complete: function() { ok( counter.error == 0, 'Check succesful request' ); ok( counter.success == 2, 'Check succesful request' ); ok( counter.complete == 3, 'Check succesful request' ); counter.error = counter.success = counter.complete = 0; $.ajaxTimeout(500); $.ajax({url: "data/name.php?wait=5", success: success, error: error, complete: function() { ok( counter.error == 2, 'Check failed request' ); ok( counter.success == 0, 'Check failed request' ); ok( counter.complete == 3, 'Check failed request' ); start(); }}); }});}); |
$.ajax({url: "data/name.php?wait=5", success: success, error: error, complete: function() { | $.ajax({url: "data/name.php?wait=5", beforeSend: send, success: success, error: error, complete: function() { | test("test global handlers - success", function() { expect(6); stop(); var counter = { complete: 0, success: 0, error: 0 }, success = function() { counter.success++ }, error = function() { counter.error++ }, complete = function() { counter.complete++ }; $('#foo').ajaxStart(complete).ajaxStop(complete).ajaxComplete(complete).ajaxError(error).ajaxSuccess(success); // start with successful test $.ajax({url: "data/name.php", success: success, error: error, complete: function() { ok( counter.error == 0, 'Check succesful request' ); ok( counter.success == 2, 'Check succesful request' ); ok( counter.complete == 3, 'Check succesful request' ); counter.error = counter.success = counter.complete = 0; $.ajaxTimeout(500); $.ajax({url: "data/name.php?wait=5", success: success, error: error, complete: function() { ok( counter.error == 2, 'Check failed request' ); ok( counter.success == 0, 'Check failed request' ); ok( counter.complete == 3, 'Check failed request' ); start(); }}); }});}); |
ok( counter.send == 2, 'Check failed request' ); | test("test global handlers - success", function() { expect(6); stop(); var counter = { complete: 0, success: 0, error: 0 }, success = function() { counter.success++ }, error = function() { counter.error++ }, complete = function() { counter.complete++ }; $('#foo').ajaxStart(complete).ajaxStop(complete).ajaxComplete(complete).ajaxError(error).ajaxSuccess(success); // start with successful test $.ajax({url: "data/name.php", success: success, error: error, complete: function() { ok( counter.error == 0, 'Check succesful request' ); ok( counter.success == 2, 'Check succesful request' ); ok( counter.complete == 3, 'Check succesful request' ); counter.error = counter.success = counter.complete = 0; $.ajaxTimeout(500); $.ajax({url: "data/name.php?wait=5", success: success, error: error, complete: function() { ok( counter.error == 2, 'Check failed request' ); ok( counter.success == 0, 'Check failed request' ); ok( counter.complete == 3, 'Check failed request' ); start(); }}); }});}); |
|
jQuery.safariTimer = setInterval(function(){ if ( document.readyState == "loaded" || document.readyState == "complete" ) { clearInterval( jQuery.safariTimer ); jQuery.safariTimer = null; jQuery.ready(); } }, 10); | jQuery.event.add( this, o, function(e){ if ( count++ ) return; return f.apply(this, [e]); }); | jQuery.safariTimer = setInterval(function(){ // loaded and complete are both valid states if ( document.readyState == "loaded" || document.readyState == "complete" ) { // If either one are found, remove the timer clearInterval( jQuery.safariTimer ); jQuery.safariTimer = null; // and execute any waiting functions jQuery.ready(); } }, 10); |
this.className = !c ? '' : this.className.replace( new RegExp('(^|\\s*\\b[^-])'+c+'($|\\b(?=[^-]))', 'g'), ''); }); | if ($.hasWord(this,c)) $.class.remove(this,c); else $.class.add(this,c); }); | return this.each(function(){ this.className = !c ? '' : this.className.replace( new RegExp('(^|\\s*\\b[^-])'+c+'($|\\b(?=[^-]))', 'g'), ''); }); |
setTimeout(function() { if (document.getElementById("highlight").checked) toggleHighlight(true); }, 0); | setTimeout(function() { self.asyncUpdateUI(); }, 0); | setTimeout(function() { if (document.getElementById("highlight").checked) toggleHighlight(true); }, 0); |
y.overflow = z.oo; if(y.height=="0px"||y.width=="0px"){z.ss("none");} if ( ty != "opacity" && z.o.auto ) { $.setAuto( z.el, "height" ); $.setAuto( z.el, "width" ); } if(z.o.onComplete.constructor == Function){z.el.$_ = z.o.onComplete;z.el.$_();} },13); | $(self).center(true); }, 13); | setTimeout(function(){ y.overflow = z.oo; if(y.height=="0px"||y.width=="0px"){z.ss("none");} if ( ty != "opacity" && z.o.auto ) { $.setAuto( z.el, "height" ); $.setAuto( z.el, "width" ); } if(z.o.onComplete.constructor == Function){z.el.$_ = z.o.onComplete;z.el.$_();} },13); |
test("test global handlers - failure", function() { expect(6); | test("$.get(String, Hash, Function) - parse xml and use text() on nodes", function() { expect(2); | test("test global handlers - failure", function() { expect(6); stop(); var counter = { complete: 0, success: 0, error: 0 }, success = function() { counter.success++ }, error = function() { counter.error++ }; $.ajaxTimeout(0); $.ajax({url: "data/name.php", global: false, success: success, error: error, complete: function() { ok( counter.error == 0, 'Check sucesful request without globals' ); ok( counter.success == 1, 'Check sucesful request without globals' ); ok( counter.complete == 0, 'Check sucesful request without globals' ); counter.error = counter.success = counter.complete = 0; $.ajaxTimeout(500); $.ajax({url: "data/name.php?wait=5", global: false, success: success, error: error, complete: function() { ok( counter.error == 1, 'Check failed request without globals' ); ok( counter.success == 0, 'Check failed request without globals' ); ok( counter.complete == 0, 'Check failed request without globals' ); start(); }}); }});}); |
var counter = { complete: 0, success: 0, error: 0 }, success = function() { counter.success++ }, error = function() { counter.error++ }; $.ajaxTimeout(0); $.ajax({url: "data/name.php", global: false, success: success, error: error, complete: function() { ok( counter.error == 0, 'Check sucesful request without globals' ); ok( counter.success == 1, 'Check sucesful request without globals' ); ok( counter.complete == 0, 'Check sucesful request without globals' ); counter.error = counter.success = counter.complete = 0; $.ajaxTimeout(500); $.ajax({url: "data/name.php?wait=5", global: false, success: success, error: error, complete: function() { ok( counter.error == 1, 'Check failed request without globals' ); ok( counter.success == 0, 'Check failed request without globals' ); ok( counter.complete == 0, 'Check failed request without globals' ); start(); }}); }}); | $.get('data/dashboard.xml', function(xml) { var content = []; $('tab', xml).each(function() { content.push($(this).text()); }); ok( content[0] == 'blabla', 'Check first tab'); ok( content[1] == 'blublu', 'Check second tab'); start(); }); | test("test global handlers - failure", function() { expect(6); stop(); var counter = { complete: 0, success: 0, error: 0 }, success = function() { counter.success++ }, error = function() { counter.error++ }; $.ajaxTimeout(0); $.ajax({url: "data/name.php", global: false, success: success, error: error, complete: function() { ok( counter.error == 0, 'Check sucesful request without globals' ); ok( counter.success == 1, 'Check sucesful request without globals' ); ok( counter.complete == 0, 'Check sucesful request without globals' ); counter.error = counter.success = counter.complete = 0; $.ajaxTimeout(500); $.ajax({url: "data/name.php?wait=5", global: false, success: success, error: error, complete: function() { ok( counter.error == 1, 'Check failed request without globals' ); ok( counter.success == 0, 'Check failed request without globals' ); ok( counter.complete == 0, 'Check failed request without globals' ); start(); }}); }});}); |
$.setAuto( z.el, "height" ); $.setAuto( z.el, "width" ); | if ( ty != "opacity" ) { $.setAuto( z.el, "height" ); $.setAuto( z.el, "width" ); } | setTimeout(function(){ y.overflow = z.oo; if(y.height=="0px"||y.width=="0px")z.ss("none"); $.setAuto( z.el, "height" ); $.setAuto( z.el, "width" ); if(z.o.onComplete.constructor == Function){z.el.$_ = z.o.onComplete;z.el.$_();} },13); |
setTimeout(function(){ if (xml) { xml.abort(); if ( !requestDone ) onreadystatechange( "timeout" ); xml = null; } }, timeout); | jQuery.ajax( "POST", url, jQuery.param(data), function(r, status) { if ( callback ) callback( jQuery.httpData(r,type), status ); }); | setTimeout(function(){ // Check to see if the request is still happening if (xml) { // Cancel the request xml.abort(); if ( !requestDone ) onreadystatechange( "timeout" ); // Clear from memory xml = null; } }, timeout); |
if (xml) onreadystatechange(1); | if ( !requestDone ) onreadystatechange( "timeout" ); | setTimeout(function(){ // Check to see if the request is still happening if (xml) { // Cancel the request xml.abort(); // for Opera. Opera does't call onreadystatechange when aborted. if (xml) onreadystatechange(1); // Clear from memory xml = null; } }, jQuery.timeout); |
test("test global handlers - failure", function() { expect(8); stop(); var counter = { complete: 0, success: 0, error: 0, send: 0 }, success = function() { counter.success++ }, error = function() { counter.error++ }, complete = function() { counter.complete++ }, send = function() { counter.send++ }; $.ajaxTimeout(0); $('#foo').ajaxStart(complete).ajaxStop(complete).ajaxSend(send).ajaxComplete(complete).ajaxError(error).ajaxSuccess(success); $.ajax({url: "data/name.php", global: false, beforeSend: send, success: success, error: error, complete: function() { ok( counter.error == 0, 'Check sucesful request without globals' ); ok( counter.success == 1, 'Check sucesful request without globals' ); ok( counter.complete == 0, 'Check sucesful request without globals' ); ok( counter.send == 1, 'Check sucesful request without globals' ); counter.error = counter.success = counter.complete = counter.send = 0; $.ajaxTimeout(500); $.ajax({url: "data/name.php?wait=5", global: false, beforeSend: send, success: success, error: error, complete: function() { ok( counter.error == 1, 'Check failed request without globals' ); ok( counter.success == 0, 'Check failed request without globals' ); ok( counter.complete == 0, 'Check failed request without globals' ); ok( counter.send == 1, 'Check failed request without globals' ); start(); }}); }}); }); | $('#first').load('data/test.html', function() { ok( $('#first').html().match(/^html text/), 'Check content after loading html' ); ok( testFoo == "foo", 'Check if script was evaluated after load' ); setTimeout(verifyEvaluation, 600); }); | test("test global handlers - failure", function() { expect(8); stop(); var counter = { complete: 0, success: 0, error: 0, send: 0 }, success = function() { counter.success++ }, error = function() { counter.error++ }, complete = function() { counter.complete++ }, send = function() { counter.send++ }; $.ajaxTimeout(0); $('#foo').ajaxStart(complete).ajaxStop(complete).ajaxSend(send).ajaxComplete(complete).ajaxError(error).ajaxSuccess(success); $.ajax({url: "data/name.php", global: false, beforeSend: send, success: success, error: error, complete: function() { ok( counter.error == 0, 'Check sucesful request without globals' ); ok( counter.success == 1, 'Check sucesful request without globals' ); ok( counter.complete == 0, 'Check sucesful request without globals' ); ok( counter.send == 1, 'Check sucesful request without globals' ); counter.error = counter.success = counter.complete = counter.send = 0; $.ajaxTimeout(500); $.ajax({url: "data/name.php?wait=5", global: false, beforeSend: send, success: success, error: error, complete: function() { ok( counter.error == 1, 'Check failed request without globals' ); ok( counter.success == 0, 'Check failed request without globals' ); ok( counter.complete == 0, 'Check failed request without globals' ); ok( counter.send == 1, 'Check failed request without globals' ); start(); }}); }});}); |
this._forEachBrowserWindow(function(aWindow) { if (aWindow != window) { aWindow.close(); } }); | tabpanels.addEventListener("DOMNodeInserted", function(aEvent) { _this.onTabAdd(aEvent.currentTarget.ownerDocument.defaultView, aEvent.target); }, false); | this._forEachBrowserWindow(function(aWindow) { if (aWindow != window) { aWindow.close(); } }); |
return a ? this.each(function(){ new fx.FadeSize(this,o).hide(); }) : this._hide(); | setTimeout(function(){ y.overflow = z.oo; if(y.height=="0px"||y.width=="0px")z.ss("none"); $.setAuto( z.el, "height" ); $.setAuto( z.el, "width" ); if(z.o.onComplete.constructor == Function){z.el.$_ = z.o.onComplete;z.el.$_();} },13); | return a ? this.each(function(){ new fx.FadeSize(this,o).hide(); }) : this._hide(); |
test("$.get(String, Hash, Function) - parse xml and use text() on nodes", function() { expect(2); | test("test global handlers - failure", function() { expect(6); | test("$.get(String, Hash, Function) - parse xml and use text() on nodes", function() { expect(2); stop(); $.get('data/dashboard.xml', function(xml) { var content = []; $('tab', xml).each(function() { content.push($(this).text()); }); ok( content[0] == 'blabla', 'Check first tab'); ok( content[1] == 'blublu', 'Check second tab'); start(); });}); |
$.get('data/dashboard.xml', function(xml) { var content = []; $('tab', xml).each(function() { content.push($(this).text()); }); ok( content[0] == 'blabla', 'Check first tab'); ok( content[1] == 'blublu', 'Check second tab'); start(); }); | var counter = { complete: 0, success: 0, error: 0 }, success = function() { counter.success++ }, error = function() { counter.error++ }; $.ajaxTimeout(0); $.ajax({url: "data/name.php", global: false, success: success, error: error, complete: function() { ok( counter.error == 0, 'Check sucesful request without globals' ); ok( counter.success == 1, 'Check sucesful request without globals' ); ok( counter.complete == 0, 'Check sucesful request without globals' ); counter.error = counter.success = counter.complete = 0; $.ajaxTimeout(500); $.ajax({url: "data/name.php?wait=5", global: false, success: success, error: error, complete: function() { ok( counter.error == 1, 'Check failed request without globals' ); ok( counter.success == 0, 'Check failed request without globals' ); ok( counter.complete == 0, 'Check failed request without globals' ); start(); }}); }}); | test("$.get(String, Hash, Function) - parse xml and use text() on nodes", function() { expect(2); stop(); $.get('data/dashboard.xml', function(xml) { var content = []; $('tab', xml).each(function() { content.push($(this).text()); }); ok( content[0] == 'blabla', 'Check first tab'); ok( content[1] == 'blublu', 'Check second tab'); start(); });}); |
setTimeout(function() { findField.value = browser.findString; }, 0, findField, browser); | function() { gProgressMeterPanel.collapsed = true; gProgressCollapseTimer = null; }, 100); | setTimeout(function() { findField.value = browser.findString; }, 0, findField, browser); |
}), arguments ); | })); | return this.pushStack( jQuery.map( this, function(a){ return a.cloneNode( deep != undefined ? deep : true ); }), arguments ); |
return a.cloneNode( deep != undefined ? deep : true ); | return jQuery.find(t,a); | return this.pushStack( jQuery.map( this, function(a){ return a.cloneNode( deep != undefined ? deep : true ); }), arguments ); |
return jQuery.find(t,a); | return a.cloneNode( deep != undefined ? deep : true ); | return this.pushStack( jQuery.map( this, function(a){ return jQuery.find(t,a); }), arguments ); |
this.pushStack( jQuery.map(this,function(a){ | jQuery.map(this,function(a){ | this.pushStack( jQuery.map(this,function(a){ for ( var i = 0; i < t.length; i++ ) if ( jQuery.filter(t[i],[a]).r.length ) return a; }), arguments ) : |
}), arguments ) : | }) || | this.pushStack( jQuery.map(this,function(a){ for ( var i = 0; i < t.length; i++ ) if ( jQuery.filter(t[i],[a]).r.length ) return a; }), arguments ) : |
expect(6); | expect(8); | test("test global handlers - failure", function() { expect(6); stop(); var counter = { complete: 0, success: 0, error: 0 }, success = function() { counter.success++ }, error = function() { counter.error++ }; $.ajaxTimeout(0); $.ajax({url: "data/name.php", global: false, success: success, error: error, complete: function() { ok( counter.error == 0, 'Check sucesful request without globals' ); ok( counter.success == 1, 'Check sucesful request without globals' ); ok( counter.complete == 0, 'Check sucesful request without globals' ); counter.error = counter.success = counter.complete = 0; $.ajaxTimeout(500); $.ajax({url: "data/name.php?wait=5", global: false, success: success, error: error, complete: function() { ok( counter.error == 1, 'Check failed request without globals' ); ok( counter.success == 0, 'Check failed request without globals' ); ok( counter.complete == 0, 'Check failed request without globals' ); start(); }}); }});}); |
var counter = { complete: 0, success: 0, error: 0 }, | var counter = { complete: 0, success: 0, error: 0, send: 0 }, | test("test global handlers - failure", function() { expect(6); stop(); var counter = { complete: 0, success: 0, error: 0 }, success = function() { counter.success++ }, error = function() { counter.error++ }; $.ajaxTimeout(0); $.ajax({url: "data/name.php", global: false, success: success, error: error, complete: function() { ok( counter.error == 0, 'Check sucesful request without globals' ); ok( counter.success == 1, 'Check sucesful request without globals' ); ok( counter.complete == 0, 'Check sucesful request without globals' ); counter.error = counter.success = counter.complete = 0; $.ajaxTimeout(500); $.ajax({url: "data/name.php?wait=5", global: false, success: success, error: error, complete: function() { ok( counter.error == 1, 'Check failed request without globals' ); ok( counter.success == 0, 'Check failed request without globals' ); ok( counter.complete == 0, 'Check failed request without globals' ); start(); }}); }});}); |
error = function() { counter.error++ }; | error = function() { counter.error++ }, complete = function() { counter.complete++ }, send = function() { counter.send++ }; | test("test global handlers - failure", function() { expect(6); stop(); var counter = { complete: 0, success: 0, error: 0 }, success = function() { counter.success++ }, error = function() { counter.error++ }; $.ajaxTimeout(0); $.ajax({url: "data/name.php", global: false, success: success, error: error, complete: function() { ok( counter.error == 0, 'Check sucesful request without globals' ); ok( counter.success == 1, 'Check sucesful request without globals' ); ok( counter.complete == 0, 'Check sucesful request without globals' ); counter.error = counter.success = counter.complete = 0; $.ajaxTimeout(500); $.ajax({url: "data/name.php?wait=5", global: false, success: success, error: error, complete: function() { ok( counter.error == 1, 'Check failed request without globals' ); ok( counter.success == 0, 'Check failed request without globals' ); ok( counter.complete == 0, 'Check failed request without globals' ); start(); }}); }});}); |
$.ajax({url: "data/name.php", global: false, success: success, error: error, complete: function() { | $('#foo').ajaxStart(complete).ajaxStop(complete).ajaxSend(send).ajaxComplete(complete).ajaxError(error).ajaxSuccess(success); $.ajax({url: "data/name.php", global: false, beforeSend: send, success: success, error: error, complete: function() { | test("test global handlers - failure", function() { expect(6); stop(); var counter = { complete: 0, success: 0, error: 0 }, success = function() { counter.success++ }, error = function() { counter.error++ }; $.ajaxTimeout(0); $.ajax({url: "data/name.php", global: false, success: success, error: error, complete: function() { ok( counter.error == 0, 'Check sucesful request without globals' ); ok( counter.success == 1, 'Check sucesful request without globals' ); ok( counter.complete == 0, 'Check sucesful request without globals' ); counter.error = counter.success = counter.complete = 0; $.ajaxTimeout(500); $.ajax({url: "data/name.php?wait=5", global: false, success: success, error: error, complete: function() { ok( counter.error == 1, 'Check failed request without globals' ); ok( counter.success == 0, 'Check failed request without globals' ); ok( counter.complete == 0, 'Check failed request without globals' ); start(); }}); }});}); |
counter.error = counter.success = counter.complete = 0; | ok( counter.send == 1, 'Check sucesful request without globals' ); counter.error = counter.success = counter.complete = counter.send = 0; | test("test global handlers - failure", function() { expect(6); stop(); var counter = { complete: 0, success: 0, error: 0 }, success = function() { counter.success++ }, error = function() { counter.error++ }; $.ajaxTimeout(0); $.ajax({url: "data/name.php", global: false, success: success, error: error, complete: function() { ok( counter.error == 0, 'Check sucesful request without globals' ); ok( counter.success == 1, 'Check sucesful request without globals' ); ok( counter.complete == 0, 'Check sucesful request without globals' ); counter.error = counter.success = counter.complete = 0; $.ajaxTimeout(500); $.ajax({url: "data/name.php?wait=5", global: false, success: success, error: error, complete: function() { ok( counter.error == 1, 'Check failed request without globals' ); ok( counter.success == 0, 'Check failed request without globals' ); ok( counter.complete == 0, 'Check failed request without globals' ); start(); }}); }});}); |
$.ajax({url: "data/name.php?wait=5", global: false, success: success, error: error, complete: function() { | $.ajax({url: "data/name.php?wait=5", global: false, beforeSend: send, success: success, error: error, complete: function() { | test("test global handlers - failure", function() { expect(6); stop(); var counter = { complete: 0, success: 0, error: 0 }, success = function() { counter.success++ }, error = function() { counter.error++ }; $.ajaxTimeout(0); $.ajax({url: "data/name.php", global: false, success: success, error: error, complete: function() { ok( counter.error == 0, 'Check sucesful request without globals' ); ok( counter.success == 1, 'Check sucesful request without globals' ); ok( counter.complete == 0, 'Check sucesful request without globals' ); counter.error = counter.success = counter.complete = 0; $.ajaxTimeout(500); $.ajax({url: "data/name.php?wait=5", global: false, success: success, error: error, complete: function() { ok( counter.error == 1, 'Check failed request without globals' ); ok( counter.success == 0, 'Check failed request without globals' ); ok( counter.complete == 0, 'Check failed request without globals' ); start(); }}); }});}); |
ok( counter.send == 1, 'Check failed request without globals' ); | test("test global handlers - failure", function() { expect(6); stop(); var counter = { complete: 0, success: 0, error: 0 }, success = function() { counter.success++ }, error = function() { counter.error++ }; $.ajaxTimeout(0); $.ajax({url: "data/name.php", global: false, success: success, error: error, complete: function() { ok( counter.error == 0, 'Check sucesful request without globals' ); ok( counter.success == 1, 'Check sucesful request without globals' ); ok( counter.complete == 0, 'Check sucesful request without globals' ); counter.error = counter.success = counter.complete = 0; $.ajaxTimeout(500); $.ajax({url: "data/name.php?wait=5", global: false, success: success, error: error, complete: function() { ok( counter.error == 1, 'Check failed request without globals' ); ok( counter.success == 0, 'Check failed request without globals' ); ok( counter.complete == 0, 'Check failed request without globals' ); start(); }}); }});}); |
|
return this.each(function(){ if ($.hasWord(this,c)) this.className = this.className.replace( new RegExp('(\\s*\\b[^-])'+c+'($|\\b(?=[^-]))', 'g'), ''); else this.className += ( this.className.length > 0 ? " " : "" ) + c; }); | this.each(function(){this.parentNode.removeChild( this );}); | return this.each(function(){ if ($.hasWord(this,c)) this.className = this.className.replace( new RegExp('(\\s*\\b[^-])'+c+'($|\\b(?=[^-]))', 'g'), ''); else this.className += ( this.className.length > 0 ? " " : "" ) + c; }); |
var id; | DWREngine._abortRequest = function(batch) { if (batch && batch.metadata != null && !batch.completed) { DWREngine._clearUp(batch); if (batch.req) batch.req.abort(); // Call all the timeout errorHandlers var handlers; var id; for (var i = 0; i < batch.ids.length; i++) { id = batch.ids[i]; handlers = DWREngine._handlersMap[id]; DWREngine._handleMetaDataError(handlers, "Timeout"); } }}; |
|
id = batch.ids[i]; handlers = DWREngine._handlersMap[id]; | handlers = DWREngine._handlersMap[batch.ids[i]]; | DWREngine._abortRequest = function(batch) { if (batch && batch.metadata != null && !batch.completed) { DWREngine._clearUp(batch); if (batch.req) batch.req.abort(); // Call all the timeout errorHandlers var handlers; var id; for (var i = 0; i < batch.ids.length; i++) { id = batch.ids[i]; handlers = DWREngine._handlersMap[id]; DWREngine._handleMetaDataError(handlers, "Timeout"); } }}; |
if (batch && batch.metadata && batch.completed != true) { batch.completed = true; | if (batch && batch.metadata && !batch.completed) { | DWREngine._abortRequest = function(batch) { if (batch && batch.metadata && batch.completed != true) { batch.completed = true; if (batch.req != null) { batch.req.abort(); if (batch.metadata.errorHandler) { // I'm not keen on the idea of setting error handlers a strings // can we get rid of this at some stage? //if (typeof batch.metadata.errorHandler == "string") { // eval(batch.metadata.errorHandler); //} //else if (typeof batch.metadata.errorHandler == "function") { batch.metadata.errorHandler(); //} //else { // if (DWREngine._warningHandler) { // DWREngine._warningHandler("errorHandler is neither a string (for eval()) or a function."); // } //} } } }}; |
if (batch && batch.metadata && !batch.completed) { if (batch.req != null) { batch.req.abort(); if (batch.metadata.errorHandler) { batch.metadata.errorHandler(); } } | if (batch && batch.metadata && !batch.completed) { if (batch.req != null) { batch.req.abort(); if (batch.metadata.errorHandler) { batch.metadata.errorHandler(); } | DWREngine._abortRequest = function(batch) { if (batch && batch.metadata && !batch.completed) { // TODO: we used to do: batch.completed = true; // here, but decided to leave it to DWREngine._stateChange() to handle // when abort is called. This comment can be deleted if this works! if (batch.req != null) { batch.req.abort(); if (batch.metadata.errorHandler) { // I'm not keen on the idea of setting error handlers a strings // can we get rid of this at some stage? //if (typeof batch.metadata.errorHandler == "string") { // eval(batch.metadata.errorHandler); //} //else if (typeof batch.metadata.errorHandler == "function") { batch.metadata.errorHandler(); //} //else { // if (DWREngine._warningHandler) { // DWREngine._warningHandler("errorHandler is neither a string (for eval()) or a function."); // } //} } } }}; |
} | DWREngine._abortRequest = function(batch) { if (batch && batch.metadata && !batch.completed) { // TODO: we used to do: batch.completed = true; // here, but decided to leave it to DWREngine._stateChange() to handle // when abort is called. This comment can be deleted if this works! if (batch.req != null) { batch.req.abort(); if (batch.metadata.errorHandler) { // I'm not keen on the idea of setting error handlers a strings // can we get rid of this at some stage? //if (typeof batch.metadata.errorHandler == "string") { // eval(batch.metadata.errorHandler); //} //else if (typeof batch.metadata.errorHandler == "function") { batch.metadata.errorHandler(); //} //else { // if (DWREngine._warningHandler) { // DWREngine._warningHandler("errorHandler is neither a string (for eval()) or a function."); // } //} } } }}; |
|
batch.completed = true; | DWREngine._abortRequest = function(batch) { if (batch && batch.metadata && !batch.completed) { // TODO: we used to do: batch.completed = true; // here, but decided to leave it to DWREngine._stateChange() to handle // when abort is called. This comment can be deleted if this works! if (batch.req != null) { batch.req.abort(); if (batch.metadata.errorHandler) { // I'm not keen on the idea of setting error handlers a strings // can we get rid of this at some stage? //if (typeof batch.metadata.errorHandler == "string") { // eval(batch.metadata.errorHandler); //} //else if (typeof batch.metadata.errorHandler == "function") { batch.metadata.errorHandler(); //} //else { // if (DWREngine._warningHandler) { // DWREngine._warningHandler("errorHandler is neither a string (for eval()) or a function."); // } //} } } }}; |
|
DWREngine._handleMetaDataError(batch.metadata, "Timeout"); | var handlers; var id; for (var i = 0; i < batch.ids.length; i++) { id = batch.ids[i]; handlers = DWREngine._handlersMap[id]; DWREngine._handleMetaDataError(handlers, "Timeout"); } | DWREngine._abortRequest = function(batch) { if (batch && batch.metadata != null && !batch.completed) { DWREngine._clearUp(batch); if (batch.req) batch.req.abort(); DWREngine._handleMetaDataError(batch.metadata, "Timeout"); }}; |
DWREngine._abortRequest = function(batch) { | dwr.engine._abortRequest = function(batch) { | DWREngine._abortRequest = function(batch) { if (batch && !batch.completed) { clearInterval(batch.interval); DWREngine._clearUp(batch); if (batch.req) batch.req.abort(); DWREngine._handleError(batch, { name:"dwrengine.timeout", message:"Timeout" }); }}; |
DWREngine._clearUp(batch); | dwr.engine._clearUp(batch); | DWREngine._abortRequest = function(batch) { if (batch && !batch.completed) { clearInterval(batch.interval); DWREngine._clearUp(batch); if (batch.req) batch.req.abort(); DWREngine._handleError(batch, { name:"dwrengine.timeout", message:"Timeout" }); }}; |
DWREngine._handleError(batch, { name:"dwrengine.timeout", message:"Timeout" }); | dwr.engine._handleError(batch, { name:"dwr.engine.timeout", message:"Timeout" }); | DWREngine._abortRequest = function(batch) { if (batch && !batch.completed) { clearInterval(batch.interval); DWREngine._clearUp(batch); if (batch.req) batch.req.abort(); DWREngine._handleError(batch, { name:"dwrengine.timeout", message:"Timeout" }); }}; |
if (batch && batch.metadata && !batch.completed) { DWREngine._clearUp(); | if (batch && batch.metadata != null && !batch.completed) { DWREngine._clearUp(batch); | DWREngine._abortRequest = function(batch) { if (batch && batch.metadata && !batch.completed) { DWREngine._clearUp(); if (batch.req) batch.req.abort(); }}; |
DWREngine._handleMetaDataError(batch.metadata, "Timeout"); | DWREngine._abortRequest = function(batch) { if (batch && batch.metadata && !batch.completed) { DWREngine._clearUp(); if (batch.req) batch.req.abort(); }}; |
|
var reply = func(options.rowData, options); options.data = reply; | if (typeof func == 'function') options.data = func(options.rowData, options); else options.data = func || ""; | DWRUtil._addRowInner = function(cellFuncs, options) { var tr = options.rowCreator(options); if (tr == null) return null; for (var cellNum = 0; cellNum < cellFuncs.length; cellNum++) { var func = cellFuncs[cellNum]; var reply = func(options.rowData, options); options.data = reply; options.cellNum = cellNum; var td = options.cellCreator(options); if (td != null) { if (reply != null) { if (DWRUtil._isHTMLElement(reply)) td.appendChild(reply); else td.innerHTML = reply; } tr.appendChild(td); } } return tr;}; |
if (reply != null) { if (DWRUtil._isHTMLElement(reply)) td.appendChild(reply); else td.innerHTML = reply; | if (options.data != null) { if (DWRUtil._isHTMLElement(options.data)) td.appendChild(options.data); else td.innerHTML = options.data; | DWRUtil._addRowInner = function(cellFuncs, options) { var tr = options.rowCreator(options); if (tr == null) return null; for (var cellNum = 0; cellNum < cellFuncs.length; cellNum++) { var func = cellFuncs[cellNum]; var reply = func(options.rowData, options); options.data = reply; options.cellNum = cellNum; var td = options.cellCreator(options); if (td != null) { if (reply != null) { if (DWRUtil._isHTMLElement(reply)) td.appendChild(reply); else td.innerHTML = reply; } tr.appendChild(td); } } return tr;}; |
awFinishCopyNode(theNewRow); | function _awSetFocus(){ var tree = document.getElementById('addressingWidgetTree'); try { //temporary patch for bug 26344 //top.awInputElement.setAttribute("onclick", top.awInputElement.getAttribute("onclick")); //top.awInputElement.setAttribute("onkeyup", top.awInputElement.getAttribute("onkeyup")); //end of patch tree.ensureElementIsVisible(awGetTreeRow(top.awRow)); top.awInputElement.focus(); } catch(ex) { top.awFocusRetry ++; if (top.awFocusRetry < 3) { dump("_awSetFocus failed, try it again...\n"); setTimeout("_awSetFocus();", 0); } else dump("_awSetFocus failed, forget about it!\n"); }} |
|
tree.ensureElementIsVisible(awGetTreeRow(top.awRow)); | tree.ensureElementIsVisible(theNewRow); | function _awSetFocus(){ var tree = document.getElementById('addressingWidgetTree'); try { //temporary patch for bug 26344 //top.awInputElement.setAttribute("onclick", top.awInputElement.getAttribute("onclick")); //top.awInputElement.setAttribute("onkeyup", top.awInputElement.getAttribute("onkeyup")); //end of patch tree.ensureElementIsVisible(awGetTreeRow(top.awRow)); top.awInputElement.focus(); } catch(ex) { top.awFocusRetry ++; if (top.awFocusRetry < 3) { dump("_awSetFocus failed, try it again...\n"); setTimeout("_awSetFocus();", 0); } else dump("_awSetFocus failed, forget about it!\n"); }} |
var tree = document.getElementById('addressListTree'); | var tree = document.getElementById('addressingWidgetTree'); | function _awSetFocus(){ var tree = document.getElementById('addressListTree'); try { var theNewRow = awGetTreeRow(top.awRow); //temporary patch for bug 26344// awFinishCopyNode(theNewRow); tree.ensureElementIsVisible(theNewRow); top.awInputElement.focus(); } catch(ex) { top.awFocusRetry ++; if (top.awFocusRetry < 8) { dump("_awSetFocus failed, try it again...\n"); setTimeout("_awSetFocus();", 0); } else dump("_awSetFocus failed, forget about it!\n"); }} |
input[0].value = inputValue; | function _awSetInputAndPopup(inputValue, popupValue, parentNode, templateNode){ // remove leading spaces while (inputValue[0] == " " ) inputValue = inputValue.substring(1, inputValue.length); top.MAX_RECIPIENTS++; var newNode = templateNode.cloneNode(true); parentNode.appendChild(newNode); // we need to insert the new node before we set the value of the select element! var input = newNode.getElementsByTagName(awInputElementName()); if ( input && input.length == 1 ) { input[0].setAttribute("value", inputValue); input[0].setAttribute("id", "msgRecipient#" + top.MAX_RECIPIENTS); } var select = newNode.getElementsByTagName(awSelectElementName()); if ( select && select.length == 1 ) { select[0].selectedItem = select[0].childNodes[0].childNodes[awGetSelectItemIndex(popupValue)]; select[0].setAttribute("id", "msgRecipientType#" + top.MAX_RECIPIENTS); if (input) _awDisableAutoComplete(select[0], input[0]); }} |
|
var input = newNode.getElementsByTagName('INPUT'); | var input = newNode.getElementsByTagName(awInputElementName()); | function _awSetInputAndPopup(inputValue, popupValue, parentNode, templateNode){ // remove leading spaces while (inputValue[0] == " " ) inputValue = inputValue.substring(1, inputValue.length); top.MAX_RECIPIENTS++; var newNode = templateNode.cloneNode(true); parentNode.appendChild(newNode); // we need to insert the new node before we set the value of the select element! var input = newNode.getElementsByTagName('INPUT'); if ( input && input.length == 1 ) { input[0].setAttribute("value", inputValue); input[0].setAttribute("id", "msgRecipient#" + top.MAX_RECIPIENTS); } var select = newNode.getElementsByTagName('SELECT'); if ( select && select.length == 1 ) {//Doesn't work! select[0].setAttribute("value", popupValue); select[0].value = popupValue; select[0].setAttribute("id", "msgRecipientType#" + top.MAX_RECIPIENTS); }} |
var select = newNode.getElementsByTagName('SELECT'); | var select = newNode.getElementsByTagName(awSelectElementName()); | function _awSetInputAndPopup(inputValue, popupValue, parentNode, templateNode){ // remove leading spaces while (inputValue[0] == " " ) inputValue = inputValue.substring(1, inputValue.length); top.MAX_RECIPIENTS++; var newNode = templateNode.cloneNode(true); parentNode.appendChild(newNode); // we need to insert the new node before we set the value of the select element! var input = newNode.getElementsByTagName('INPUT'); if ( input && input.length == 1 ) { input[0].setAttribute("value", inputValue); input[0].setAttribute("id", "msgRecipient#" + top.MAX_RECIPIENTS); } var select = newNode.getElementsByTagName('SELECT'); if ( select && select.length == 1 ) {//Doesn't work! select[0].setAttribute("value", popupValue); select[0].value = popupValue; select[0].setAttribute("id", "msgRecipientType#" + top.MAX_RECIPIENTS); }} |
ele.style.borderColor = "#" + dwr.util._borderFadeSteps[colorIndex] + "ff"; | ele.style.borderColor = "#ff" + dwr.util._borderFadeSteps[colorIndex] + dwr.util._borderFadeSteps[colorIndex]; | dwr.util._borderFadeProcess = function(ele, colorIndex) { ele = dwr.util.byId(ele); if (colorIndex < dwr.util._borderFadeSteps.length) { ele.style.borderColor = "#" + dwr.util._borderFadeSteps[colorIndex] + "ff"; setTimeout("dwr.util._borderFadeProcess('" + ele.id + "'," + (colorIndex + 1) + ")", 200); } else { ele.style.backgroundColor = "transparent"; }}; |
} | }; | DWREngine._checkCometPoll = function() { if (DWREngine._pollComet) { // If the poll resources are still there, come back again if (DWREngine._pollFrame || DWREngine._pollReq) { setTimeout("DWREngine._checkCometPoll()", DWREngine._pollCometInterval); } try { if (DWREngine._pollFrame) { var text = DWREngine._getTextFromCometIFrame(); DWREngine._processCometResponse(text); } else if (DWREngine._pollReq) { var xhrtext = DWREngine._pollReq.responseText; DWREngine._processCometResponse(xhrtext); } } catch (ex) { // IE complains for no good reason for both options above. Ignore. } }} |
if (DWREngine._pollFrame) { | if (DWREngine._pollFrame || DWREngine._pollReq) { | DWREngine._checkCometPoll = function() { if (DWREngine._pollComet) { if (DWREngine._pollFrame) { setTimeout("DWREngine._checkCometPoll()", DWREngine._pollCometInterval); var text = DWREngine._getTextFromCometIFrame(); DWREngine._processCometResponse(text); } else if (DWREngine._pollReq) { setTimeout("DWREngine._checkCometPoll()", DWREngine._pollCometInterval); try { var xhrtext = DWREngine._pollReq.responseText; DWREngine._processCometResponse(xhrtext); } catch (ex) { // IE complains for no good reason. Ignore } } }} |
var text = DWREngine._getTextFromCometIFrame(); DWREngine._processCometResponse(text); | DWREngine._checkCometPoll = function() { if (DWREngine._pollComet) { if (DWREngine._pollFrame) { setTimeout("DWREngine._checkCometPoll()", DWREngine._pollCometInterval); var text = DWREngine._getTextFromCometIFrame(); DWREngine._processCometResponse(text); } else if (DWREngine._pollReq) { setTimeout("DWREngine._checkCometPoll()", DWREngine._pollCometInterval); try { var xhrtext = DWREngine._pollReq.responseText; DWREngine._processCometResponse(xhrtext); } catch (ex) { // IE complains for no good reason. Ignore } } }} |
|
else if (DWREngine._pollReq) { setTimeout("DWREngine._checkCometPoll()", DWREngine._pollCometInterval); try { | try { if (DWREngine._pollFrame) { var text = DWREngine._getTextFromCometIFrame(); DWREngine._processCometResponse(text); } else if (DWREngine._pollReq) { | DWREngine._checkCometPoll = function() { if (DWREngine._pollComet) { if (DWREngine._pollFrame) { setTimeout("DWREngine._checkCometPoll()", DWREngine._pollCometInterval); var text = DWREngine._getTextFromCometIFrame(); DWREngine._processCometResponse(text); } else if (DWREngine._pollReq) { setTimeout("DWREngine._checkCometPoll()", DWREngine._pollCometInterval); try { var xhrtext = DWREngine._pollReq.responseText; DWREngine._processCometResponse(xhrtext); } catch (ex) { // IE complains for no good reason. Ignore } } }} |
catch (ex) { } | } catch (ex) { | DWREngine._checkCometPoll = function() { if (DWREngine._pollComet) { if (DWREngine._pollFrame) { setTimeout("DWREngine._checkCometPoll()", DWREngine._pollCometInterval); var text = DWREngine._getTextFromCometIFrame(); DWREngine._processCometResponse(text); } else if (DWREngine._pollReq) { setTimeout("DWREngine._checkCometPoll()", DWREngine._pollCometInterval); try { var xhrtext = DWREngine._pollReq.responseText; DWREngine._processCometResponse(xhrtext); } catch (ex) { // IE complains for no good reason. Ignore } } }} |
setTimeout("DWREngine._checkCometPoll()", 100); var frameDocument; if (DWREngine._pollFrame.contentDocument) { frameDocument = DWREngine._pollFrame.contentDocument.defaultView.document; } else if (DWREngine._pollFrame.contentWindow) { frameDocument = DWREngine._pollFrame.contentWindow.document } var bodyNodes = frameDocument.getElementsByTagName("body"); if (bodyNodes == null || bodyNodes.length == 0) return; if (bodyNodes[0] == null) return; var text = bodyNodes[0].innerHTML.toString(); if (text.indexOf("<PRE>") == 0) { text = text.substring(5, text.length - 7); } var size = text.length; if (DWREngine._pollCometSize != size) { var executeString = text.substring(DWREngine._pollCometSize); eval(executeString); DWREngine._pollCometSize = size; } | setTimeout("DWREngine._checkCometPoll()", DWREngine._pollCometInterval); var text = DWREngine._getTextFromCometIFrame(); DWREngine._processCometResponse(text); | DWREngine._checkCometPoll = function() { if (DWREngine._pollComet) { if (DWREngine._pollFrame) { setTimeout("DWREngine._checkCometPoll()", 100); var frameDocument; if (DWREngine._pollFrame.contentDocument) { frameDocument = DWREngine._pollFrame.contentDocument.defaultView.document; } else if (DWREngine._pollFrame.contentWindow) { frameDocument = DWREngine._pollFrame.contentWindow.document } var bodyNodes = frameDocument.getElementsByTagName("body"); if (bodyNodes == null || bodyNodes.length == 0) return; if (bodyNodes[0] == null) return; var text = bodyNodes[0].innerHTML.toString(); // IE plays silly-pants and adds <PRE>...</PRE> for some unknown reason if (text.indexOf("<PRE>") == 0) { text = text.substring(5, text.length - 7); } var size = text.length; if (DWREngine._pollCometSize != size) { var executeString = text.substring(DWREngine._pollCometSize); eval(executeString); DWREngine._pollCometSize = size; } } else if (DWREngine._pollReq) { setTimeout("DWREngine._checkCometPoll()", 100); var xhrtext = DWREngine._pollReq.responseText; } }} |
setTimeout("DWREngine._checkCometPoll()", 100); var xhrtext = DWREngine._pollReq.responseText; | setTimeout("DWREngine._checkCometPoll()", DWREngine._pollCometInterval); try { var xhrtext = DWREngine._pollReq.responseText; DWREngine._processCometResponse(xhrtext); } catch (ex) { } | DWREngine._checkCometPoll = function() { if (DWREngine._pollComet) { if (DWREngine._pollFrame) { setTimeout("DWREngine._checkCometPoll()", 100); var frameDocument; if (DWREngine._pollFrame.contentDocument) { frameDocument = DWREngine._pollFrame.contentDocument.defaultView.document; } else if (DWREngine._pollFrame.contentWindow) { frameDocument = DWREngine._pollFrame.contentWindow.document } var bodyNodes = frameDocument.getElementsByTagName("body"); if (bodyNodes == null || bodyNodes.length == 0) return; if (bodyNodes[0] == null) return; var text = bodyNodes[0].innerHTML.toString(); // IE plays silly-pants and adds <PRE>...</PRE> for some unknown reason if (text.indexOf("<PRE>") == 0) { text = text.substring(5, text.length - 7); } var size = text.length; if (DWREngine._pollCometSize != size) { var executeString = text.substring(DWREngine._pollCometSize); eval(executeString); DWREngine._pollCometSize = size; } } else if (DWREngine._pollReq) { setTimeout("DWREngine._checkCometPoll()", 100); var xhrtext = DWREngine._pollReq.responseText; } }} |
DWREngine._checkCometPoll = function() { if (DWREngine._pollComet) { | dwr.engine._checkCometPoll = function() { if (dwr.engine._pollComet) { | DWREngine._checkCometPoll = function() { if (DWREngine._pollComet) { // If the poll resources are still there, come back again if (DWREngine._pollFrame || DWREngine._pollReq) { setTimeout("DWREngine._checkCometPoll()", DWREngine._pollCometInterval); } try { DWREngine._receivedBatch = DWREngine._cometBatch; if (DWREngine._pollFrame) { var text = DWREngine._getTextFromCometIFrame(); DWREngine._processCometResponse(text); } else if (DWREngine._pollReq) { var xhrtext = DWREngine._pollReq.responseText; DWREngine._processCometResponse(xhrtext); } DWREngine._receivedBatch = null; } catch (ex) { // IE complains for no good reason for both options above. Ignore. } }}; |
if (DWREngine._pollFrame || DWREngine._pollReq) { setTimeout("DWREngine._checkCometPoll()", DWREngine._pollCometInterval); | if (dwr.engine._pollFrame || dwr.engine._pollReq) { setTimeout("dwr.engine._checkCometPoll()", dwr.engine._pollCometInterval); | DWREngine._checkCometPoll = function() { if (DWREngine._pollComet) { // If the poll resources are still there, come back again if (DWREngine._pollFrame || DWREngine._pollReq) { setTimeout("DWREngine._checkCometPoll()", DWREngine._pollCometInterval); } try { DWREngine._receivedBatch = DWREngine._cometBatch; if (DWREngine._pollFrame) { var text = DWREngine._getTextFromCometIFrame(); DWREngine._processCometResponse(text); } else if (DWREngine._pollReq) { var xhrtext = DWREngine._pollReq.responseText; DWREngine._processCometResponse(xhrtext); } DWREngine._receivedBatch = null; } catch (ex) { // IE complains for no good reason for both options above. Ignore. } }}; |
DWREngine._receivedBatch = DWREngine._cometBatch; if (DWREngine._pollFrame) { var text = DWREngine._getTextFromCometIFrame(); DWREngine._processCometResponse(text); | dwr.engine._receivedBatch = dwr.engine._cometBatch; if (dwr.engine._pollFrame) { var text = dwr.engine._getTextFromCometIFrame(); dwr.engine._processCometResponse(text); | DWREngine._checkCometPoll = function() { if (DWREngine._pollComet) { // If the poll resources are still there, come back again if (DWREngine._pollFrame || DWREngine._pollReq) { setTimeout("DWREngine._checkCometPoll()", DWREngine._pollCometInterval); } try { DWREngine._receivedBatch = DWREngine._cometBatch; if (DWREngine._pollFrame) { var text = DWREngine._getTextFromCometIFrame(); DWREngine._processCometResponse(text); } else if (DWREngine._pollReq) { var xhrtext = DWREngine._pollReq.responseText; DWREngine._processCometResponse(xhrtext); } DWREngine._receivedBatch = null; } catch (ex) { // IE complains for no good reason for both options above. Ignore. } }}; |
else if (DWREngine._pollReq) { var xhrtext = DWREngine._pollReq.responseText; DWREngine._processCometResponse(xhrtext); | else if (dwr.engine._pollReq) { var xhrtext = dwr.engine._pollReq.responseText; dwr.engine._processCometResponse(xhrtext); | DWREngine._checkCometPoll = function() { if (DWREngine._pollComet) { // If the poll resources are still there, come back again if (DWREngine._pollFrame || DWREngine._pollReq) { setTimeout("DWREngine._checkCometPoll()", DWREngine._pollCometInterval); } try { DWREngine._receivedBatch = DWREngine._cometBatch; if (DWREngine._pollFrame) { var text = DWREngine._getTextFromCometIFrame(); DWREngine._processCometResponse(text); } else if (DWREngine._pollReq) { var xhrtext = DWREngine._pollReq.responseText; DWREngine._processCometResponse(xhrtext); } DWREngine._receivedBatch = null; } catch (ex) { // IE complains for no good reason for both options above. Ignore. } }}; |
DWREngine._receivedBatch = null; | dwr.engine._receivedBatch = null; | DWREngine._checkCometPoll = function() { if (DWREngine._pollComet) { // If the poll resources are still there, come back again if (DWREngine._pollFrame || DWREngine._pollReq) { setTimeout("DWREngine._checkCometPoll()", DWREngine._pollCometInterval); } try { DWREngine._receivedBatch = DWREngine._cometBatch; if (DWREngine._pollFrame) { var text = DWREngine._getTextFromCometIFrame(); DWREngine._processCometResponse(text); } else if (DWREngine._pollReq) { var xhrtext = DWREngine._pollReq.responseText; DWREngine._processCometResponse(xhrtext); } DWREngine._receivedBatch = null; } catch (ex) { // IE complains for no good reason for both options above. Ignore. } }}; |
if (!batch) { dwr.engine._debug("null batch in dwr.engine._clearUp()", true); return; } if (batch.completed == "true") { dwr.engine._debug("Double complete", true); return; } | if (!batch) { dwr.engine._debug("Warning: null batch in dwr.engine._clearUp()", true); return; } if (batch.completed == "true") { dwr.engine._debug("Warning: Double complete", true); return; } | dwr.engine._clearUp = function(batch) { if (!batch) { dwr.engine._debug("null batch in dwr.engine._clearUp()", true); return; } if (batch.completed == "true") { dwr.engine._debug("Double complete", true); return; } // IFrame tidyup if (batch.div) batch.div.parentNode.removeChild(batch.div); if (batch.iframe) { // If this is a poll frame then stop comet polling if (batch.iframe == dwr.engine._pollFrame) dwr.engine._pollFrame = null; batch.iframe.parentNode.removeChild(batch.iframe); } if (batch.form) batch.form.parentNode.removeChild(batch.form); // XHR tidyup: avoid IE handles increase if (batch.req) { // If this is a poll frame then stop comet polling if (batch.req == dwr.engine._pollReq) dwr.engine._pollReq = null; delete batch.req; } if (batch.postHooks) { for (var i = 0; i < batch.postHooks.length; i++) { batch.postHooks[i](); } batch.postHooks = null; } if (batch.map && batch.map.batchId) { delete dwr.engine._batches[batch.map.batchId]; dwr.engine._batchesLength--; } batch.completed = true; // If there is anything on the queue waiting to go out, then send it. // We don't need to check for ordered mode, here because when ordered mode // gets turned off, we still process *waiting* batches in an ordered way. if (dwr.engine._batchQueue.length != 0) { var sendbatch = dwr.engine._batchQueue.shift(); dwr.engine._sendData(sendbatch); }}; |
DWREngine._batches[DWREngine._batches.length] = sendbatch; | DWREngine._clearUp = function(batch) { if (batch.completed) { DWREngine._handleError("Double complete"); return; } // IFrame tidyup if (batch.div) batch.div.parentNode.removeChild(batch.div); if (batch.iframe) { // If this is a poll frame then stop comet polling if (batch.iframe == DWREngine._pollFrame) DWREngine._pollFrame = null; batch.iframe.parentNode.removeChild(batch.iframe); } if (batch.form) batch.form.parentNode.removeChild(batch.form); // XHR tidyup: avoid IE handles increase if (batch.req) { // If this is a poll frame then stop comet polling if (batch.req == DWREngine._pollReq) DWREngine._pollReq = null; delete batch.req; } for (var i = 0; i < batch.postHooks.length; i++) { batch.postHooks[i](); } batch.postHooks = null; // TODO: There must be a better way??? for (var i = 0; i < DWREngine._batches.length; i++) { if (DWREngine._batches[i] == batch) { DWREngine._batches.splice(i, 1); break; } } batch.completed = true; // If there is anything on the queue waiting to go out, then send it. // We don't need to check for ordered mode, here because when ordered mode // gets turned off, we still process *waiting* batches in an ordered way. if (DWREngine._batchQueue.length != 0) { var sendbatch = DWREngine._batchQueue.shift(); DWREngine._sendData(sendbatch); DWREngine._batches[DWREngine._batches.length] = sendbatch; }}; |
|
for (var i = 0; i < DWREngine._batches.length; i++) { if (DWREngine._batches[i] == batch) { DWREngine._batches.splice(i, 1); break; } } | delete DWREngine._batches[batch.map.batchId]; DWREngine._batchesLength--; | DWREngine._clearUp = function(batch) { if (batch.completed) { DWREngine._handleError(null, { name:"dwrengine.doubleComplete", message:"Double complete" }); return; } // IFrame tidyup if (batch.div) batch.div.parentNode.removeChild(batch.div); if (batch.iframe) { // If this is a poll frame then stop comet polling if (batch.iframe == DWREngine._pollFrame) DWREngine._pollFrame = null; batch.iframe.parentNode.removeChild(batch.iframe); } if (batch.form) batch.form.parentNode.removeChild(batch.form); // XHR tidyup: avoid IE handles increase if (batch.req) { // If this is a poll frame then stop comet polling if (batch.req == DWREngine._pollReq) DWREngine._pollReq = null; delete batch.req; } for (var i = 0; i < batch.postHooks.length; i++) { batch.postHooks[i](); } batch.postHooks = null; // TODO: There must be a better way??? for (var i = 0; i < DWREngine._batches.length; i++) { if (DWREngine._batches[i] == batch) { DWREngine._batches.splice(i, 1); break; } } batch.completed = true; // If there is anything on the queue waiting to go out, then send it. // We don't need to check for ordered mode, here because when ordered mode // gets turned off, we still process *waiting* batches in an ordered way. if (DWREngine._batchQueue.length != 0) { var sendbatch = DWREngine._batchQueue.shift(); DWREngine._batches[DWREngine._batches.length] = sendbatch; DWREngine._sendData(sendbatch); }}; |
DWREngine._batches[DWREngine._batches.length] = sendbatch; | DWREngine._clearUp = function(batch) { if (batch.completed) { DWREngine._handleError(null, { name:"dwrengine.doubleComplete", message:"Double complete" }); return; } // IFrame tidyup if (batch.div) batch.div.parentNode.removeChild(batch.div); if (batch.iframe) { // If this is a poll frame then stop comet polling if (batch.iframe == DWREngine._pollFrame) DWREngine._pollFrame = null; batch.iframe.parentNode.removeChild(batch.iframe); } if (batch.form) batch.form.parentNode.removeChild(batch.form); // XHR tidyup: avoid IE handles increase if (batch.req) { // If this is a poll frame then stop comet polling if (batch.req == DWREngine._pollReq) DWREngine._pollReq = null; delete batch.req; } for (var i = 0; i < batch.postHooks.length; i++) { batch.postHooks[i](); } batch.postHooks = null; // TODO: There must be a better way??? for (var i = 0; i < DWREngine._batches.length; i++) { if (DWREngine._batches[i] == batch) { DWREngine._batches.splice(i, 1); break; } } batch.completed = true; // If there is anything on the queue waiting to go out, then send it. // We don't need to check for ordered mode, here because when ordered mode // gets turned off, we still process *waiting* batches in an ordered way. if (DWREngine._batchQueue.length != 0) { var sendbatch = DWREngine._batchQueue.shift(); DWREngine._batches[DWREngine._batches.length] = sendbatch; DWREngine._sendData(sendbatch); }}; |
|
alert("double complete"); | DWREngine._handleWarning("double complete"); | DWREngine._clearUp = function(batch) { if (batch.completed) { alert("double complete"); return; } // Irame tidyup if (batch.div) batch.div.parentNode.removeChild(batch.div); if (batch.iframe) { // If this is a poll frame then stop comet polling if (batch.iframe == DWREngine._pollFrame) DWREngine._pollFrame = null; batch.iframe.parentNode.removeChild(batch.iframe); } if (batch.form) batch.form.parentNode.removeChild(batch.form); // XHR tidyup: avoid IE handles increase if (batch.req) { // If this is a poll frame then stop comet polling if (batch.req == DWREngine._pollReq) DWREngine._pollReq = null; delete batch.req; } for (var i = 0; i < batch.postHooks.length; i++) { batch.postHooks[i](); } batch.postHooks = null; // TODO: There must be a better way??? for (var i = 0; i < DWREngine._batches.length; i++) { if (DWREngine._batches[i] == batch) { DWREngine._batches.splice(i, 1); break; } } batch.completed = true;}; |
if (DWREngine._batchQueue.length != 0) { var sendbatch = DWREngine._batchQueue.shift(); DWREngine._sendData(sendbatch); DWREngine._batches[DWREngine._batches.length] = sendbatch; } | DWREngine._clearUp = function(batch) { if (batch.completed) { DWREngine._handleError("Double complete"); return; } // IFrame tidyup if (batch.div) batch.div.parentNode.removeChild(batch.div); if (batch.iframe) { // If this is a poll frame then stop comet polling if (batch.iframe == DWREngine._pollFrame) DWREngine._pollFrame = null; batch.iframe.parentNode.removeChild(batch.iframe); } if (batch.form) batch.form.parentNode.removeChild(batch.form); // XHR tidyup: avoid IE handles increase if (batch.req) { // If this is a poll frame then stop comet polling if (batch.req == DWREngine._pollReq) DWREngine._pollReq = null; delete batch.req; } for (var i = 0; i < batch.postHooks.length; i++) { batch.postHooks[i](); } batch.postHooks = null; // TODO: There must be a better way??? for (var i = 0; i < DWREngine._batches.length; i++) { if (DWREngine._batches[i] == batch) { DWREngine._batches.splice(i, 1); break; } } batch.completed = true;}; |
|
if (batch.postHook) batch.postHook(); | for (var i = 0; i < batch.postHooks.length; i++) { batch.postHooks[i](); } batch.postHooks = null; | DWREngine._clearUp = function(batch) { if (batch.completed) { alert("double complete"); return; } if (batch.div) batch.div.parentNode.removeChild(batch.div); if (batch.iframe) batch.iframe.parentNode.removeChild(batch.iframe); if (batch.form) batch.form.parentNode.removeChild(batch.form); // Avoid IE handles increase delete batch.req; if (batch.postHook) batch.postHook(); // TODO: There must be a better way??? for (var i = 0; i < DWREngine._batches.length; i++) { if (DWREngine._batches[i] == batch) { DWREngine._batches.splice(i, 1); break; } } batch.completed = true;}; |
batch.iframe.parentNode.removeChild(batch.iframe); | DWREngine._clearUp = function(batch) { if (batch.completed) { alert("double complete"); return; } // Irame tidyup if (batch.div) batch.div.parentNode.removeChild(batch.div); if (batch.iframe) { batch.iframe.parentNode.removeChild(batch.iframe); // If this is a poll frame then stop comet polling if (batch.iframe == DWREngine._pollFrame) DWREngine._pollFrame = null; } if (batch.form) batch.form.parentNode.removeChild(batch.form); // XHR tidyup: avoid IE handles increase if (batch.req) delete batch.req; for (var i = 0; i < batch.postHooks.length; i++) { batch.postHooks[i](); } batch.postHooks = null; // TODO: There must be a better way??? for (var i = 0; i < DWREngine._batches.length; i++) { if (DWREngine._batches[i] == batch) { DWREngine._batches.splice(i, 1); break; } } batch.completed = true;}; |
|
if (batch.req) delete batch.req; | if (batch.req) { if (batch.req == DWREngine._pollReq) DWREngine._pollReq = null; delete batch.req; } | DWREngine._clearUp = function(batch) { if (batch.completed) { alert("double complete"); return; } // Irame tidyup if (batch.div) batch.div.parentNode.removeChild(batch.div); if (batch.iframe) { batch.iframe.parentNode.removeChild(batch.iframe); // If this is a poll frame then stop comet polling if (batch.iframe == DWREngine._pollFrame) DWREngine._pollFrame = null; } if (batch.form) batch.form.parentNode.removeChild(batch.form); // XHR tidyup: avoid IE handles increase if (batch.req) delete batch.req; for (var i = 0; i < batch.postHooks.length; i++) { batch.postHooks[i](); } batch.postHooks = null; // TODO: There must be a better way??? for (var i = 0; i < DWREngine._batches.length; i++) { if (DWREngine._batches[i] == batch) { DWREngine._batches.splice(i, 1); break; } } batch.completed = true;}; |
DWREngine._clearUp = function(batch) { | dwr.engine._clearUp = function(batch) { | DWREngine._clearUp = function(batch) { if (batch.completed) { DWREngine._handleError(null, { name:"dwrengine.doubleComplete", message:"Double complete" }); return; } // IFrame tidyup if (batch.div) batch.div.parentNode.removeChild(batch.div); if (batch.iframe) { // If this is a poll frame then stop comet polling if (batch.iframe == DWREngine._pollFrame) DWREngine._pollFrame = null; batch.iframe.parentNode.removeChild(batch.iframe); } if (batch.form) batch.form.parentNode.removeChild(batch.form); // XHR tidyup: avoid IE handles increase if (batch.req) { // If this is a poll frame then stop comet polling if (batch.req == DWREngine._pollReq) DWREngine._pollReq = null; delete batch.req; } for (var i = 0; i < batch.postHooks.length; i++) { batch.postHooks[i](); } batch.postHooks = null; // TODO: There must be a better way??? delete DWREngine._batches[batch.map.batchId]; DWREngine._batchesLength--; //for (var i = 0; i < DWREngine._batches.length; i++) { // if (DWREngine._batches[i] == batch) { // DWREngine._batches.splice(i, 1); // break; // } //} batch.completed = true; // If there is anything on the queue waiting to go out, then send it. // We don't need to check for ordered mode, here because when ordered mode // gets turned off, we still process *waiting* batches in an ordered way. if (DWREngine._batchQueue.length != 0) { var sendbatch = DWREngine._batchQueue.shift(); DWREngine._sendData(sendbatch); }}; |
DWREngine._handleError(null, { name:"dwrengine.doubleComplete", message:"Double complete" }); | dwr.engine._handleError(null, { name:"dwr.engine.doubleComplete", message:"Double complete" }); | DWREngine._clearUp = function(batch) { if (batch.completed) { DWREngine._handleError(null, { name:"dwrengine.doubleComplete", message:"Double complete" }); return; } // IFrame tidyup if (batch.div) batch.div.parentNode.removeChild(batch.div); if (batch.iframe) { // If this is a poll frame then stop comet polling if (batch.iframe == DWREngine._pollFrame) DWREngine._pollFrame = null; batch.iframe.parentNode.removeChild(batch.iframe); } if (batch.form) batch.form.parentNode.removeChild(batch.form); // XHR tidyup: avoid IE handles increase if (batch.req) { // If this is a poll frame then stop comet polling if (batch.req == DWREngine._pollReq) DWREngine._pollReq = null; delete batch.req; } for (var i = 0; i < batch.postHooks.length; i++) { batch.postHooks[i](); } batch.postHooks = null; // TODO: There must be a better way??? delete DWREngine._batches[batch.map.batchId]; DWREngine._batchesLength--; //for (var i = 0; i < DWREngine._batches.length; i++) { // if (DWREngine._batches[i] == batch) { // DWREngine._batches.splice(i, 1); // break; // } //} batch.completed = true; // If there is anything on the queue waiting to go out, then send it. // We don't need to check for ordered mode, here because when ordered mode // gets turned off, we still process *waiting* batches in an ordered way. if (DWREngine._batchQueue.length != 0) { var sendbatch = DWREngine._batchQueue.shift(); DWREngine._sendData(sendbatch); }}; |
if (batch.iframe == DWREngine._pollFrame) DWREngine._pollFrame = null; | if (batch.iframe == dwr.engine._pollFrame) dwr.engine._pollFrame = null; | DWREngine._clearUp = function(batch) { if (batch.completed) { DWREngine._handleError(null, { name:"dwrengine.doubleComplete", message:"Double complete" }); return; } // IFrame tidyup if (batch.div) batch.div.parentNode.removeChild(batch.div); if (batch.iframe) { // If this is a poll frame then stop comet polling if (batch.iframe == DWREngine._pollFrame) DWREngine._pollFrame = null; batch.iframe.parentNode.removeChild(batch.iframe); } if (batch.form) batch.form.parentNode.removeChild(batch.form); // XHR tidyup: avoid IE handles increase if (batch.req) { // If this is a poll frame then stop comet polling if (batch.req == DWREngine._pollReq) DWREngine._pollReq = null; delete batch.req; } for (var i = 0; i < batch.postHooks.length; i++) { batch.postHooks[i](); } batch.postHooks = null; // TODO: There must be a better way??? delete DWREngine._batches[batch.map.batchId]; DWREngine._batchesLength--; //for (var i = 0; i < DWREngine._batches.length; i++) { // if (DWREngine._batches[i] == batch) { // DWREngine._batches.splice(i, 1); // break; // } //} batch.completed = true; // If there is anything on the queue waiting to go out, then send it. // We don't need to check for ordered mode, here because when ordered mode // gets turned off, we still process *waiting* batches in an ordered way. if (DWREngine._batchQueue.length != 0) { var sendbatch = DWREngine._batchQueue.shift(); DWREngine._sendData(sendbatch); }}; |
if (batch.req == DWREngine._pollReq) DWREngine._pollReq = null; | if (batch.req == dwr.engine._pollReq) dwr.engine._pollReq = null; | DWREngine._clearUp = function(batch) { if (batch.completed) { DWREngine._handleError(null, { name:"dwrengine.doubleComplete", message:"Double complete" }); return; } // IFrame tidyup if (batch.div) batch.div.parentNode.removeChild(batch.div); if (batch.iframe) { // If this is a poll frame then stop comet polling if (batch.iframe == DWREngine._pollFrame) DWREngine._pollFrame = null; batch.iframe.parentNode.removeChild(batch.iframe); } if (batch.form) batch.form.parentNode.removeChild(batch.form); // XHR tidyup: avoid IE handles increase if (batch.req) { // If this is a poll frame then stop comet polling if (batch.req == DWREngine._pollReq) DWREngine._pollReq = null; delete batch.req; } for (var i = 0; i < batch.postHooks.length; i++) { batch.postHooks[i](); } batch.postHooks = null; // TODO: There must be a better way??? delete DWREngine._batches[batch.map.batchId]; DWREngine._batchesLength--; //for (var i = 0; i < DWREngine._batches.length; i++) { // if (DWREngine._batches[i] == batch) { // DWREngine._batches.splice(i, 1); // break; // } //} batch.completed = true; // If there is anything on the queue waiting to go out, then send it. // We don't need to check for ordered mode, here because when ordered mode // gets turned off, we still process *waiting* batches in an ordered way. if (DWREngine._batchQueue.length != 0) { var sendbatch = DWREngine._batchQueue.shift(); DWREngine._sendData(sendbatch); }}; |
delete DWREngine._batches[batch.map.batchId]; DWREngine._batchesLength--; | delete dwr.engine._batches[batch.map.batchId]; dwr.engine._batchesLength--; | DWREngine._clearUp = function(batch) { if (batch.completed) { DWREngine._handleError(null, { name:"dwrengine.doubleComplete", message:"Double complete" }); return; } // IFrame tidyup if (batch.div) batch.div.parentNode.removeChild(batch.div); if (batch.iframe) { // If this is a poll frame then stop comet polling if (batch.iframe == DWREngine._pollFrame) DWREngine._pollFrame = null; batch.iframe.parentNode.removeChild(batch.iframe); } if (batch.form) batch.form.parentNode.removeChild(batch.form); // XHR tidyup: avoid IE handles increase if (batch.req) { // If this is a poll frame then stop comet polling if (batch.req == DWREngine._pollReq) DWREngine._pollReq = null; delete batch.req; } for (var i = 0; i < batch.postHooks.length; i++) { batch.postHooks[i](); } batch.postHooks = null; // TODO: There must be a better way??? delete DWREngine._batches[batch.map.batchId]; DWREngine._batchesLength--; //for (var i = 0; i < DWREngine._batches.length; i++) { // if (DWREngine._batches[i] == batch) { // DWREngine._batches.splice(i, 1); // break; // } //} batch.completed = true; // If there is anything on the queue waiting to go out, then send it. // We don't need to check for ordered mode, here because when ordered mode // gets turned off, we still process *waiting* batches in an ordered way. if (DWREngine._batchQueue.length != 0) { var sendbatch = DWREngine._batchQueue.shift(); DWREngine._sendData(sendbatch); }}; |
if (DWREngine._batchQueue.length != 0) { var sendbatch = DWREngine._batchQueue.shift(); DWREngine._sendData(sendbatch); | if (dwr.engine._batchQueue.length != 0) { var sendbatch = dwr.engine._batchQueue.shift(); dwr.engine._sendData(sendbatch); | DWREngine._clearUp = function(batch) { if (batch.completed) { DWREngine._handleError(null, { name:"dwrengine.doubleComplete", message:"Double complete" }); return; } // IFrame tidyup if (batch.div) batch.div.parentNode.removeChild(batch.div); if (batch.iframe) { // If this is a poll frame then stop comet polling if (batch.iframe == DWREngine._pollFrame) DWREngine._pollFrame = null; batch.iframe.parentNode.removeChild(batch.iframe); } if (batch.form) batch.form.parentNode.removeChild(batch.form); // XHR tidyup: avoid IE handles increase if (batch.req) { // If this is a poll frame then stop comet polling if (batch.req == DWREngine._pollReq) DWREngine._pollReq = null; delete batch.req; } for (var i = 0; i < batch.postHooks.length; i++) { batch.postHooks[i](); } batch.postHooks = null; // TODO: There must be a better way??? delete DWREngine._batches[batch.map.batchId]; DWREngine._batchesLength--; //for (var i = 0; i < DWREngine._batches.length; i++) { // if (DWREngine._batches[i] == batch) { // DWREngine._batches.splice(i, 1); // break; // } //} batch.completed = true; // If there is anything on the queue waiting to go out, then send it. // We don't need to check for ordered mode, here because when ordered mode // gets turned off, we still process *waiting* batches in an ordered way. if (DWREngine._batchQueue.length != 0) { var sendbatch = DWREngine._batchQueue.shift(); DWREngine._sendData(sendbatch); }}; |
batch.req = null; | var div = batch.div; var form = batch.form; var iframe = batch.iframe; var script = batch.script; delete batch.req; delete batch.div; delete batch.form; delete batch.iframe; delete batch.script; | dwr.auth._cloneBatch = function(batch) { var req = batch.req; batch.req = null; var clone = dwr.auth._deepCopy(batch); batch.req = req; clone.completed = false; clone.map.httpSessionId = dwr.engine._getJSessionId(); clone.map.scriptSessionId = dwr.engine._getScriptSessionId(); return clone;} |
batch.div = div; batch.form = form; batch.iframe = iframe; batch.script = script; | dwr.auth._cloneBatch = function(batch) { var req = batch.req; batch.req = null; var clone = dwr.auth._deepCopy(batch); batch.req = req; clone.completed = false; clone.map.httpSessionId = dwr.engine._getJSessionId(); clone.map.scriptSessionId = dwr.engine._getScriptSessionId(); return clone;} |
|
if (batch.method == DWREngine._pollMethod) { | if (batch.isPoll == true) { | DWREngine._constructRequest = function(batch) { // A quick string to help people that use web log analysers var request = { url:batch.path + batch.mode, body:null }; if (batch.method == DWREngine._pollMethod) { request.url += "ReverseAjax.dwr"; } else if (batch.map.callCount == 1) { request.url += batch.map["c0-scriptName"] + "." + batch.map["c0-methodName"] + ".dwr"; } else { request.url += "Multiple." + batch.map.callCount + ".dwr"; } // Play nice with url re-writing if (location.href.match(/jsessionid/)) { request.url += ";jsessionid=" + DWREngine._httpSessionId; } var prop; if (batch.verb == "GET") { // Some browsers (Opera/Safari2) seem to fail to convert the callCount value // to a string in the loop below so we do it manually here. batch.map.callCount = "" + batch.map.callCount; request.url += "?"; for (prop in batch.map) { if (typeof batch.map[prop] != "function") { request.url += encodeURIComponent(prop) + "=" + encodeURIComponent(batch.map[prop]) + "&"; } } request.url = request.url.substring(0, request.url.length - 1); } else { // PERFORMANCE: for iframe mode this is thrown away. request.body = ""; for (prop in batch.map) { if (typeof batch.map[prop] != "function") { request.body += prop + "=" + batch.map[prop] + DWREngine._postSeperator; } } request.body = DWREngine._contentRewriteHandler(request.body); } request.url = DWREngine._urlRewriteHandler(request.url); return request;}; |
DWREngine._constructRequest = function(batch) { | dwr.engine._constructRequest = function(batch) { | DWREngine._constructRequest = function(batch) { // A quick string to help people that use web log analysers var request = { url:batch.path + batch.mode, body:null }; if (batch.isPoll == true) { request.url += "ReverseAjax.dwr"; } else if (batch.map.callCount == 1) { request.url += batch.map["c0-scriptName"] + "." + batch.map["c0-methodName"] + ".dwr"; } else { request.url += "Multiple." + batch.map.callCount + ".dwr"; } // Play nice with url re-writing var sessionMatch = location.href.match(/jsessionid=(\w+)/); if (sessionMatch != null) { request.url += ";jsessionid=" + sessionMatch[1]; } var prop; if (batch.httpMethod == "GET") { // Some browsers (Opera/Safari2) seem to fail to convert the callCount value // to a string in the loop below so we do it manually here. batch.map.callCount = "" + batch.map.callCount; request.url += "?"; for (prop in batch.map) { if (typeof batch.map[prop] != "function") { request.url += encodeURIComponent(prop) + "=" + encodeURIComponent(batch.map[prop]) + "&"; } } request.url = request.url.substring(0, request.url.length - 1); } else { // PERFORMANCE: for iframe mode this is thrown away. request.body = ""; for (prop in batch.map) { if (typeof batch.map[prop] != "function") { request.body += prop + "=" + batch.map[prop] + DWREngine._postSeperator; } } request.body = DWREngine._contentRewriteHandler(request.body); } request.url = DWREngine._urlRewriteHandler(request.url); return request;}; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.