Author: knopp
Date: Fri Jun 13 06:05:21 2008
New Revision: 667515

URL: http://svn.apache.org/viewvc?rev=667515&view=rev
Log:
fixed header contribution for safari

Modified:
    wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js

Modified: 
wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js?rev=667515&r1=667514&r2=667515&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js 
(original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js Fri 
Jun 13 06:05:21 2008
@@ -95,7 +95,7 @@
    DOMParser = function () {}
 
    DOMParser.prototype.parseFromString = function (str, contentType) {
-               alert('You are using an old version of Safari.\nTo be able to 
use this page you need at least version 2.0.1.');
+               s('You are using an old version of Safari.\nTo be able to use 
this page you need at least version 2.0.1.');
    }
 }
 
@@ -1409,11 +1409,12 @@
                        
                        // determine whether it is external javascript (has src 
attribute set)
                        var src = node.getAttribute("src");
+                       
                        if (src != null && src != "") {
                                // load the external javascript using 
Wicket.Ajax.Request
                                
                                // callback when script is loaded
-                               var onLoad = function(content) {
+                               var onLoad = function(content) {                
                        
                                        Wicket.Head.addJavascript(content, 
null, src);
                                        Wicket.Ajax.invokePostCallHandlers();
 
@@ -1476,9 +1477,15 @@
                return false;
 
        var head = document.getElementsByTagName("head")[0];
+       
+       if (element.tagName == "script")
+               head = document;
+       
        var nodes = head.getElementsByTagName(element.tagName);
+       
        for (var i = 0; i < nodes.length; ++i) {
-               var node = nodes[i];            
+               var node = nodes[i];                            
+               
                // check node names and mandatory attribute values
                // we also have to check for attribute name that is suffixed by 
"_".
                // this is necessary for filtering script references


Reply via email to