Also call update_links() in update_arch() to avoid wrong URL (thx, cstamas)
[grml.org.git] / download / prerelease / index.html.tt2
index 88e4f50..26a97e1 100644 (file)
@@ -99,13 +99,14 @@ exit;
     <h2>Options</h2>
 
     <select name="flavour" id="download_flavour" style="width:100%;">
-    <option value="full" selected="selected">grml (350MB)</option>
-    <option value="small">grml-small (150MB)</option>
+    <option value="full" selected="selected">grml-full (~350MB)</option>
+    <option value="small">grml-small (~150MB)</option>
     </select>
     <br /><br />
     <select name="arch" id="download_arch" style="width:100%;">
-    <option value="amd64" selected="selected">64-bit PC</option>
-    <option value="i386">32-bit PC</option>
+    <option value="amd64" selected="selected">64-bit PC (amd64)</option>
+    <option value="i386">32-bit PC (i586+)</option>
+    <option value="96">One for both (700MB)</option>
     </select>
     <br />
     <br />
@@ -132,6 +133,13 @@ exit;
 
     </form>
     <script type="text/javascript">
+    function update_arch() {
+        var flavour = document.getElementById('download_flavour').value;
+        if (flavour == 'small') document.getElementById('download_arch').innerHTML = '<option value="amd64">64-bit PC (amd64)</option><option value="i386">32-bit PC (i586+)</option><option value="96">One for both (300MB)</option>';
+        if (flavour == 'full') document.getElementById('download_arch').innerHTML = '<option value="amd64">64-bit PC (amd64)</option><option value="i386">32-bit PC (i586+)</option><option value="96">One for both (700MB)</option>';
+        update_links();
+    }
+
     function update_links() {
         var current_version = "2012.05-rc1";
         var product = 'grml';
@@ -139,6 +147,7 @@ exit;
         var flavour = document.getElementById('download_flavour').value;
         if (arch == 'amd64') product = 'grml64';
         if (arch == 'i386') product = 'grml32';
+        if (arch == '96') product = 'grml96';
         var iso = product + '-' + flavour + '_' + current_version + '.iso';
         var mirror_url = "http://download.grml.org/devel/";
         document.getElementById('download_link_mirror').href = mirror_url + iso;
@@ -146,8 +155,9 @@ exit;
         document.getElementById('download_link_bt').href = mirror_url + iso + '.torrent';
         document.getElementById('download_link_signature').href = mirror_url + iso + '.sha1.asc';
     }
+
     // hook update function
-    document.getElementById('download_flavour').onchange = update_links;
+    document.getElementById('download_flavour').onchange = update_arch;
     document.getElementById('download_arch').onchange = update_links;
     // force initial link href set
     update_links();