arma-server-web-admin/public/js/app/views/servers/info.js
2014-04-06 21:09:52 +00:00

33 lines
742 B
JavaScript

define(function (require) {
"use strict";
var $ = require('jquery'),
_ = require('underscore'),
Backbone = require('backbone'),
Marionette = require('marionette'),
tpl = require('text!tpl/servers/info.html');
return Marionette.ItemView.extend({
template: _.template(tpl),
events: {
"click #start": "start"
},
start: function (event) {
var self = this;
event.preventDefault();
$.ajax({
url: "/api/servers/" + this.model.get('id') + "/start",
type: 'GET',
success: function (resp) {
console.log(resp);
},
error: $.noop
});
},
});
});