You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by mg...@apache.org on 2011/04/12 17:16:20 UTC
svn commit: r1091451 -
/wicket/trunk/wicket-core/src/main/java/org/apache/wicket/ajax/wicket-ajax.js
Author: mgrigorov
Date: Tue Apr 12 15:16:14 2011
New Revision: 1091451
URL: http://svn.apache.org/viewvc?rev=1091451&view=rev
Log:
WICKET-3606 wicket-ajax.js replaceOuterhtmlIE() fails when the page title has to be updated with Ajax
Add a check whether the element which should be re-rendered is <title> and use "document.title = titleText" instead.
Modified:
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/ajax/wicket-ajax.js
Modified: wicket/trunk/wicket-core/src/main/java/org/apache/wicket/ajax/wicket-ajax.js
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/main/java/org/apache/wicket/ajax/wicket-ajax.js?rev=1091451&r1=1091450&r2=1091451&view=diff
==============================================================================
--- wicket/trunk/wicket-core/src/main/java/org/apache/wicket/ajax/wicket-ajax.js (original)
+++ wicket/trunk/wicket-core/src/main/java/org/apache/wicket/ajax/wicket-ajax.js Tue Apr 12 15:16:14 2011
@@ -206,6 +206,11 @@ Wicket.replaceOuterHtmlIE = function(ele
Wicket.Log.error("Wicket.replaceOuterHtmlIE: " + e + ": eval -> " + script);
}
return;
+ } else if (element.tagName == "TITLE") {
+ // match the text between the tags
+ var titleText = />(.*?)</.exec(text)[1];
+ document.title = titleText;
+ return;
}
var parent = element.parentNode;