Sha256: d0128304302e5b9716c53aeff3c6c81f9dca1ec8a6bea615ccfc2828af1ab079
Contents?: true
Size: 1.89 KB
Versions: 1
Compression:
Stored size: 1.89 KB
Contents
<%# This partial was remove in solidus 1.2 but that is also when Spree.solidus_version was added %> <%= render :partial => 'spree/admin/shared/product_sub_menu' if !Spree.respond_to?(:solidus_version) %> <%= render :partial => 'spree/admin/shared/product_tabs', :locals => {:current => "Parts"} %> <div id="product_parts"> <%= render :partial => "parts_table", :locals => {:parts => @parts} %> </div> <%= form_tag('#') do %> <label><%= Spree.t(:search) %>:</label> <input id="searchtext" size="25"> <button id="search_parts_button" class="fa fa-search button" name="button">Search</button> <% end %> <br/> <div id="search_hits"></div> <%= javascript_tag do %> /*! * Spree Product Assembly * https://github.com/spree/spree-product-assembly * */ function search_for_parts(){ $.ajax({ data: {q: $("#searchtext").val() }, dataType: 'html', success: function(request){ jQuery('#search_hits').html(request); $('#search_hits').show(); }, type: 'POST', url: '<%= available_admin_product_parts_url(@product) %>' }); } $("#searchtext").keypress(function (e) { if ((e.which && e.which == 13) || (e.keyCode && e.keyCode == 13)) { search_for_parts(); return false; } else { return true; } }); $("#search_parts_button").click(function(e) { e.preventDefault(); search_for_parts(); }); function subscribe_product_part_links() { $("a.set_count_admin_product_part_link").click(function(){ params = { count : $("input", $(this).parent().parent()).val() }; return make_post_request($(this), params); }); $("a.remove_admin_product_part_link").click(function(){ return make_post_request($(this), {}); }); } function make_post_request(link, post_params) { $.post(link.attr("href"), post_params, "script"); return false; } subscribe_product_part_links(); <% end -%>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
solidus_product_assembly-1.0.0 | app/views/spree/admin/parts/index.html.erb |