Sha256: bc0b44fed610c2ce0448b2a6c11fd5a615284b055cce0f86530f81f81db05dc5
Contents?: true
Size: 668 Bytes
Versions: 139
Compression:
Stored size: 668 Bytes
Contents
Spree.PromotionActivationView = Backbone.View.extend({ events: { "change [name=activation_type]": "render" }, initialize: function(){ this.render(); }, render: function(){ var activation_type = this.$("[name=activation_type]:checked").val(); this.$('[data-activation-type]').each(function(){ var selected = ($(this).data('activation-type') === activation_type); $(this).find(':input').prop("disabled", !selected); $(this).toggle(selected); }); } }); Spree.ready(function(){ if($("#js_promotion_activation").length) { new Spree.PromotionActivationView({ el: $("#js_promotion_activation") }); } });
Version data entries
139 entries across 139 versions & 3 rubygems