Created
December 22, 2014 15:39
-
-
Save thenickcox/a14267ba8654cdef5395 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
App.AlbumItemView = Backbone.View.extend | |
tagName: 'li' | |
template: _.template "<a href='/users/<%= user_id %>/albums/<%= id %>'><%= title %></a><button class='unfeature'>Unfeature ×</button>" | |
render: -> | |
@$el.html @template @model.attributes | |
this | |
events: | |
'click .unfeature': 'unfeature' | |
unfeature: -> | |
@model.save(featured: false) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment