0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Bug Fix: title of deleted post in content view notification is now correct

This commit is contained in:
ErisDS 2013-07-22 11:27:01 +01:00
parent 94ae164086
commit 2e0d2c73d6

View file

@ -148,7 +148,8 @@
deletePost: function (e) {
e.preventDefault();
if (window.confirm('Are you sure you want to delete this post?')) {
var self = this;
var self = this,
title = self.model.get('title');
self.model.destroy({
wait: true
@ -156,7 +157,7 @@
self.addSubview(new Ghost.Views.NotificationCollection({
model: [{
type: 'success',
message: 'Your post: ' + self.model.get('title') + ' has been deleted',
message: 'Your post: ' + title + ' has been deleted',
status: 'passive'
}]
}));
@ -164,7 +165,7 @@
self.addSubview(new Ghost.Views.NotificationCollection({
model: [{
type: 'error',
message: 'Your post: ' + self.model.get('title') + ' has not been deleted.',
message: 'Your post: ' + title + ' has not been deleted.',
status: 'passive'
}]
}));