* VRFS-778; defining all possible images for download page in template, so that rails precompile error is avoided
This commit is contained in:
parent
b918406edf
commit
7812970343
|
|
@ -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');
|
||||
|
|
|
|||
|
|
@ -18,19 +18,29 @@
|
|||
</ul>
|
||||
<br>
|
||||
{% } %}
|
||||
<a href="{{data.uri}}" class="current-os-download" data-platform="{{data.platform}}"><%= image_tag("content/button_download_{{data.platformName}}.png", :alt => "download {{data.platformName}}", :size => "348x92") %></a>
|
||||
<a href="{{data.uri}}" class="current-os-download" data-platform="{{data.platform}}"></a>
|
||||
|
||||
<div class="hidden hidden-images">
|
||||
<%= image_tag("content/button_download_mac.png", :alt => "download mac", :size => "348x92", "data-purpose" => "mac") %>
|
||||
<%= image_tag("content/button_download_windows.png", :alt => "download windows", :size => "348x92", "data-purpose" => "windows") %>
|
||||
<%= image_tag("content/button_download_linux.png", :alt => "download linux", :size => "348x92", "data-purpose" => "linux") %>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script type="text/template" id="client-download-select-others"> 2 1 31 2
|
||||
<script type="text/template" id="client-download-select-others">
|
||||
<div class="download-box">
|
||||
NEED A DIFFERENT VERSION?
|
||||
<br><br>
|
||||
<div class="download-others">
|
||||
<a href="#" data-platform="{{data.platform1}}"><%= image_tag("content/button_download_other_{{data.platformName1}}.png", :alt => "show download for {{data.platformName1}}", :size => "300x79") %></a><br><br>
|
||||
<a href="#" data-platform="{{data.platform2}}"><%= image_tag("content/button_download_other_{{data.platformName2}}.png", :alt => "show download for {{data.platformName2}}", :size => "300x79") %></a>
|
||||
<a href="#" data-order="1" data-platform="{{data.platform1}}"></a><br><br>
|
||||
<a href="#" data-order="2" data-platform="{{data.platform2}}"></a>
|
||||
</div>
|
||||
<div class="hidden hidden-images">
|
||||
<%= image_tag("content/button_download_other_mac.png", :alt => "show download for mac", :size => "300x79", "data-purpose" => "mac") %>
|
||||
<%= image_tag("content/button_download_other_windows.png", :alt => "show download for windows", :size => "300x79", "data-purpose" => "windows") %>
|
||||
<%= image_tag("content/button_download_other_linux.png", :alt => "show download for linux", :size => "300x79", "data-purpose" => "linux" ) %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</script>
|
||||
|
|
@ -38,4 +38,6 @@
|
|||
</div>
|
||||
<%end%>
|
||||
|
||||
<%= render "users/download_templates" %>
|
||||
<%= render "users/download_templates" %>
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue