{:uriI"file:///usr/local/bundle/bundler/gems/solidus-28213ce2047d/backend/app/assets/javascripts/spree/backend/views/calculators/tiered.js?type=application/javascript&pipeline=self&id=5e9cfe6acb757b0435999ded37fc50d46a3b8f23e03e0fec1178a7d28e02f729:ET:load_pathI"W/usr/local/bundle/bundler/gems/solidus-28213ce2047d/backend/app/assets/javascripts;T: filenameI"|/usr/local/bundle/bundler/gems/solidus-28213ce2047d/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:///usr/local/bundle/bundler/gems/solidus-28213ce2047d/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"%z`|^}) cCW:w KO:idI"E5e9cfe6acb757b0435999ded37fc50d46a3b8f23e03e0fec1178a7d28e02f729;F