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

Version Path
alchemy_cms-6.1.10 app/views/alchemy/admin/resources/_filter_bar.html.erb
alchemy_cms-6.1.9 app/views/alchemy/admin/resources/_filter_bar.html.erb
alchemy_cms-6.1.8 app/views/alchemy/admin/resources/_filter_bar.html.erb
alchemy_cms-6.1.7 app/views/alchemy/admin/resources/_filter_bar.html.erb
alchemy_cms-6.1.6 app/views/alchemy/admin/resources/_filter_bar.html.erb
alchemy_cms-7.0.0.pre.b app/views/alchemy/admin/resources/_filter_bar.html.erb
alchemy_cms-6.1.5 app/views/alchemy/admin/resources/_filter_bar.html.erb
alchemy_cms-6.0.14 app/views/alchemy/admin/resources/_filter_bar.html.erb
alchemy_cms-6.1.4 app/views/alchemy/admin/resources/_filter_bar.html.erb
alchemy_cms-7.0.0.pre.a app/views/alchemy/admin/resources/_filter_bar.html.erb
alchemy_cms-6.0.13 app/views/alchemy/admin/resources/_filter_bar.html.erb
alchemy_cms-6.1.3 app/views/alchemy/admin/resources/_filter_bar.html.erb
alchemy_cms-6.1.2 app/views/alchemy/admin/resources/_filter_bar.html.erb
alchemy_cms-6.1.1 app/views/alchemy/admin/resources/_filter_bar.html.erb
alchemy_cms-6.1.0 app/views/alchemy/admin/resources/_filter_bar.html.erb
alchemy_cms-6.0.12 app/views/alchemy/admin/resources/_filter_bar.html.erb
alchemy_cms-6.0.11 app/views/alchemy/admin/resources/_filter_bar.html.erb
alchemy_cms-6.0.10 app/views/alchemy/admin/resources/_filter_bar.html.erb
alchemy_cms-6.0.9 app/views/alchemy/admin/resources/_filter_bar.html.erb
alchemy_cms-6.0.8 app/views/alchemy/admin/resources/_filter_bar.html.erb