diaspora/public/javascripts/app/views/stream_object_view.js
danielgrippi ae6fa5bebb don't use Diaspora widget system or stream.js when backbone is active;
migrating like actions over to backbone; some cleanup; bump jquery to
1.7.1
2012-01-07 14:23:22 -08:00

18 lines
391 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('destroy', this.remove, this);
},
destroyModel: function(evt){
if(evt){ evt.preventDefault(); }
this.model.destroy();
},
remove: function() {
$(this.el).remove();
}
});