From 24d7bc26d2df32b2c91e28de06fb693f311b3ff8 Mon Sep 17 00:00:00 2001 From: davidsulc Date: Fri, 13 Apr 2012 13:54:04 -0400 Subject: [PATCH] add AngryCatsView --- assets/javascripts/application.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/assets/javascripts/application.js b/assets/javascripts/application.js index a9a46a6..a1d564f 100644 --- a/assets/javascripts/application.js +++ b/assets/javascripts/application.js @@ -15,3 +15,15 @@ AngryCatView = Backbone.Marionette.ItemView.extend({ tagName: 'tr', className: 'angry_cat' }); + +AngryCatsView = Backbone.Marionette.CompositeView.extend({ + tagName: "table", + id: "angry_cats", + className: "table-striped table-bordered", + template: "#angry_cats-template", + itemView: AngryCatView, + + appendHtml: function(collectionView, itemView){ + collectionView.$("tbody").append(itemView.el); + } +});