{:uriI"file:///Users/tvd/.gem/ruby/3.2.2/bundler/gems/solidus-142098fbd7e6/backend/app/assets/javascripts/spree/backend/views/tables/selectable_table/summary.js?type=application/javascript&pipeline=self&id=8fe3eea182d60159efff533966fc376303b93b3e74e5ec17bbd4d9afa121bfe5: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/tables/selectable_table/summary.js;T: nameI"8spree/backend/views/tables/selectable_table/summary;T:logical_pathI"@spree/backend/views/tables/selectable_table/summary.self.js;T:content_typeI"application/javascript;T: sourceI"2Spree.Views.Tables.SelectableTable.Summary = Backbone.View.extend({ events: { 'click input[name="select-all"]': 'onSelectedAll' }, onSelectedAll: function(event) { this.model.set('allSelected', event.currentTarget.checked); if(event.currentTarget.checked == false) { this.model.set('selectedItems', []); } }, initialize: function(options) { this.listenTo(this.model, 'change', this.render) this.colspan = options.columns - 1; this.render(); }, render: function() { var selectedItemLength = this.model.get('selectedItems').length; var all_items_selected = this.model.get('allSelected'); var html = HandlebarsTemplates['tables/selectable_label']({ colspan: this.colspan, item_selected_label: this.selectedItemLabel(all_items_selected, selectedItemLength), all_items_selected: all_items_selected }); this.$el.html(html); }, selectedItemLabel: function(all_selected, selected_item_length) { if(all_selected) { return Spree.t('items_selected.all'); } else if(selected_item_length == 0) { return Spree.t('items_selected.none'); } else if(selected_item_length == 1) { return Spree.t('items_selected.one'); } else { return selected_item_length + " " + Spree.t('items_selected.custom'); } } }); ;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/tables/selectable_table/summary.js;TTF: requiredo;;}F: stubbedo;;}F: linkso;;}F: to_loado;;}F: to_linko;;}F:map{ I" version;TiI" file;TI";spree/backend/views/tables/selectable_table/summary.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;TI" sources;T[I"summary.source.js;TI" names;T[I"x_sprockets_linecount;Ti2: charsetI" utf-8;F: digest"%9 ¤W:äD-¬5‹½|—Ã{Ú…v à5š˜Ø)•™ ém: lengthi2:environment_versionI"1.0;T:dependencies_digest"%ñÁïøVSïûº[8ç·W/QÅxœÄn7¯@ÔÑÈ:idI"E8fe3eea182d60159efff533966fc376303b93b3e74e5ec17bbd4d9afa121bfe5;F