{:uriI"úfile:///Users/tvd/.gem/ruby/3.2.2/bundler/gems/solidus-142098fbd7e6/backend/app/assets/javascripts/spree/backend/views/calculators/tiered.js?type=application/javascript&pipeline=self&id=3a406ec01127520f9324e5de8b0fa3d256401bfc18ce43a841bc35c69aacf7da:ET:load_pathI"`/Users/tvd/.gem/ruby/3.2.2/bundler/gems/solidus-142098fbd7e6/backend/app/assets/javascripts;T: filenameI"…/Users/tvd/.gem/ruby/3.2.2/bundler/gems/solidus-142098fbd7e6/backend/app/assets/javascripts/spree/backend/views/calculators/tiered.js;T: nameI"+spree/backend/views/calculators/tiered;T:logical_pathI"3spree/backend/views/calculators/tiered.self.js;T:content_typeI"application/javascript;T: sourceI"ØSpree.Views.Calculators.Tiered = Backbone.View.extend({ initialize: function() { this.calculatorName = this.$('.js-tiers').data('calculator'); this.tierFieldsTemplate = HandlebarsTemplates["promotions/calculators/fields/" + this.calculatorName]; this.originalTiers = this.$('.js-tiers').data('original-tiers'); this.formPrefix = this.$('.js-tiers').data('form-prefix'); for (var base in this.originalTiers) { var value = this.originalTiers[base]; this.$('.js-tiers').append( this.tierFieldsTemplate({ baseField: { value: base }, valueField: { name: this.tierInputName(base), value: value } }) ); } }, events: { 'click .js-add-tier': 'onAdd', 'click .js-remove-tier': 'onRemove', 'change .js-base-input': 'onChange' }, tierInputName: function(base) { return this.formPrefix + "[calculator_attributes][preferred_tiers][" + base + "]"; }, onAdd: function(event) { event.preventDefault(); this.$('.js-tiers').append( this.tierFieldsTemplate({ valueField: { name: null } }) ); }, onRemove: function(event) { event.preventDefault(); $(event.target).parents('.tier').remove(); }, onChange: function(event) { var valueInput = $(event.target).parents('.tier').find('.js-value-input'); valueInput.attr('name', this.tierInputName($(event.target).val())); } }); ;T: metadata{:dependencieso:Set: @hash} I"environment-version;TTI"environment-paths;TTI"rails-env;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"“file-digest:///Users/tvd/.gem/ruby/3.2.2/bundler/gems/solidus-142098fbd7e6/backend/app/assets/javascripts/spree/backend/views/calculators/tiered.js;TTF: requiredo;;}F: stubbedo;;}F: linkso;;}F: to_loado;;}F: to_linko;;}F:map{ I" version;TiI" file;TI".spree/backend/views/calculators/tiered.js;TI" mappings;TI" AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;TI" sources;T[I"tiered.source.js;TI" names;T[I"x_sprockets_linecount;Ti;: charsetI" utf-8;F: digest"%SXf/QsÉÞ>ïò”™aà`;À] ±'ì‘ݽ6>: lengthiØ:environment_versionI"1.0;T:dependencies_digest"%p¤¦<¡õW~®J?i’ŸLÜPÊ¿±Àjç–[&W5 ¥:idI"E3a406ec01127520f9324e5de8b0fa3d256401bfc18ce43a841bc35c69aacf7da;F