2014-04-04 09:28:33 +00:00
|
|
|
define(function (require) {
|
2014-05-07 00:11:12 +00:00
|
|
|
|
2014-04-04 09:28:33 +00:00
|
|
|
"use strict";
|
2014-05-07 00:11:12 +00:00
|
|
|
|
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-05-07 00:11:12 +00:00
|
|
|
|
2014-04-04 12:52:01 +00:00
|
|
|
template = _.template(tpl);
|
2014-05-07 00:11:12 +00:00
|
|
|
|
2014-04-04 12:52:01 +00:00
|
|
|
return Marionette.CompositeView.extend({
|
2014-04-04 09:28:33 +00:00
|
|
|
itemView: ListItemView,
|
2014-04-04 12:52:01 +00:00
|
|
|
itemViewContainer: "tbody",
|
|
|
|
template: template,
|
2015-04-17 17:56:47 +00:00
|
|
|
|
|
|
|
initialize: function (options) {
|
|
|
|
this.listenTo(this.collection, "change reset", this.render);
|
|
|
|
},
|
2014-04-04 09:28:33 +00:00
|
|
|
});
|
|
|
|
});
|