1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
import _ from 'underscore'; import Marionette from 'backbone.marionette'; import './templates'; export default Marionette.ItemView.extend({ template: Templates['update-center-footer'], collectionEvents: { 'all': 'render' }, serializeData: function () { return _.extend(this._super(), { total: this.collection.where({ _hidden: false }).length }); } });