From ef2570e082dc21402caafe5c317d5ce1b814b897 Mon Sep 17 00:00:00 2001 From: Gabor Javorszky Date: Fri, 19 Jul 2013 12:38:44 +0100 Subject: [PATCH] Fixes undefined this in settings.js Because this and self. Missed it from previous commit :/ --- ghost/admin/views/settings.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ghost/admin/views/settings.js b/ghost/admin/views/settings.js index 5a32259e10..1e5d5ec1a1 100644 --- a/ghost/admin/views/settings.js +++ b/ghost/admin/views/settings.js @@ -81,12 +81,13 @@ }, saveSettings: function () { + var self = this; this.model.save({ title: this.$('#blog-title').val(), email: this.$('#email-address').val() }, { success: function () { - this.addSubview(new Ghost.Views.NotificationCollection({ + self.addSubview(new Ghost.Views.NotificationCollection({ model: [{ type: 'success', message: 'Saved', @@ -95,7 +96,7 @@ })); }, error: function () { - this.addSubview(new Ghost.Views.NotificationCollection({ + self.addSubview(new Ghost.Views.NotificationCollection({ model: [{ type: 'error', message: 'Something went wrong, not saved :(',