arma-server-web-admin/public/js/app/views/mods/list.js

28 lines
713 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({
itemView: ListItemView,
itemViewContainer: "tbody",
template: template,
initialize: function (options) {
this.on("itemview:mods:update", this.update, this);
},
update: function() {
this.collection.fetch();
},
});
});