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

31 lines
978 B
JavaScript
Raw Normal View History

2014-07-26 09:01:53 +00:00
define(function (require) {
"use strict";
var $ = require('jquery'),
_ = require('underscore'),
Backbone = require('backbone'),
Marionette = require('marionette'),
2015-08-15 15:12:50 +00:00
UploadView = require('app/views/missions/upload'),
WorkshopView = require('app/views/missions/workshop'),
2014-07-26 09:01:53 +00:00
ListView = require('app/views/missions/list'),
tpl = require('text!tpl/missions/index.html');
return Marionette.LayoutView.extend({
2014-07-26 09:01:53 +00:00
template: _.template(tpl),
regions: {
2015-08-15 15:12:50 +00:00
uploadView: "#upload",
workshopView: "#workshop",
2014-07-26 09:01:53 +00:00
listView: "#list",
},
onRender: function() {
2015-08-15 15:12:50 +00:00
this.uploadView.show(new UploadView({missions: this.options.missions}));
this.workshopView.show(new WorkshopView({missions: this.options.missions}));
2014-07-26 09:01:53 +00:00
this.listView.show(new ListView({collection: this.options.missions}));
},
});
});