You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by Igor Vaynberg <ig...@gmail.com> on 2011/12/19 17:29:08 UTC
Re: svn commit: r1220820 - /wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js
this needs to be ported to 1.5.x and trunk, no?
-igor
On Mon, Dec 19, 2011 at 8:04 AM, <jc...@apache.org> wrote:
> Author: jcompagner
> Date: Mon Dec 19 16:04:11 2011
> New Revision: 1220820
>
> URL: http://svn.apache.org/viewvc?rev=1220820&view=rev
> Log:
> Use a resource loading lib to setup order for processing ajax response fragments
>
> another patch to work with IE7 an IE8
> Issue: WICKET-3927
>
> Modified:
> wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js
>
> Modified: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js
> URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js?rev=1220820&r1=1220819&r2=1220820&view=diff
> ==============================================================================
> --- wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js (original)
> +++ wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js Mon Dec 19 16:04:11 2011
> @@ -1621,14 +1621,19 @@ Wicket.Head.Contributor.prototype = {
> // this makes a second GET request to the css but it gets it either from the cache or
> // downloads just the first several bytes and realizes that the MIME is wrong and ignores the rest
> var img = document.createElement('img');
> + var notifyCalled = false;
> + img.onerror = function() {
> + if (!notifyCalled) {
> + notifyCalled = true;
> + notify();
> + }
> + }
> img.src = css.href;
> if (img.complete) {
> - notify();
> - }
> - else {
> - img.onerror = function() {
> - notify();
> - }
> + if (!notifyCalled) {
> + notifyCalled = true;
> + notify();
> + }
> }
> });
> },
>
>