Commit 7c7ba317 authored by maeda's avatar maeda

Adds toggle checkboxes feature to trackers permissions (#28242).

Patch by Mizuki ISHIKAWA.


git-svn-id: https://svn.redmine.org/redmine/trunk@17256 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent bc20d86e
......@@ -78,8 +78,8 @@
<% end %>
</thead>
<tbody>
<tr>
<td class="name"><b><%= l(:label_tracker_all) %></b></td>
<tr class='permissions-all-trackers'>
<td class="name"><%= toggle_checkboxes_link('tr.permissions-all-trackers input[type="checkbox"]') %><b><%= l(:label_tracker_all) %></b></td>
<% permissions.each do |permission| %>
<td class="<%= "#{permission}_shown" %>">
<%= hidden_field_tag "role[permissions_all_trackers][#{permission}]", '0', :id => nil %>
......@@ -92,8 +92,8 @@
<% end %>
</tr>
<% Tracker.sorted.all.each do |tracker| %>
<tr>
<td class="name"><%= tracker.name %></td>
<tr class="permissions-tracker-<%= tracker.id %>">
<td class="name"><%= toggle_checkboxes_link("tr.permissions-tracker-#{tracker.id} input:enabled") %><%= tracker.name %></td>
<% permissions.each do |permission| %>
<td class="<%= "#{permission}_shown" %>"><%= check_box_tag "role[permissions_tracker_ids][#{permission}][]",
tracker.id,
......
......@@ -10,7 +10,7 @@ function toggleCheckboxesBySelector(selector) {
$(selector).each(function(index) {
if (!$(this).is(':checked')) { all_checked = false; }
});
$(selector).prop('checked', !all_checked);
$(selector).prop('checked', !all_checked).trigger('change');
}
function showAndScrollTo(id, focus) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment