From cc584f37154d5eabbbf4479aa1fc4650e2596f84 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Wed, 4 Sep 2013 01:14:55 +0200 Subject: [PATCH] Fix for settings view no issue - removed/added availableThemes before/after saving the model --- ghost/admin/views/settings.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ghost/admin/views/settings.js b/ghost/admin/views/settings.js index ecc6121a3e..cb49de7d95 100644 --- a/ghost/admin/views/settings.js +++ b/ghost/admin/views/settings.js @@ -155,6 +155,7 @@ }, saveSettings: function () { + var themes = this.model.get('availableThemes'); this.model.unset('availableThemes'); this.model.save({ title: this.$('#blog-title').val(), @@ -166,6 +167,7 @@ success: this.saveSuccess, error: this.saveError }); + this.model.set({availableThemes: themes}); }, templateName: 'settings/general', @@ -189,12 +191,15 @@ 'click .button-save': 'saveSettings' }, saveSettings: function () { + var themes = this.model.get('availableThemes'); + this.model.unset('availableThemes'); this.model.save({ description: this.$('#blog-description').val() }, { success: this.saveSuccess, error: this.saveError }); + this.model.set({availableThemes: themes}); }, templateName: 'settings/content',