Sha256: 84fe81d0692991696c1d0cab6229589248c223d94ecddca57b0c7f7dbc673903
Contents?: true
Size: 961 Bytes
Versions: 77
Compression:
Stored size: 961 Bytes
Contents
<div id="filter_bar"> <h3><%= Alchemy.t('Filter') %></h3> <%= select_tag( 'picture_filter', options_for_select([ [Alchemy.t(:all_pictures), ''], [Alchemy.t(:last_upload_only), 'last_upload'], [Alchemy.t(:recently_uploaded_only), 'recent'], [Alchemy.t(:without_tag), 'without_tag'] ], search_filter_params[:filter]), :data => { :remote => !!request.xhr? }, :class => 'alchemy_selectbox' ) %> </div> <script type="text/javascript"> $(function() { $('#picture_filter').on('change', function(e) { var $this = $(this); var url = '<%= alchemy.admin_pictures_path(search_filter_params.except(:filter).to_h) %>'; if ($this.data('remote') === true) { $.get(url, {filter: $this.val()}, null, 'script'); } else { delimiter = url.match(/\?/) ? '&' : '?'; Turbolinks.visit(url + delimiter + 'filter=' + $this.val()); } return false; }); }); </script>
Version data entries
77 entries across 77 versions & 1 rubygems