arma-server-web-admin/public/js/app/views/home.js
2014-02-09 03:19:48 +00:00

29 lines
767 B
JavaScript

define(function (require) {
"use strict";
var $ = require('jquery'),
_ = require('underscore'),
Backbone = require('backbone'),
Marionette = require('marionette'),
AddServerView = require('app/views/servers/add'),
tpl = require('text!tpl/home.html');
return Marionette.ItemView.extend({
template: _.template(tpl),
events: {
"click #add-server": "addServer"
},
initialize: function (options) {
this.servers = options.servers;
},
addServer: function () {
var view = new AddServerView();
new Backbone.BootstrapModal({ content: view, servers: this.servers }).open()
},
});
});