parent
3ce4bba383
commit
8a98cd4517
2 changed files with 10 additions and 8 deletions
|
|
@ -9,6 +9,7 @@
|
|||
* Don't hide posts when blocking someone from the profile [#7379](https://github.com/diaspora/diaspora/pull/7379)
|
||||
* Disable autocomplete for the conversation form recipient input [#7375](https://github.com/diaspora/diaspora/pull/7375)
|
||||
* Fix sharing indicator on profile page for blocked users [#7382](https://github.com/diaspora/diaspora/pull/7382)
|
||||
* Remove post only after a successful deletion on the server [#7385](https://github.com/diaspora/diaspora/pull/7385)
|
||||
|
||||
## Features
|
||||
* Add links to liked and commented pages [#5502](https://github.com/diaspora/diaspora/pull/5502)
|
||||
|
|
|
|||
|
|
@ -132,18 +132,19 @@ app.views.Base = Backbone.View.extend({
|
|||
|
||||
destroyModel: function(evt) {
|
||||
evt && evt.preventDefault();
|
||||
var self = this;
|
||||
var url = this.model.urlRoot + "/" + this.model.id;
|
||||
|
||||
if( confirm(_.result(this, "destroyConfirmMsg")) ) {
|
||||
this.$el.addClass("deleting");
|
||||
this.model.destroy({ url: url })
|
||||
.done(function() {
|
||||
self.remove();
|
||||
})
|
||||
.fail(function() {
|
||||
self.$el.removeClass("deleting");
|
||||
this.model.destroy({
|
||||
url: url,
|
||||
success: function() {
|
||||
this.remove();
|
||||
}.bind(this),
|
||||
error: function() {
|
||||
this.$el.removeClass("deleting");
|
||||
app.flashMessages.error(Diaspora.I18n.t("failed_to_remove"));
|
||||
}.bind(this)
|
||||
});
|
||||
}
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue