diff --git a/app/views/spree/admin/product_properties/index.html.haml b/app/views/spree/admin/product_properties/index.html.haml index cf1faa590de..895beef33ac 100644 --- a/app/views/spree/admin/product_properties/index.html.haml +++ b/app/views/spree/admin/product_properties/index.html.haml @@ -60,13 +60,13 @@ $("input#product_inherits_properties").change -> $("#inherited_properties").toggle $(this).is(':checked') -= javascript_tag do +:javascript var properties = #{raw(@properties.to_json)}; - + console.log(properties) $("#product_properties input.autocomplete").live("keydown", function(){ - already_auto_completed = $(this).is('ac_input'); - if (!already_auto_completed) { - $(this).autocomplete({source: properties}); - $(this).focus(); - } + already_auto_completed = $(this).is('ac_input'); + if (!already_auto_completed) { + $(this).autocomplete({source: properties}); + $(this).focus(); + } });