killing stream_object_view

This commit is contained in:
Dennis Collinson 2012-05-22 13:43:21 -07:00
parent 36ef010ed9
commit 9f1d0b64b4
6 changed files with 12 additions and 22 deletions

View file

@ -84,6 +84,14 @@ app.views.Base = Backbone.View.extend({
} }
return memo return memo
} }
},
destroyModel: function(evt) {
evt && evt.preventDefault();
if (confirm(Diaspora.I18n.t("confirm_dialog"))) {
this.model.destroy();
this.remove();
}
} }
}); });

View file

@ -1,5 +1,4 @@
//= require ./stream_object_view app.views.Content = app.views.Base.extend({
app.views.Content = app.views.StreamObject.extend({
events: { events: {
"click .expander": "expandPost" "click .expander": "expandPost"
}, },

View file

@ -1,5 +1,4 @@
//= require ./stream_object_view app.views.LikesInfo = app.views.Base.extend({
app.views.LikesInfo = app.views.StreamObject.extend({
templateName : "likes-info", templateName : "likes-info",

View file

@ -1,5 +1,4 @@
//= require ./stream_object_view app.views.Photo = app.views.Base.extend({
app.views.Photo = app.views.StreamObject.extend({
templateName: "photo", templateName: "photo",

View file

@ -1,6 +1,4 @@
//= require ./stream_object_view app.views.Post = app.views.Base.extend({
app.views.Post = app.views.StreamObject.extend({
presenter : function() { presenter : function() {
return _.extend(this.defaultPresenter(), { return _.extend(this.defaultPresenter(), {
authorIsCurrentUser : this.authorIsCurrentUser(), authorIsCurrentUser : this.authorIsCurrentUser(),

View file

@ -1,13 +0,0 @@
app.views.StreamObject = app.views.Base.extend({
destroyModel: function(evt) {
if (evt) {
evt.preventDefault();
}
if (!confirm(Diaspora.I18n.t("confirm_dialog"))) {
return
}
this.model.destroy();
this.remove();
}
});