mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-24 19:33:02 +03:00
Fix for settings view
no issue - removed/added availableThemes before/after saving the model
This commit is contained in:
parent
415ba7bcf5
commit
cc584f3715
@ -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',
|
||||
|
Loading…
Reference in New Issue
Block a user