User: andreschnabel
Date: 06/04/04 11:34:37

Modified:
 /de/www/downloads/
  quickdl.js

Log:
 parameter zum vorauswählen einer Version in der URL möglich z.B.
 http://..../quickhtml?version=1.1.5

File Changes:

Directory: /de/www/downloads/
=============================

File [changed]: quickdl.js
Url: 
http://de.openoffice.org/source/browse/de/www/downloads/quickdl.js?r1=1.88&r2=1.89
Delta lines:  +22 -1
--------------------
--- quickdl.js  27 Mar 2006 19:30:24 -0000      1.88
+++ quickdl.js  4 Apr 2006 18:34:35 -0000       1.89
@@ -174,6 +174,26 @@
        document.addEventListener('load',resetForm,false);
 }
 
+
+/*-----------------------------------------------------------------*/
+function getVersionParam() {
+/* extrahiert eine gewünschte Version aus der URL, sofern übergeben
+               */
+       var dc = window.location.href;
+       var prefix = "version";
+       var begin = dc.indexOf("?" + prefix);
+       if (begin == -1) {
+               begin = dc.indexOf(prefix);
+               if (begin != 0) return null;
+       } else
+               begin += 2;
+       var end = dc.indexOf("&", begin);
+       if (end == -1)
+               end = dc.length;
+       return unescape(dc.substring(begin + prefix.length, end));
+}
+
+
 /*-----------------------------------------------------------------*/
 function resetForm() {
 /*--- setzt wie Eingabe fuer Quickdownload auf Initialwerte
@@ -210,7 +230,7 @@
         Plattform auf */
 var i;
 
-       /* gew?lte Plattform holen */
+       /* gewälte Plattform holen */
        var platform = 
document.download.platform.options[document.download.platform.selectedIndex].value;
        /* Liste leeren */
        document.download.version.options.length = 0;
@@ -226,6 +246,7 @@
        }
        if ( document.download.version.options.length > 0 ){
                document.download.version.disabled = false;
+               document.download.version.value = getVersionParam();
                makeMirrorList ();
        } else {
                document.download.version.disabled= true;




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Antwort per Email an