mirror of
https://github.com/Dahlgren/arma-server-web-admin.git
synced 2024-08-30 17:22:10 +00:00
29 lines
790 B
JavaScript
29 lines
790 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({servers: this.servers});
|
|
new Backbone.BootstrapModal({ content: view, servers: this.servers }).open()
|
|
},
|
|
});
|
|
|
|
}); |