diff --git a/app/assets/javascripts/meeting/meeting.js b/app/assets/javascripts/meeting/meeting.js index 4fcd305077..f383b6a109 100644 --- a/app/assets/javascripts/meeting/meeting.js +++ b/app/assets/javascripts/meeting/meeting.js @@ -20,4 +20,10 @@ jQuery(function($) { return false; }); + + + $('.meetings--checkbox-version-to').click(function() { + var target = $(this).data('target'); + $(target).prop('checked', true); + }); }); \ No newline at end of file diff --git a/app/views/meeting_contents/history.html.erb b/app/views/meeting_contents/history.html.erb index 53854d86a3..e2fcb57d20 100644 --- a/app/views/meeting_contents/history.html.erb +++ b/app/views/meeting_contents/history.html.erb @@ -26,6 +26,10 @@ See doc/COPYRIGHT.md for more details.

<%= l(:label_history) %>

+<% content_for :header_tags do %> + <%= javascript_include_tag('meeting/meeting.js') %> +<% end %> + <%= form_tag({:action => "diff"}, :method => :get) do %>
@@ -94,7 +98,12 @@ See doc/COPYRIGHT.md for more details. <% if show_diff && (index < @content_versions.size-1) %> - <%= radio_button_tag('version_to', content_version.version, (index==0), :id => "checkbox-from-#{index}", :onclick => "$('checkbox-to-#{index+1}').checked=true;") %> + <%= radio_button_tag('version_to', + content_version.version, + (index==0), + id: "checkbox-from-#{index}", + class: 'meetings--checkbox-version-to', + data: { target: ".checkbox-to-#{index+1}" }) %> <% end %> @@ -111,7 +120,7 @@ See doc/COPYRIGHT.md for more details. <% end %> - +
<%= styled_button_tag l(:label_view_diff), class: '-small -highlight' if show_diff %>