Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement