Fix more onclick

pull/6827/head
Oliver Günther 7 years ago
parent a47f5f6934
commit 609eb0398e
No known key found for this signature in database
GPG Key ID: 88872239EB414F99
  1. 6
      app/assets/javascripts/meeting/meeting.js
  2. 13
      app/views/meeting_contents/history.html.erb

@ -20,4 +20,10 @@ jQuery(function($) {
return false;
});
$('.meetings--checkbox-version-to').click(function() {
var target = $(this).data('target');
$(target).prop('checked', true);
});
});

@ -26,6 +26,10 @@ See doc/COPYRIGHT.md for more details.
<h3><%= l(:label_history) %></h3>
<% content_for :header_tags do %>
<%= javascript_include_tag('meeting/meeting.js') %>
<% end %>
<%= form_tag({:action => "diff"}, :method => :get) do %>
<div class="generic-table--container">
<div class="generic-table--results-container">
@ -94,7 +98,12 @@ See doc/COPYRIGHT.md for more details.
</td>
<td class="checkbox -short">
<% 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}" }) %>
<label class="hidden-for-sighted" for="checkbox-from-<%= index %>"><%= l(:description_compare_from) %> <%= index %></label>
<% end %>
</td>
@ -111,7 +120,7 @@ See doc/COPYRIGHT.md for more details.
<% end %>
</tbody>
</table>
</div>
</div>
<%= styled_button_tag l(:label_view_diff), class: '-small -highlight' if show_diff %>

Loading…
Cancel
Save