arma-server-web-admin/public/js/app/views/missions/list.js
2019-10-18 11:06:47 +02:00

22 lines
565 B
JavaScript

var _ = require('underscore')
var Marionette = require('marionette')
var ListItemView = require('app/views/missions/list_item')
var tpl = require('tpl/missions/list.html')
var template = _.template(tpl)
module.exports = Marionette.CompositeView.extend({
childView: ListItemView,
childViewContainer: 'tbody',
template: template,
initialize: function (options) {
this.filterValue = options.filterValue
},
filter: function (child, index, collection) {
return child.get('name').toLowerCase().indexOf(this.filterValue.toLowerCase()) >= 0
}
})