Patch #28242 » 0002-adds-toogle-checkboxes-to-trackers-and-custom-fields.patch
| app/views/projects/settings/_issues.html.erb | ||
|---|---|---|
| 2 | 2 |
<%= hidden_field_tag 'tab', 'issues' %> |
| 3 | 3 | |
| 4 | 4 |
<% unless @trackers.empty? %> |
| 5 |
<fieldset class="box tabular" id="project_trackers"><legend><%=l(:label_tracker_plural)%></legend> |
|
| 5 |
<fieldset class="box tabular" id="project_trackers"><legend><%= toggle_checkboxes_link('#project_trackers input[type=checkbox]') %><%= l(:label_tracker_plural)%></legend>
|
|
| 6 | 6 |
<% @trackers.each do |tracker| %> |
| 7 | 7 |
<label class="floating"> |
| 8 | 8 |
<%= check_box_tag 'project[tracker_ids][]', tracker.id, @project.trackers.to_a.include?(tracker), :id => nil %> |
| ... | ... | |
| 14 | 14 |
<% end %> |
| 15 | 15 | |
| 16 | 16 |
<% unless @issue_custom_fields.empty? %> |
| 17 |
<fieldset class="box tabular" id="project_issue_custom_fields"><legend><%=l(:label_custom_field_plural)%></legend> |
|
| 17 |
<fieldset class="box tabular" id="project_issue_custom_fields"><legend><%= toggle_checkboxes_link('#project_issue_custom_fields input[type=checkbox]:enabled') %><%=l(:label_custom_field_plural)%></legend>
|
|
| 18 | 18 |
<% @issue_custom_fields.each do |custom_field| %> |
| 19 | 19 |
<label class="floating"> |
| 20 | 20 |
<%= check_box_tag 'project[issue_custom_field_ids][]', custom_field.id, (@project.all_issue_custom_fields.include? custom_field), |
| public/javascripts/application.js | ||
|---|---|---|
| 7 | 7 | |
| 8 | 8 |
function toggleCheckboxesBySelector(selector) {
|
| 9 | 9 |
var all_checked = true; |
| 10 | ||
| 10 | 11 |
$(selector).each(function(index) {
|
| 11 | 12 |
if (!$(this).is(':checked')) { all_checked = false; }
|
| 12 | 13 |
}); |