Author: xavier
Date: Sat Dec 15 02:24:14 2007
New Revision: 604417
URL: http://svn.apache.org/viewvc?rev=604417&view=rev
Log:
fix download page for mirror script: externalize download redirection
javascript to make python template engine happy
Added:
ant/ivy/site/js/download-redirect.js (with props)
Modified:
ant/ivy/site/download.cgi
ant/ivy/site/download.html
Modified: ant/ivy/site/download.cgi
URL:
http://svn.apache.org/viewvc/ant/ivy/site/download.cgi?rev=604417&r1=604416&r2=604417&view=diff
==============================================================================
--- ant/ivy/site/download.cgi (original)
+++ ant/ivy/site/download.cgi Sat Dec 15 02:24:14 2007
@@ -1,6 +1,22 @@
#!/bin/sh
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
# Wrapper script around mirrors.cgi script
# (we must change to that directory in order for python to pick up the
# python includes correctly)
cd /www/www.apache.org/dyn/mirrors
-/www/www.apache.org/dyn/mirrors/mirrors.cgi $*
\ No newline at end of file
+/www/www.apache.org/dyn/mirrors/mirrors.cgi $*
Modified: ant/ivy/site/download.html
URL:
http://svn.apache.org/viewvc/ant/ivy/site/download.html?rev=604417&r1=604416&r2=604417&view=diff
==============================================================================
--- ant/ivy/site/download.html (original)
+++ ant/ivy/site/download.html Sat Dec 15 02:24:14 2007
@@ -20,12 +20,7 @@
<html>
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
- <script type="text/javascript">
- // use download cgi when deployed on http site
- if (m =
/(http:.*\/)download.html([^\/]*)/.exec(window.location.toString())) {
- window.location.href = m[1] + "download.cgi" + m[2];
- }
- </script>
+ <script src="js/download-redirect.js" type="text/javascript"></script>
<script type="text/javascript">var xookiConfig = {level: 0};</script>
<script type="text/javascript" src="xooki/xooki.js"></script>
</head>
Added: ant/ivy/site/js/download-redirect.js
URL:
http://svn.apache.org/viewvc/ant/ivy/site/js/download-redirect.js?rev=604417&view=auto
==============================================================================
--- ant/ivy/site/js/download-redirect.js (added)
+++ ant/ivy/site/js/download-redirect.js Sat Dec 15 02:24:14 2007
@@ -0,0 +1,21 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+*/
+if (m = /(http:.*\/)download.html([^\/]*)/.exec(window.location.toString())) {
+ window.location.href = m[1] + "download.cgi" + m[2];
+}
Propchange: ant/ivy/site/js/download-redirect.js
------------------------------------------------------------------------------
svn:eol-style = native