|
|
|
@ -85,6 +85,11 @@ See docs/COPYRIGHT.rdoc for more details. |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function apply_filters_observer() { |
|
|
|
|
jQuery('body').on('click', '.advanced-filters--filter-toggle', function() { |
|
|
|
|
var input = jQuery(this); |
|
|
|
|
toggle_filter(input.data('field')); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
jQuery('#query_form input[type=text]').each(function (index, filter) { |
|
|
|
|
jQuery(filter).on('keypress', function (e) { |
|
|
|
|
if ((e.keyCode || e.which) == 13) { |
|
|
|
@ -114,8 +119,7 @@ See docs/COPYRIGHT.rdoc for more details. |
|
|
|
|
<li <%= 'style="display:none;"'.html_safe unless query.has_filter?(field) %> id="tr_<%= field %>" class="filter advanced-filters--filter"> |
|
|
|
|
<% label_value = filter.human_name || WorkPackage.human_attribute_name(filter.class.key) %> |
|
|
|
|
<label class="advanced-filters--filter-name" title="<%= label_value %>"> |
|
|
|
|
<%= check_box_tag 'f[]', field, query.has_filter?(field), id: "cb_#{field}" %> |
|
|
|
|
<% csp_onclick("toggle_filter('#{field}');", "#cb_#{field}") %> |
|
|
|
|
<%= check_box_tag 'f[]', field, query.has_filter?(field), id: "cb_#{field}", data: { field: field }, class: 'advanced-filters--filter-toggle' %> |
|
|
|
|
<%= label_value %> |
|
|
|
|
</label> |
|
|
|
|
<div class="advanced-filters--filter-operator"> |
|
|
|
|