Sha256: 9d0cce45daa3347bf5487491cdd96498b6b539905e7b577189c5b398ef8b46fd
Contents?: true
Size: 635 Bytes
Versions: 16
Compression:
Stored size: 635 Bytes
Contents
Spree.CalculatorEditView = Backbone.View.extend({ events: { "change .js-calculator-type": "render", }, initialize: function() { this.render(); }, render: function() { var selected_class = this.$('.js-calculator-type option:selected').val(); this.$('.js-calculator-preferences').each(function() { var selected = ($(this).data('calculator-type') === selected_class); $(this).find(':input').prop("disabled", !selected); $(this).toggle(selected); }); } }) $(function() { $('.js-calculator-fields').each(function() { new Spree.CalculatorEditView({ el: this }); }); });
Version data entries
16 entries across 16 versions & 1 rubygems