Sha256: 75e787c6231aed53a3e778782e4f6d66574fce28f89aa4647887efe950bbdc0d
Contents?: true
Size: 833 Bytes
Versions: 40
Compression:
Stored size: 833 Bytes
Contents
<div id="filter_bar"> <%= render partial: "filter", collection: resource_filters_for_select %> </div> <script type="text/javascript"> $(function() { $('select', '#filter_bar').on('change', function(e) { var $this = $(this); var filter_param = 'filter['+$this.attr('name')+']'; var path = '<%= resources_path(resource_handler.namespaced_resources_name) %>'; var params = new URLSearchParams('<%= raw search_filter_params.to_query %>'); if ($this.val() === "") { params.delete(filter_param); } else { params.set(filter_param, $this.val()); } if ($this.data('remote') === true) { $.get(path, params.toString(), null, 'script'); } else { Turbolinks.visit(path + '?' + params.toString()); } return false; }); }); </script>
Version data entries
40 entries across 40 versions & 1 rubygems