arma-server-web-admin/public/js/app/views/missions/list.js

28 lines
796 B
JavaScript
Raw Normal View History

2014-04-04 09:28:33 +00:00
define(function (require) {
2014-04-04 09:28:33 +00:00
"use strict";
2014-04-04 09:28:33 +00:00
var $ = require('jquery'),
_ = require('underscore'),
Backbone = require('backbone'),
Marionette = require('marionette'),
2014-04-04 12:52:01 +00:00
ListItemView = require('app/views/missions/list_item'),
tpl = require('text!tpl/missions/list.html'),
2014-04-04 12:52:01 +00:00
template = _.template(tpl);
2014-04-04 12:52:01 +00:00
return Marionette.CompositeView.extend({
childView: ListItemView,
childViewContainer: "tbody",
2014-04-04 12:52:01 +00:00
template: template,
2019-06-23 18:32:04 +00:00
initialize: function (options) {
this.filterValue = options.filterValue;
},
filter: function (child, index, collection) {
return child.get('name').toLowerCase().indexOf(this.filterValue.toLowerCase()) >= 0;
},
2014-04-04 09:28:33 +00:00
});
});