Created
January 16, 2013 10:42
-
-
Save anonymous/4546270 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = class ReportController extends Controller | |
historyURL: 'reports' | |
index: -> | |
collection = new Reports() | |
collection.fetch() | |
@view = new ReportListView | |
collection: collection | |
class ReportListItemView extends View | |
tagName: 'tr' | |
template: require 'views/templates/report_list_item' | |
events: | |
'click .remove': 'remove' | |
remove: (event) => | |
@model.destroy() | |
module.exports.ReportListView = class ReportListView extends CollectionView | |
container: '#page-container' | |
autoRender: yes | |
template: require 'views/templates/report_list' | |
className: 'report-list' | |
listSelector: '#list' | |
itemView: ReportListItemView |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment