arma-server-web-admin/public/js/app/views/missions/index.js
2014-07-26 11:01:53 +02:00

28 lines
780 B
JavaScript

define(function (require) {
"use strict";
var $ = require('jquery'),
_ = require('underscore'),
Backbone = require('backbone'),
Marionette = require('marionette'),
FormView = require('app/views/missions/form'),
ListView = require('app/views/missions/list'),
tpl = require('text!tpl/missions/index.html');
return Marionette.Layout.extend({
template: _.template(tpl),
regions: {
formView: "#form",
listView: "#list",
},
onRender: function() {
this.formView.show(new FormView({missions: this.options.missions}));
this.listView.show(new ListView({collection: this.options.missions}));
},
});
});