Sha256: d8f23bcdeaf768be791af2e64eb49f0f62c03aaddb25ea0056cc127ed98e0aa4

Contents?: true

Size: 686 Bytes

Versions: 8

Compression:

Stored size: 686 Bytes

Contents

$(document).on('change', '#product_prototype_id', function() {
  var solidus_prototypes_select = $('#product_prototype_id');
  var id = solidus_prototypes_select.val();
  if (id.length) {
    var url = Spree.pathFor("admin") + "/prototypes/" + id;
    $('#product-from-prototype').load(url);
    $('#product_taxons_field :input, #product_option_types_field :input').prop('disabled', true);
    $('#product_taxons_field, #product_option_types_field').hide();
  } else {
    $('#product_taxons_field :input, #product_option_types_field :input').prop('disabled', false);
    $('#product_taxons_field, #product_option_types_field').show();
    $('#product-from-prototype').empty();
  }
});

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
solidus_prototypes-1.6.0 app/assets/javascripts/spree/backend/select_prototype_ajax.js
solidus_prototypes-1.5.1 app/assets/javascripts/spree/backend/select_prototype_ajax.js
solidus_prototypes-1.5.0 app/assets/javascripts/spree/backend/select_prototype_ajax.js
solidus_prototypes-1.4.0 app/assets/javascripts/spree/backend/select_prototype_ajax.js
solidus_prototypes-1.3.0 app/assets/javascripts/spree/backend/select_prototype_ajax.js
solidus_prototypes-1.2.0 app/assets/javascripts/spree/backend/select_prototype_ajax.js
solidus_prototypes-1.1.1 app/assets/javascripts/spree/backend/select_prototype_ajax.js
solidus_prototypes-1.1.0 app/assets/javascripts/spree/backend/select_prototype_ajax.js