diff --git a/ghost/admin/models/settings.js b/ghost/admin/models/settings.js index 31f1c7000a..66c63a7c71 100644 --- a/ghost/admin/models/settings.js +++ b/ghost/admin/models/settings.js @@ -2,15 +2,8 @@ (function () { "use strict"; - // Set the url manually and id to '0' to force PUT requests Ghost.Models.Settings = Backbone.Model.extend({ - url: Ghost.settings.apiRoot + '/settings', - id: "0", - defaults: { - title: 'My Blog', - description: '', - email: 'admin@tryghost.org' - } + url: Ghost.settings.apiRoot + '/settings' }); }()); \ No newline at end of file diff --git a/ghost/admin/tpl/settings/content.hbs b/ghost/admin/tpl/settings/content.hbs index ee6b163809..83617b4948 100644 --- a/ghost/admin/tpl/settings/content.hbs +++ b/ghost/admin/tpl/settings/content.hbs @@ -58,11 +58,6 @@ -
- - -
- diff --git a/ghost/admin/tpl/settings/general.hbs b/ghost/admin/tpl/settings/general.hbs index 9d95b01561..0d3060c08a 100644 --- a/ghost/admin/tpl/settings/general.hbs +++ b/ghost/admin/tpl/settings/general.hbs @@ -13,44 +13,32 @@

How your blog name appears on the site

+
+ + +

Display a short description below the blog title

+
+
{{#if logo}} - + {{else}} {{/if}}

Display a logo on your site in place of blog title

-
- - {{#if icon}} - icon - {{else}} - Upload Image - {{/if}} - -

The icon for your blog, used in your browser tab and elsewhere

-
-

Address to use for admin notifications

-
- +
- - + + +

Number of posts per page displayed

@@ -60,24 +48,10 @@ {{/each}} -
-
- - -

Number of posts per page displayed

+

Select a theme for your blog

-
- -
-
- - -
-
\ No newline at end of file diff --git a/ghost/admin/tpl/settings/sidebar.hbs b/ghost/admin/tpl/settings/sidebar.hbs index 2dd95bb005..246d0882c5 100644 --- a/ghost/admin/tpl/settings/sidebar.hbs +++ b/ghost/admin/tpl/settings/sidebar.hbs @@ -4,7 +4,6 @@ \ No newline at end of file diff --git a/ghost/admin/views/settings.js b/ghost/admin/views/settings.js index e23b9bb6fe..312320ec9e 100644 --- a/ghost/admin/views/settings.js +++ b/ghost/admin/views/settings.js @@ -160,12 +160,13 @@ var themes = this.model.get('availableThemes'); this.model.unset('availableThemes'); this.model.save({ + id: 0, //workaround to use put title: this.$('#blog-title').val(), + description: $('#blog-description').val(), + logo: this.$('#blog-logo').attr("src"), email: this.$('#email-address').val(), - logo: this.$('#logo').attr("src"), - icon: this.$('#icon').attr("src"), - activeTheme: this.$('#activeTheme').val(), - postsPerPage: this.$('#postsPerPage').val() + postsPerPage: this.$('#postsPerPage').val(), + activeTheme: this.$('#activeTheme').val() }, { success: this.saveSuccess, error: this.saveError @@ -202,12 +203,6 @@ }, templateName: 'settings/general', - beforeRender: function () { - var settings = this.model.toJSON(); - this.$('#blog-title').val(settings.title); - this.$('#email-address').val(settings.email); - }, - afterRender: function () { this.$('.js-drop-zone').upload(); Settings.Pane.prototype.afterRender.call(this); @@ -232,12 +227,8 @@ this.model.set({availableThemes: themes}); }, - templateName: 'settings/content', + templateName: 'settings/content' - beforeRender: function () { - var settings = this.model.toJSON(); - this.$('#blog-description').val(settings.description); - } }); // ### User profile @@ -347,17 +338,6 @@ templateName: 'settings/user-profile', - beforeRender: function () { - var user = this.model.toJSON(); - this.$('#user-name').val(user.full_name); - this.$('#user-email').val(user.email_address); - this.$('#user-location').val(user.location); - this.$('#user-website').val(user.url); - this.$('#user-bio').val(user.bio); - this.$('#user-profile-picture').attr('src', user.profile_picture); - this.$('#user-cover-picture').attr('src', user.cover_picture); - }, - afterRender: function () { var self = this; Countable.live(document.getElementById('user-bio'), function (counter) {