Sha256: 500824e4ed1d16b2e44899dd20416d2d02a643fb54588f31235252fbb1928665
Contents?: true
Size: 1.01 KB
Versions: 4
Compression:
Stored size: 1.01 KB
Contents
<%= render :partial => 'spree/admin/shared/question_tabs', :locals => { :current => 'Products' } %> <div id="selected-products" data-hook> <%= render :partial => 'question_product_table', :locals => { :products => @products } %> </div> <%= form_tag '#' do %> <%= label_tag nil, t(:search) %>: <input id="searchtext" size="25"> <% end %> <%= javascript_tag do %> function search_for_products(){ $.ajax({ data: {q: $("#searchtext").val() }, dataType: 'html', success: function(request){ jQuery('#search_hits').html(request); }, type: 'POST', url: '<%= available_admin_question_products_url(@question, :format => 'js') %>' }); } $("#searchtext").keypress(function (e) { if ((e.which && e.which == 13) || (e.keyCode && e.keyCode == 13)) { search_for_products(); return false; } else { return true; } }); $("#searchtext").delayedObserver(function() { search_for_products(); }, 0.75); <% end %> <br /> <div id="search_hits" data-hook></div>
Version data entries
4 entries across 4 versions & 1 rubygems