james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b...@apache.org
Subject svn commit: r532445 - /james/project/trunk/maven-skin/src/main/resources/META-INF/maven/site.vm
Date Wed, 25 Apr 2007 19:24:55 GMT
Author: bago
Date: Wed Apr 25 12:24:54 2007
New Revision: 532445

URL: http://svn.apache.org/viewvc?view=rev&rev=532445
Log:
The mirror choosing script replaces any simple word in square bracket and was breaking the
new javascript.
Added a "0+" in front of each index in square bracket.

Modified:
    james/project/trunk/maven-skin/src/main/resources/META-INF/maven/site.vm

Modified: james/project/trunk/maven-skin/src/main/resources/META-INF/maven/site.vm
URL: http://svn.apache.org/viewvc/james/project/trunk/maven-skin/src/main/resources/META-INF/maven/site.vm?view=diff&rev=532445&r1=532444&r2=532445
==============================================================================
--- james/project/trunk/maven-skin/src/main/resources/META-INF/maven/site.vm (original)
+++ james/project/trunk/maven-skin/src/main/resources/META-INF/maven/site.vm Wed Apr 25 12:24:54
2007
@@ -342,15 +342,17 @@
       var hrefs = document.getElementsByTagName('a'); 
       var extensions = ["gz","bz2","zip","jar","asc","sar"];
       for (var l = 0; l < hrefs.length; l++) {
-        if (hrefs[l] != "") {
-          var path = hrefs[l].pathname;
-          var external = hrefs[l].hostname != location.host;
+        // 0+ is a workaround for download.cgi script by ASF that 
+        // is not happy with simple words in square brackets
+        if (hrefs[0+l] != "") {
+          var path = hrefs[0+l].pathname;
+          var external = hrefs[0+l].hostname != location.host;
           if (external) {
             var splitted = path.split('.');
-            var ext = splitted[splitted.length-1];
+            var ext = splitted[0+splitted.length-1];
             for (var e = 0; e < extensions.length; e++) {
-              if (extensions[e] == ext) {
-                startListening(hrefs[l],"click",trackDownloads);
+              if (extensions[0+e] == ext) {
+                startListening(hrefs[0+l],"click",trackDownloads);
               }
     	}
           }



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message