Permalink
Browse files

Update to make it work on 1.3

Adding icon to sidebar link
  • Loading branch information...
geermc4 authored and JDutil committed Nov 2, 2012
1 parent 97a0e2d commit 9a39b284f95a212d51223722da48aa9f1fced451
@@ -4,8 +4,8 @@
:partial => "spree/admin/products/related_products",
:disabled => false)
-Deface::Override.new(:virtual_path => "spree/admin/configurations/index",
+Deface::Override.new(:virtual_path => "spree/admin/shared/_configuration_menu",
:name => "add_configuration_line",
- :insert_bottom => "[data-hook='admin_configurations_menu']",
- :text => "<%= configurations_menu_item(I18n.t('relation_types'), admin_relation_types_url, I18n.t('manage_relation_types')) %>",
+ :insert_bottom => "[data-hook='admin_configurations_sidebar_menu'], #admin_configurations_sidebar_menu[data-hook]",
+ :text => "<%= configurations_sidebar_menu_item(I18n.t('manage_relation_types'), admin_relation_types_url) %>",
:disabled => false)
@@ -1,3 +1,3 @@
<li<%== ' class="active"' if current == "Related Products" %>>
- <%= link_to t("related_products"), related_admin_product_url(@product) %>
+ <%= link_to_with_icon 'icon-sitemap', t("related_products"), related_admin_product_url(@product) %>
</li>
@@ -2,6 +2,8 @@
<%= render :partial => 'spree/admin/shared/product_tabs', :locals => {:current => "Related Products"} %>
+<%= render :partial => "spree/admin/variants/autocomplete", :formats => :js %>
+
<%= csrf_meta_tag %>
@@ -12,9 +14,8 @@
<fieldset>
<legend><%= t('add_related_product') %></legend>
<div style="float:left;width:55%;margin-right:5%;">
- <%= label_tag :add_product_name, t("name_or_sku") %>
- <%= text_field_tag :add_product_name, '', :class => 'fullwidth title product_autocomplete' %>
- <%= hidden_field_tag :add_variant_id %>
+ <%= label_tag :add_variant_name, t("name_or_sku") %>
+ <%= text_field_tag :add_variant_name, '', :class => 'fullwidth variant_autocomplete' %>
</div>
<div style="float:left;width:10%;margin-right:5%;">
<%= label_tag :add_discount, t("discount_amount") %>
@@ -43,7 +44,7 @@
var expand_variants = false;
$("#add_related_product").live("click", function(){
- if($('#add_variant_id').val() == ''){ return false; }
+ if($('#add_variant_name').val() == ''){ return false; }
update_target = jQuery(this).attr("data-update");
jQuery.ajax({
@@ -52,7 +53,7 @@
type: "POST",
data: {
"relation[related_to_type]" : "Product",
- "relation[related_to_id]": $('#add_variant_id').val(),
+ "relation[related_to_id]": $('#add_variant_name').val(),
"relation[relation_type_id]": $('#add_type').val(),
"relation[discount_amount]" : $('#add_discount').val()
}
@@ -17,8 +17,8 @@ Gem::Specification.new do |s|
s.has_rdoc = true
- s.add_dependency 'spree_core', '~> 1.2.0'
- s.add_dependency 'spree_promo', '~> 1.2.0'
+ s.add_dependency 'spree_core', '>= 1.2.0'
+ s.add_dependency 'spree_promo', '>= 1.2.0'
s.add_development_dependency 'factory_girl', '2.6.4'
s.add_development_dependency 'rspec-rails', '~> 2.9.0'

0 comments on commit 9a39b28

Please sign in to comment.