{I" class:ETI"BundledAsset;FI"logical_path;TI"&spree/backend/nested-attribute.js;FI" pathname;TI"u/usr/local/rvm/gems/ruby-2.1.2/gems/spree_backend-2.2.4/app/assets/javascripts/spree/backend/nested-attribute.js;FI"content_type;TI"application/javascript;TI" mtime;Tl+TI" length;TimI" digest;TI"%24fc6cac4d94b330da666eb83d4315c4;FI" source;TI"m// On page load var replace_ids = function (s) { var new_id = new Date().getTime(); return s.replace(/NEW_RECORD/g, new_id); }; $(function () { 'use strict'; $('a[id*=nested]').on('click', function () { var template = $(this).prop('href').replace(/.*#/, ''); var html = replace_ids(eval(template)); $('#ul-' + $(this).prop('id')).append(html); update_remove_links(); }); update_remove_links(); }); var update_remove_links = function () { 'use strict'; $('.remove').on('click', function () { $(this).prevAll(':first').val(1); $(this).parent().hide(); return false; }); }; ;TI"required_assets_digest;TI"%66b1538f81e8c13033e772e36e22bfbf;FI" _version;TI"%5ef14a844324cba3e114bd0123f88a5e;F