mirror of
https://github.com/Dahlgren/arma-server-web-admin.git
synced 2024-08-30 17:22:10 +00:00
22 lines
565 B
JavaScript
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
|
|
}
|
|
})
|