diff --git a/public/js/app/views/mods/list.js b/public/js/app/views/mods/list.js index 720f415..e9f3821 100644 --- a/public/js/app/views/mods/list.js +++ b/public/js/app/views/mods/list.js @@ -1,15 +1,19 @@ define(function (require) { - + "use strict"; - + var $ = require('jquery'), _ = require('underscore'), Backbone = require('backbone'), Marionette = require('marionette'), - ListItemView = require('app/views/mods/list_item'); - - return Marionette.CollectionView.extend({ - tagName: 'ul', + 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, }); }); diff --git a/public/js/app/views/mods/list_item.js b/public/js/app/views/mods/list_item.js index 5616813..9d55553 100644 --- a/public/js/app/views/mods/list_item.js +++ b/public/js/app/views/mods/list_item.js @@ -1,17 +1,17 @@ define(function (require) { - + "use strict"; - + var $ = require('jquery'), _ = require('underscore'), Backbone = require('backbone'), Marionette = require('marionette'), tpl = require('text!tpl/mods/list_item.html'), - + template = _.template(tpl); - + return Marionette.ItemView.extend({ - tagName: "li", + tagName: "tr", template: template }); }); diff --git a/public/js/tpl/mods/list.html b/public/js/tpl/mods/list.html new file mode 100644 index 0000000..6f2affe --- /dev/null +++ b/public/js/tpl/mods/list.html @@ -0,0 +1,10 @@ + + + + + + + + + +
Mod
diff --git a/public/js/tpl/mods/list_item.html b/public/js/tpl/mods/list_item.html index 68405e0..145a90c 100644 --- a/public/js/tpl/mods/list_item.html +++ b/public/js/tpl/mods/list_item.html @@ -1 +1,3 @@ -<%-name%> + + <%-name%> +