arma-server-web-admin/public/js/app/views/missions/list.js
2014-04-05 14:50:40 +00:00

31 lines
881 B
JavaScript

define(function (require) {
"use strict";
var $ = require('jquery'),
_ = require('underscore'),
Backbone = require('backbone'),
Marionette = require('marionette'),
ListItemView = require('app/views/missions/list_item'),
FormView = require('app/views/missions/form'),
tpl = require('text!tpl/missions/list.html'),
template = _.template(tpl);
return Marionette.CompositeView.extend({
itemView: ListItemView,
itemViewContainer: "tbody",
template: template,
events: {
"click #upload": "upload"
},
upload: function (event) {
event.preventDefault();
var view = new FormView({missions: this.collection});
new Backbone.BootstrapModal({ content: view }).open()
},
});
});