summaryrefslogtreecommitdiffstats
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-rw-r--r--app/views/roles/permissions.html.erb10
-rw-r--r--app/views/trackers/fields.html.erb12
-rw-r--r--app/views/workflows/_form.html.erb12
3 files changed, 8 insertions, 26 deletions
diff --git a/app/views/roles/permissions.html.erb b/app/views/roles/permissions.html.erb
index 07fb6f615..63a1267fc 100644
--- a/app/views/roles/permissions.html.erb
+++ b/app/views/roles/permissions.html.erb
@@ -37,10 +37,7 @@
<th><%=l(:label_permissions)%></th>
<% @roles.each do |role| %>
<th>
- <%= link_to_function('',
- "toggleCheckboxesBySelector('input.role-#{role.id}')",
- :title => "#{l(:button_check_all)} / #{l(:button_uncheck_all)}",
- :class => 'icon-only icon-checked') %>
+ <%= toggle_checkboxes_link("input.role-#{role.id}") %>
<%= content_tag(role.builtin? ? 'em' : 'span', role.name) %>
</th>
<% end %>
@@ -64,10 +61,7 @@
<% humanized_perm_name = l_or_humanize(permission.name, :prefix => 'permission_') %>
<tr class="permission-<%= permission.name %>">
<td class="name">
- <%= link_to_function('',
- "toggleCheckboxesBySelector('.permission-#{permission.name} input')",
- :title => "#{l(:button_check_all)} / #{l(:button_uncheck_all)}",
- :class => 'icon-only icon-checked') %>
+ <%= toggle_checkboxes_link(".permission-#{permission.name} input") %>
<%= humanized_perm_name %>
</td>
<% @roles.each do |role| %>
diff --git a/app/views/trackers/fields.html.erb b/app/views/trackers/fields.html.erb
index 0b0fee373..5f44bf43b 100644
--- a/app/views/trackers/fields.html.erb
+++ b/app/views/trackers/fields.html.erb
@@ -9,9 +9,7 @@
<th></th>
<% @trackers.each do |tracker| %>
<th>
- <%= link_to_function('', "toggleCheckboxesBySelector('input.tracker-#{tracker.id}')",
- :title => "#{l(:button_check_all)} / #{l(:button_uncheck_all)}",
- :class => 'icon-only icon-checked') %>
+ <%= toggle_checkboxes_link("input.tracker-#{tracker.id}") %>
<%= tracker.name %>
</th>
<% end %>
@@ -28,9 +26,7 @@
<tr>
<% field_name = l("field_#{field}".delete_suffix('_id')) %>
<td class="name">
- <%= link_to_function('', "toggleCheckboxesBySelector('input.core-field-#{field}')",
- :title => "#{l(:button_check_all)} / #{l(:button_uncheck_all)}",
- :class => 'icon-only icon-checked') %>
+ <%= toggle_checkboxes_link("input.core-field-#{field}") %>
<%= field_name %>
</td>
<% @trackers.each do |tracker| %>
@@ -51,9 +47,7 @@
<% @custom_fields.each do |field| %>
<tr>
<td class="name">
- <%= link_to_function('', "toggleCheckboxesBySelector('input.custom-field-#{field.id}')",
- :title => "#{l(:button_check_all)} / #{l(:button_uncheck_all)}",
- :class => 'icon-only icon-checked') %>
+ <%= toggle_checkboxes_link("input.custom-field-#{field.id}") %>
<%= field.name %>
</td>
<% @trackers.each do |tracker| %>
diff --git a/app/views/workflows/_form.html.erb b/app/views/workflows/_form.html.erb
index f0863850f..5b7c16bc9 100644
--- a/app/views/workflows/_form.html.erb
+++ b/app/views/workflows/_form.html.erb
@@ -2,9 +2,7 @@
<thead>
<tr>
<th>
- <%= link_to_function('', "toggleCheckboxesBySelector('table.transitions-#{name} input[type=checkbox]:not(:disabled)')",
- :title => "#{l(:button_check_all)} / #{l(:button_uncheck_all)}",
- :class => 'no-tooltip icon-only icon-checked') %>
+ <%= toggle_checkboxes_link("table.transitions-#{name} input[type=checkbox]:not(:disabled)", { class: 'no-tooltip' }) %>
<%=l(:label_current_status)%>
</th>
<th colspan="<%= @statuses.length %>"><%=l(:label_new_statuses_allowed)%></th>
@@ -13,9 +11,7 @@
<td></td>
<% for new_status in @statuses %>
<td style="width:<%= 75 / @statuses.size %>%;">
- <%= link_to_function('', "toggleCheckboxesBySelector('table.transitions-#{name} input[type=checkbox]:not(:disabled).new-status-#{new_status.id}')",
- :title => "#{l(:button_check_all)} / #{l(:button_uncheck_all)}",
- :class => 'no-tooltip icon-only icon-checked') %>
+ <%= toggle_checkboxes_link("table.transitions-#{name} input[type=checkbox]:not(:disabled).new-status-#{new_status.id}", { class: 'no-tooltip' }) %>
<%= new_status.name %>
</td>
<% end %>
@@ -27,9 +23,7 @@
<% next if old_status.nil? && name != 'always' %>
<tr>
<td class="name">
- <%= link_to_function('', "toggleCheckboxesBySelector('table.transitions-#{name} input[type=checkbox]:not(:disabled).old-status-#{old_status.try(:id) || 0}')",
- :title => "#{l(:button_check_all)} / #{l(:button_uncheck_all)}",
- :class => 'no-tooltip icon-only icon-checked') %>
+ <%= toggle_checkboxes_link("table.transitions-#{name} input[type=checkbox]:not(:disabled).old-status-#{old_status.try(:id) || 0}", { class: 'no-tooltip' }) %>
<% if old_status %>
<% old_status_name = old_status.name %>
<%= old_status_name %>