mirror of
https://github.com/Dahlgren/arma-server-web-admin.git
synced 2024-08-30 17:22:10 +00:00
c58ec6f308
Backbone to 1.3.3 Marionette to 2.4.7 Underscore to 1.8.3 Fixes collection sorting when new items are added
38 lines
848 B
JavaScript
38 lines
848 B
JavaScript
define(function (require) {
|
|
|
|
"use strict";
|
|
|
|
var $ = require('jquery'),
|
|
_ = require('underscore'),
|
|
Backbone = require('backbone'),
|
|
Marionette = require('marionette'),
|
|
ListItemView = require('app/views/mods/list_item'),
|
|
tpl = require('text!tpl/mods/list.html'),
|
|
|
|
template = _.template(tpl);
|
|
|
|
return Marionette.CompositeView.extend({
|
|
childView: ListItemView,
|
|
childViewContainer: "tbody",
|
|
template: template,
|
|
|
|
events: {
|
|
"click #refresh": "refresh",
|
|
},
|
|
|
|
refresh: function (event) {
|
|
event.preventDefault();
|
|
$.ajax({
|
|
url: "/api/mods/refresh",
|
|
type: 'POST',
|
|
success: function (resp) {
|
|
|
|
},
|
|
error: function (resp) {
|
|
|
|
},
|
|
});
|
|
},
|
|
});
|
|
});
|