<%= render :partial => 'spree/admin/shared/question_tabs', :locals => { :current => 'Taxons' } %>
<%= render :partial => 'question_taxon_table', :locals => { :taxons => @taxons } %>
<%= form_tag '#' do %> <%= label_tag nil, t(:search) %>: <% end %> <%= javascript_tag do %> function search_for_taxons(){ $.ajax({ data: {q: $("#searchtext").val() }, dataType: 'html', success: function(request){ jQuery('#search_hits').html(request); }, type: 'POST', url: '<%= available_admin_question_taxons_url(@question, :format => 'js') %>' }); } $("#searchtext").keypress(function (e) { if ((e.which && e.which == 13) || (e.keyCode && e.keyCode == 13)) { search_for_taxons(); return false; } else { return true; } }); $("#searchtext").delayedObserver(function() { search_for_taxons(); }, 0.75); <% end %>