spark-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sro...@apache.org
Subject svn commit: r1747076 - in /spark: js/downloads.js site/js/downloads.js
Date Mon, 06 Jun 2016 20:59:55 GMT
Author: srowen
Date: Mon Jun  6 20:59:54 2016
New Revision: 1747076

URL: http://svn.apache.org/viewvc?rev=1747076&view=rev
Log:
SPARK-15778 part 2: group preview/stable releases in download version dropdown

Modified:
    spark/js/downloads.js
    spark/site/js/downloads.js

Modified: spark/js/downloads.js
URL: http://svn.apache.org/viewvc/spark/js/downloads.js?rev=1747076&r1=1747075&r2=1747076&view=diff
==============================================================================
--- spark/js/downloads.js (original)
+++ spark/js/downloads.js Mon Jun  6 20:59:54 2016
@@ -53,18 +53,18 @@ addRelease("1.1.0", new Date("9/11/2014"
 addRelease("1.0.2", new Date("8/5/2014"), sources.concat(packagesV3), true, true);
 addRelease("1.0.1", new Date("7/11/2014"), sources.concat(packagesV3), false, true);
 addRelease("1.0.0", new Date("5/30/2014"), sources.concat(packagesV2), false, true);
-addRelease("0.9.2", new Date("7/23/2014"), sources.concat(packagesV2), true, false);
-addRelease("0.9.1", new Date("4/9/2014"), sources.concat(packagesV2), false, false);
-addRelease("0.9.0-incubating", new Date("2/2/2014"), sources.concat(packagesV2), false, false);
-addRelease("0.8.1-incubating", new Date("12/19/2013"), sources.concat(packagesV2), true,
false);
-addRelease("0.8.0-incubating", new Date("9/25/2013"), sources.concat(packagesV1), true, false);
-addRelease("0.7.3", new Date("7/16/2013"), sources.concat(packagesV1), true, false);
-addRelease("0.7.2", new Date("2/6/2013"), sources.concat(packagesV1), false, false);
-addRelease("0.7.0", new Date("2/27/2013"), sources, false, false);
+addRelease("0.9.2", new Date("7/23/2014"), sources.concat(packagesV2), true, true);
+addRelease("0.9.1", new Date("4/9/2014"), sources.concat(packagesV2), false, true);
+addRelease("0.9.0-incubating", new Date("2/2/2014"), sources.concat(packagesV2), false, true);
+addRelease("0.8.1-incubating", new Date("12/19/2013"), sources.concat(packagesV2), true,
true);
+addRelease("0.8.0-incubating", new Date("9/25/2013"), sources.concat(packagesV1), true, true);
+addRelease("0.7.3", new Date("7/16/2013"), sources.concat(packagesV1), true, true);
+addRelease("0.7.2", new Date("2/6/2013"), sources.concat(packagesV1), false, true);
+addRelease("0.7.0", new Date("2/27/2013"), sources, false, true);
 
 function append(el, contents) {
-  el.innerHTML = el.innerHTML + contents;
-};
+  el.innerHTML += contents;
+}
 
 function empty(el) {
   el.innerHTML = "";
@@ -79,27 +79,25 @@ function versionShort(version) { return
 function initDownloads() {
   var versionSelect = document.getElementById("sparkVersionSelect");
 
-  // Populate versions
-  var markedDefault = false;
+  // Populate stable versions
+  append(versionSelect, "<optgroup label=\"Stable\">");
   for (var version in releases) {
+    if (!releases[version].downloadable || !releases[version].stable) { continue; }
     var releaseDate = releases[version].released;
-    var downloadable = releases[version].downloadable;
-    var stable = releases[version].stable;
-
-    if (!downloadable) { continue; }
-
-    var selected = false;
-    if (!markedDefault && stable) {
-      selected = true;
-      markedDefault = true;
-    }
+    var title = versionShort(version) + " (" + releaseDate.toDateString().slice(4) + ")";
+    append(versionSelect, "<option value=\"" + version + "\">" + title + "</option>");
+  }
+  append(versionSelect, "</optgroup>");
 
-    // Don't display incubation status here
+  // Populate other versions
+  append(versionSelect, "<optgroup label=\"Preview\">");
+  for (var version in releases) {
+    if (!releases[version].downloadable || releases[version].stable) { continue; }
+    var releaseDate = releases[version].released;
     var title = versionShort(version) + " (" + releaseDate.toDateString().slice(4) + ")";
-    append(versionSelect, 
-      "<option value=\"" + version + "\"" + (selected ? " selected=\"selected\"" : "")
+ ">" +
-      title + "</option>");
+    append(versionSelect, "<option value=\"" + version + "\">" + title + "</option>");
   }
+  append(versionSelect, "</optgroup>");
 
   // Populate packages and (transitively) releases
   onVersionSelect();

Modified: spark/site/js/downloads.js
URL: http://svn.apache.org/viewvc/spark/site/js/downloads.js?rev=1747076&r1=1747075&r2=1747076&view=diff
==============================================================================
--- spark/site/js/downloads.js (original)
+++ spark/site/js/downloads.js Mon Jun  6 20:59:54 2016
@@ -53,18 +53,18 @@ addRelease("1.1.0", new Date("9/11/2014"
 addRelease("1.0.2", new Date("8/5/2014"), sources.concat(packagesV3), true, true);
 addRelease("1.0.1", new Date("7/11/2014"), sources.concat(packagesV3), false, true);
 addRelease("1.0.0", new Date("5/30/2014"), sources.concat(packagesV2), false, true);
-addRelease("0.9.2", new Date("7/23/2014"), sources.concat(packagesV2), true, false);
-addRelease("0.9.1", new Date("4/9/2014"), sources.concat(packagesV2), false, false);
-addRelease("0.9.0-incubating", new Date("2/2/2014"), sources.concat(packagesV2), false, false);
-addRelease("0.8.1-incubating", new Date("12/19/2013"), sources.concat(packagesV2), true,
false);
-addRelease("0.8.0-incubating", new Date("9/25/2013"), sources.concat(packagesV1), true, false);
-addRelease("0.7.3", new Date("7/16/2013"), sources.concat(packagesV1), true, false);
-addRelease("0.7.2", new Date("2/6/2013"), sources.concat(packagesV1), false, false);
-addRelease("0.7.0", new Date("2/27/2013"), sources, false, false);
+addRelease("0.9.2", new Date("7/23/2014"), sources.concat(packagesV2), true, true);
+addRelease("0.9.1", new Date("4/9/2014"), sources.concat(packagesV2), false, true);
+addRelease("0.9.0-incubating", new Date("2/2/2014"), sources.concat(packagesV2), false, true);
+addRelease("0.8.1-incubating", new Date("12/19/2013"), sources.concat(packagesV2), true,
true);
+addRelease("0.8.0-incubating", new Date("9/25/2013"), sources.concat(packagesV1), true, true);
+addRelease("0.7.3", new Date("7/16/2013"), sources.concat(packagesV1), true, true);
+addRelease("0.7.2", new Date("2/6/2013"), sources.concat(packagesV1), false, true);
+addRelease("0.7.0", new Date("2/27/2013"), sources, false, true);
 
 function append(el, contents) {
-  el.innerHTML = el.innerHTML + contents;
-};
+  el.innerHTML += contents;
+}
 
 function empty(el) {
   el.innerHTML = "";
@@ -79,27 +79,25 @@ function versionShort(version) { return
 function initDownloads() {
   var versionSelect = document.getElementById("sparkVersionSelect");
 
-  // Populate versions
-  var markedDefault = false;
+  // Populate stable versions
+  append(versionSelect, "<optgroup label=\"Stable\">");
   for (var version in releases) {
+    if (!releases[version].downloadable || !releases[version].stable) { continue; }
     var releaseDate = releases[version].released;
-    var downloadable = releases[version].downloadable;
-    var stable = releases[version].stable;
-
-    if (!downloadable) { continue; }
-
-    var selected = false;
-    if (!markedDefault && stable) {
-      selected = true;
-      markedDefault = true;
-    }
+    var title = versionShort(version) + " (" + releaseDate.toDateString().slice(4) + ")";
+    append(versionSelect, "<option value=\"" + version + "\">" + title + "</option>");
+  }
+  append(versionSelect, "</optgroup>");
 
-    // Don't display incubation status here
+  // Populate other versions
+  append(versionSelect, "<optgroup label=\"Preview\">");
+  for (var version in releases) {
+    if (!releases[version].downloadable || releases[version].stable) { continue; }
+    var releaseDate = releases[version].released;
     var title = versionShort(version) + " (" + releaseDate.toDateString().slice(4) + ")";
-    append(versionSelect, 
-      "<option value=\"" + version + "\"" + (selected ? " selected=\"selected\"" : "")
+ ">" +
-      title + "</option>");
+    append(versionSelect, "<option value=\"" + version + "\">" + title + "</option>");
   }
+  append(versionSelect, "</optgroup>");
 
   // Populate packages and (transitively) releases
   onVersionSelect();



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org


Mime
View raw message