diff --git a/web/app/assets/javascripts/web/downloads.js b/web/app/assets/javascripts/web/downloads.js index 8be6b5b53..a060e8e7e 100644 --- a/web/app/assets/javascripts/web/downloads.js +++ b/web/app/assets/javascripts/web/downloads.js @@ -56,8 +56,17 @@ }; var blurb = $(context._.template($('#client-download-blurb-contents').html(), options, { variable: 'data' })); + + // isolate active image for blurb + $('div.hidden-images img[data-purpose=' + platformName + ']', blurb).remove().appendTo($('a.current-os-download', blurb)); + var selectOthers = $(context._.template($('#client-download-select-others').html(), options, { variable: 'data' })); + // isolate active images for selectOthers + $('div.hidden-images img[data-purpose=' + platformName1 + ']', selectOthers).remove().appendTo($('a[data-order=1]', selectOthers)); + $('div.hidden-images img[data-purpose=' + platformName2 + ']', selectOthers).remove().appendTo($('a[data-order=2]', selectOthers)); + + // install click handler for change selection $('a', selectOthers).click(function() { var platform = $(this).attr('data-platform'); diff --git a/web/app/views/users/_download_templates.html.erb b/web/app/views/users/_download_templates.html.erb index 9d85cc0b4..6b8fad6e4 100644 --- a/web/app/views/users/_download_templates.html.erb +++ b/web/app/views/users/_download_templates.html.erb @@ -18,19 +18,29 @@
{% } %} - <%= image_tag("content/button_download_{{data.platformName}}.png", :alt => "download {{data.platformName}}", :size => "348x92") %> + + + - \ No newline at end of file diff --git a/web/app/views/users/_downloads.html.erb b/web/app/views/users/_downloads.html.erb index 4e1e206a8..c44d4941a 100644 --- a/web/app/views/users/_downloads.html.erb +++ b/web/app/views/users/_downloads.html.erb @@ -38,4 +38,6 @@ <%end%> -<%= render "users/download_templates" %> \ No newline at end of file +<%= render "users/download_templates" %> + +