Feature #23980 » replace-toggle-checkboxes-icon.patch
| app/helpers/application_helper.rb | ||
|---|---|---|
| 1597 | 1597 |
link_to_function(l(:button_uncheck_all), "checkAll('#{form_name}', false)")
|
| 1598 | 1598 |
end |
| 1599 | 1599 | |
| 1600 |
def toggle_checkboxes_link(selector) |
|
| 1601 |
link_to_function '', |
|
| 1600 |
def toggle_checkboxes_link(selector, options={})
|
|
| 1601 |
css_classes = 'icon icon-checked' |
|
| 1602 |
css_classes += ' ' + options[:class] if options[:class] |
|
| 1603 |
link_to_function icon_with_label('checked', ''),
|
|
| 1602 | 1604 |
"toggleCheckboxesBySelector('#{selector}')",
|
| 1603 | 1605 |
:title => "#{l(:button_check_all)} / #{l(:button_uncheck_all)}",
|
| 1604 |
:class => 'icon icon-checked'
|
|
| 1606 |
:class => css_classes
|
|
| 1605 | 1607 |
end |
| 1606 | 1608 | |
| 1607 | 1609 |
def progress_bar(pcts, options={})
|
| app/views/roles/permissions.html.erb | ||
|---|---|---|
| 37 | 37 |
<th><%=l(:label_permissions)%></th> |
| 38 | 38 |
<% @roles.each do |role| %> |
| 39 | 39 |
<th> |
| 40 |
<%= link_to_function('',
|
|
| 41 |
"toggleCheckboxesBySelector('input.role-#{role.id}')",
|
|
| 42 |
:title => "#{l(:button_check_all)} / #{l(:button_uncheck_all)}",
|
|
| 43 |
:class => 'icon-only icon-checked') %> |
|
| 40 |
<%= toggle_checkboxes_link("input.role-#{role.id}") %>
|
|
| 44 | 41 |
<%= content_tag(role.builtin? ? 'em' : 'span', role.name) %> |
| 45 | 42 |
</th> |
| 46 | 43 |
<% end %> |
| ... | ... | |
| 64 | 61 |
<% humanized_perm_name = l_or_humanize(permission.name, :prefix => 'permission_') %> |
| 65 | 62 |
<tr class="permission-<%= permission.name %>"> |
| 66 | 63 |
<td class="name"> |
| 67 |
<%= link_to_function('',
|
|
| 68 |
"toggleCheckboxesBySelector('.permission-#{permission.name} input')",
|
|
| 69 |
:title => "#{l(:button_check_all)} / #{l(:button_uncheck_all)}",
|
|
| 70 |
:class => 'icon-only icon-checked') %> |
|
| 64 |
<%= toggle_checkboxes_link(".permission-#{permission.name} input") %>
|
|
| 71 | 65 |
<%= humanized_perm_name %> |
| 72 | 66 |
</td> |
| 73 | 67 |
<% @roles.each do |role| %> |
| app/views/trackers/fields.html.erb | ||
|---|---|---|
| 9 | 9 |
<th></th> |
| 10 | 10 |
<% @trackers.each do |tracker| %> |
| 11 | 11 |
<th> |
| 12 |
<%= link_to_function('', "toggleCheckboxesBySelector('input.tracker-#{tracker.id}')",
|
|
| 13 |
:title => "#{l(:button_check_all)} / #{l(:button_uncheck_all)}",
|
|
| 14 |
:class => 'icon-only icon-checked') %> |
|
| 12 |
<%= toggle_checkboxes_link("input.tracker-#{tracker.id}") %>
|
|
| 15 | 13 |
<%= tracker.name %> |
| 16 | 14 |
</th> |
| 17 | 15 |
<% end %> |
| ... | ... | |
| 28 | 26 |
<tr> |
| 29 | 27 |
<% field_name = l("field_#{field}".delete_suffix('_id')) %>
|
| 30 | 28 |
<td class="name"> |
| 31 |
<%= link_to_function('', "toggleCheckboxesBySelector('input.core-field-#{field}')",
|
|
| 32 |
:title => "#{l(:button_check_all)} / #{l(:button_uncheck_all)}",
|
|
| 33 |
:class => 'icon-only icon-checked') %> |
|
| 29 |
<%= toggle_checkboxes_link("input.core-field-#{field}") %>
|
|
| 34 | 30 |
<%= field_name %> |
| 35 | 31 |
</td> |
| 36 | 32 |
<% @trackers.each do |tracker| %> |
| ... | ... | |
| 51 | 47 |
<% @custom_fields.each do |field| %> |
| 52 | 48 |
<tr> |
| 53 | 49 |
<td class="name"> |
| 54 |
<%= link_to_function('', "toggleCheckboxesBySelector('input.custom-field-#{field.id}')",
|
|
| 55 |
:title => "#{l(:button_check_all)} / #{l(:button_uncheck_all)}",
|
|
| 56 |
:class => 'icon-only icon-checked') %> |
|
| 50 |
<%= toggle_checkboxes_link("input.custom-field-#{field.id}") %>
|
|
| 57 | 51 |
<%= field.name %> |
| 58 | 52 |
</td> |
| 59 | 53 |
<% @trackers.each do |tracker| %> |
| app/views/workflows/_form.html.erb | ||
|---|---|---|
| 2 | 2 |
<thead> |
| 3 | 3 |
<tr> |
| 4 | 4 |
<th> |
| 5 |
<%= link_to_function('', "toggleCheckboxesBySelector('table.transitions-#{name} input[type=checkbox]:not(:disabled)')",
|
|
| 6 |
:title => "#{l(:button_check_all)} / #{l(:button_uncheck_all)}",
|
|
| 7 |
:class => 'no-tooltip icon-only icon-checked') %> |
|
| 5 |
<%= toggle_checkboxes_link("table.transitions-#{name} input[type=checkbox]:not(:disabled)", { class: 'no-tooltip' }) %>
|
|
| 8 | 6 |
<%=l(:label_current_status)%> |
| 9 | 7 |
</th> |
| 10 | 8 |
<th colspan="<%= @statuses.length %>"><%=l(:label_new_statuses_allowed)%></th> |
| ... | ... | |
| 13 | 11 |
<td></td> |
| 14 | 12 |
<% for new_status in @statuses %> |
| 15 | 13 |
<td style="width:<%= 75 / @statuses.size %>%;"> |
| 16 |
<%= link_to_function('', "toggleCheckboxesBySelector('table.transitions-#{name} input[type=checkbox]:not(:disabled).new-status-#{new_status.id}')",
|
|
| 17 |
:title => "#{l(:button_check_all)} / #{l(:button_uncheck_all)}",
|
|
| 18 |
:class => 'no-tooltip icon-only icon-checked') %> |
|
| 14 |
<%= toggle_checkboxes_link("table.transitions-#{name} input[type=checkbox]:not(:disabled).new-status-#{new_status.id}", { class: 'no-tooltip' }) %>
|
|
| 19 | 15 |
<%= new_status.name %> |
| 20 | 16 |
</td> |
| 21 | 17 |
<% end %> |
| ... | ... | |
| 27 | 23 |
<% next if old_status.nil? && name != 'always' %> |
| 28 | 24 |
<tr> |
| 29 | 25 |
<td class="name"> |
| 30 |
<%= link_to_function('', "toggleCheckboxesBySelector('table.transitions-#{name} input[type=checkbox]:not(:disabled).old-status-#{old_status.try(:id) || 0}')",
|
|
| 31 |
:title => "#{l(:button_check_all)} / #{l(:button_uncheck_all)}",
|
|
| 32 |
:class => 'no-tooltip icon-only icon-checked') %> |
|
| 26 |
<%= toggle_checkboxes_link("table.transitions-#{name} input[type=checkbox]:not(:disabled).old-status-#{old_status.try(:id) || 0}", { class: 'no-tooltip' }) %>
|
|
| 33 | 27 |
<% if old_status %> |
| 34 | 28 |
<% old_status_name = old_status.name %> |
| 35 | 29 |
<%= old_status_name %> |