Skip to content

Commit

Permalink
Merge pull request #8 from mpharrigan/pretty-versions
Browse files Browse the repository at this point in the history
Display versions by new "display" field in versions.json
  • Loading branch information
mpharrigan committed Feb 20, 2016
2 parents 9757984 + 057b14c commit ebcef76
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions msmb_theme/static/js/versions.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
// get all of the releases from versions.json, and use these to populate the
// dropdown menu of different releases
$(document).ready(function () {
// Define base_url in versions.html, probably through a template variable
// Define versions_json_url in versions.html through a template variable
$.getJSON(versions_json_url)
.done(function (data) {
$.each(data.sort(function (a, b) {
return a.version > b.version
}), function (i, item) {
$("<dd>").append(
$("<a>").text(item.version).attr('href', item.url)
$("<a>").text(item.display).attr('href', item.url)
).appendTo("#versionselector");
});
})
Expand Down

0 comments on commit ebcef76

Please sign in to comment.