Implements setting specific body classes

closes #4116
- Adds css classes to settings views
This commit is contained in:
Fabian Becker 2014-09-23 13:04:49 +00:00
parent d87980b80a
commit 235729992d
5 changed files with 21 additions and 5 deletions

View File

@ -1,6 +1,9 @@
import loadingIndicator from 'ghost/mixins/loading-indicator'; import loadingIndicator from 'ghost/mixins/loading-indicator';
import styleBody from 'ghost/mixins/style-body';
var SettingsAboutRoute = Ember.Route.extend(SimpleAuth.AuthenticatedRouteMixin, styleBody, loadingIndicator, {
classNames: ['settings-view-about'],
var SettingsAboutRoute = Ember.Route.extend(SimpleAuth.AuthenticatedRouteMixin, loadingIndicator, {
cachedConfig: false, cachedConfig: false,
model: function () { model: function () {
var cachedConfig = this.get('cachedConfig'), var cachedConfig = this.get('cachedConfig'),

View File

@ -1,6 +1,9 @@
import CurrentUserSettings from 'ghost/mixins/current-user-settings'; import CurrentUserSettings from 'ghost/mixins/current-user-settings';
import styleBody from 'ghost/mixins/style-body';
var AppsRoute = Ember.Route.extend(SimpleAuth.AuthenticatedRouteMixin, styleBody, CurrentUserSettings, {
classNames: ['settings-view-apps'],
var AppsRoute = Ember.Route.extend(SimpleAuth.AuthenticatedRouteMixin, CurrentUserSettings, {
beforeModel: function () { beforeModel: function () {
if (!this.get('config.apps')) { if (!this.get('config.apps')) {
return this.transitionTo('settings.general'); return this.transitionTo('settings.general');

View File

@ -1,7 +1,10 @@
import loadingIndicator from 'ghost/mixins/loading-indicator'; import loadingIndicator from 'ghost/mixins/loading-indicator';
import CurrentUserSettings from 'ghost/mixins/current-user-settings'; import CurrentUserSettings from 'ghost/mixins/current-user-settings';
import styleBody from 'ghost/mixins/style-body';
var SettingsGeneralRoute = Ember.Route.extend(SimpleAuth.AuthenticatedRouteMixin, styleBody, loadingIndicator, CurrentUserSettings, {
classNames: ['settings-view-general'],
var SettingsGeneralRoute = Ember.Route.extend(SimpleAuth.AuthenticatedRouteMixin, loadingIndicator, CurrentUserSettings, {
beforeModel: function () { beforeModel: function () {
return this.currentUser() return this.currentUser()
.then(this.transitionAuthor()) .then(this.transitionAuthor())

View File

@ -1,4 +1,5 @@
import PaginationRouteMixin from 'ghost/mixins/pagination-route'; import PaginationRouteMixin from 'ghost/mixins/pagination-route';
import styleBody from 'ghost/mixins/style-body';
var paginationSettings = { var paginationSettings = {
page: 1, page: 1,
@ -6,7 +7,9 @@ var paginationSettings = {
status: 'all' status: 'all'
}; };
var UsersIndexRoute = Ember.Route.extend(SimpleAuth.AuthenticatedRouteMixin, PaginationRouteMixin, { var UsersIndexRoute = Ember.Route.extend(SimpleAuth.AuthenticatedRouteMixin, styleBody, PaginationRouteMixin, {
classNames: ['settings-view-users'],
setupController: function (controller, model) { setupController: function (controller, model) {
this._super(controller, model); this._super(controller, model);
this.setupPagination(paginationSettings); this.setupPagination(paginationSettings);

View File

@ -1,4 +1,8 @@
var SettingsUserRoute = Ember.Route.extend({ import styleBody from 'ghost/mixins/style-body';
var SettingsUserRoute = Ember.Route.extend(styleBody, {
classNames: ['settings-view-user'],
model: function (params) { model: function (params) {
var self = this; var self = this;
// TODO: Make custom user adapter that uses /api/users/:slug endpoint // TODO: Make custom user adapter that uses /api/users/:slug endpoint