blob: eb83efedabc0cc2c74858072f7066f250094dc2a [file] [log] [blame]
Scott Baker7ee32a02014-07-13 09:52:15 -07001DeveloperApp = new Marionette.Application();
2
3DeveloperApp.addRegions({
4 mainRegion: "#developerView"
5});
6
7DeveloperApp.SliceDetailView = Marionette.ItemView.extend({
8 template: "#developer-slicedetail-template",
9 tagName: 'tr',
10 className: 'developer_slicedetail'
11});
12
Scott Bakerdb236c32014-07-13 17:36:19 -070013/*
Scott Baker7ee32a02014-07-13 09:52:15 -070014DeveloperApp.SliceListView = Marionette.CollectionView.extend({
15 tagName: "table",
Scott Bakerdb236c32014-07-13 17:36:19 -070016 className: "table table-hover",
17 template: "#developer-slicetable-template",
18 childView: DeveloperApp.SliceDetailView,
19});
20*/
21
22DeveloperApp.SliceListView = Marionette.CompositeView.extend({
23 tagName: "table",
Scott Baker7ee32a02014-07-13 09:52:15 -070024 className: "table-striped table-bordered",
25 template: "#developer-slicetable-template",
26 childView: DeveloperApp.SliceDetailView,
Scott Bakerdb236c32014-07-13 17:36:19 -070027 childViewContainer: "tbody",
Scott Baker7ee32a02014-07-13 09:52:15 -070028});
29
30DeveloperApp.on("start", function() {
31 var developerSliceListView = new DeveloperApp.SliceListView({
Scott Bakerdb236c32014-07-13 17:36:19 -070032 collection: xos.slicesPlus
Scott Baker7ee32a02014-07-13 09:52:15 -070033 });
34 console.log(developerSliceListView);
35 DeveloperApp.mainRegion.show(developerSliceListView);
Scott Bakerdb236c32014-07-13 17:36:19 -070036 xos.slicesPlus.fetch();
Scott Baker7ee32a02014-07-13 09:52:15 -070037});
38
39$(document).ready(function(){
40 DeveloperApp.start();
41});
42