0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36:14 -05:00

Fixes undefined this in settings.js

Because this and self. Missed it from previous commit :/
This commit is contained in:
Gabor Javorszky 2013-07-19 12:38:44 +01:00 committed by ErisDS
parent 5a1c02b5d7
commit f10343079b

View file

@ -81,12 +81,13 @@
}, },
saveSettings: function () { saveSettings: function () {
var self = this;
this.model.save({ this.model.save({
title: this.$('#blog-title').val(), title: this.$('#blog-title').val(),
email: this.$('#email-address').val() email: this.$('#email-address').val()
}, { }, {
success: function () { success: function () {
this.addSubview(new Ghost.Views.NotificationCollection({ self.addSubview(new Ghost.Views.NotificationCollection({
model: [{ model: [{
type: 'success', type: 'success',
message: 'Saved', message: 'Saved',
@ -95,7 +96,7 @@
})); }));
}, },
error: function () { error: function () {
this.addSubview(new Ghost.Views.NotificationCollection({ self.addSubview(new Ghost.Views.NotificationCollection({
model: [{ model: [{
type: 'error', type: 'error',
message: 'Something went wrong, not saved :(', message: 'Something went wrong, not saved :(',