diaspora/public/javascripts/app/views/stream_object_view.js
2012-01-07 14:23:23 -08:00

17 lines
389 B
JavaScript

App.Views.StreamObject = Backbone.View.extend({
initialize: function(options) {
this.model = options.model;
this.template = _.template($(this.template_name).html());
this.model.bind('remove', this.remove, this);
},
destroyModel: function(evt){
if(evt){ evt.preventDefault(); }
this.model.destroy();
},
remove: function() {
$(this.el).remove();
}
});