2014-02-09 03:19:48 +00:00
|
|
|
define(function (require) {
|
2014-04-05 19:36:34 +00:00
|
|
|
|
2014-02-09 03:19:48 +00:00
|
|
|
"use strict";
|
2014-04-05 19:36:34 +00:00
|
|
|
|
2014-02-09 03:19:48 +00:00
|
|
|
var $ = require('jquery'),
|
|
|
|
_ = require('underscore'),
|
|
|
|
Backbone = require('backbone'),
|
|
|
|
Marionette = require('marionette'),
|
2014-04-05 19:36:34 +00:00
|
|
|
ListItemView = require('app/views/mods/list_item'),
|
|
|
|
tpl = require('text!tpl/mods/list.html'),
|
|
|
|
|
|
|
|
template = _.template(tpl);
|
|
|
|
|
|
|
|
return Marionette.CompositeView.extend({
|
2017-10-05 20:55:57 +00:00
|
|
|
childView: ListItemView,
|
|
|
|
childViewContainer: "tbody",
|
2014-04-05 19:36:34 +00:00
|
|
|
template: template,
|
2014-04-21 13:24:47 +00:00
|
|
|
|
2014-05-06 23:35:44 +00:00
|
|
|
events: {
|
2015-05-29 23:30:53 +00:00
|
|
|
"click #refresh": "refresh",
|
2014-05-06 23:35:44 +00:00
|
|
|
},
|
|
|
|
|
2015-05-29 23:30:53 +00:00
|
|
|
refresh: function (event) {
|
|
|
|
event.preventDefault();
|
|
|
|
$.ajax({
|
|
|
|
url: "/api/mods/refresh",
|
|
|
|
type: 'POST',
|
|
|
|
success: function (resp) {
|
|
|
|
|
|
|
|
},
|
|
|
|
error: function (resp) {
|
|
|
|
|
|
|
|
},
|
|
|
|
});
|
|
|
|
},
|
2014-02-09 03:19:48 +00:00
|
|
|
});
|
|
|
|
});
|