Sha256: 80cad9d5d2029da024a834daf4296ecc96d6d3316860d64fb58657c5f371529f

Contents?: true

Size: 1.1 KB

Versions: 4

Compression:

Stored size: 1.1 KB

Contents

{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

Version data entries

4 entries across 2 versions & 1 rubygems

Version Path
bcms_spree-0.0.2 test/dummy/tmp/cache/assets/development/sprockets/105557d82c2ebf0c8c0e600cb4db13d3
bcms_spree-0.0.2 test/dummy/tmp/cache/assets/development/sprockets/fdbefd997b7558c6775caa248b6b8967
bcms_spree-0.0.1 test/dummy/tmp/cache/assets/development/sprockets/105557d82c2ebf0c8c0e600cb4db13d3
bcms_spree-0.0.1 test/dummy/tmp/cache/assets/development/sprockets/fdbefd997b7558c6775caa248b6b8967