Skip to content

Commit

Permalink
🎨 settings inconsistency
Browse files Browse the repository at this point in the history
no issue

- discussed here TryGhost#661 (comment)
  • Loading branch information
kirrg001 committed Apr 24, 2017
1 parent 7169a14 commit eac3f39
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 12 deletions.
4 changes: 2 additions & 2 deletions app/models/setting.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ export default Model.extend(ValidationEngine, {
forceI18n: attr('boolean'),
permalinks: attr('string'),
activeTimezone: attr('string', {defaultValue: 'Etc/UTC'}),
ghost_head: attr('string'),
ghost_foot: attr('string'),
ghostHead: attr('string'),
ghostFoot: attr('string'),
facebook: attr('facebook-url-user'),
twitter: attr('twitter-url-user'),
labs: attr('string'),
Expand Down
4 changes: 0 additions & 4 deletions app/serializers/setting.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ export default ApplicationSerializer.extend({
return this._super(store, primaryModelClass, payload, id, requestType);
},

keyForAttribute(attr) {
return attr;
},

_extractObjectFromArrayPayload(_payload) {
let payload = {id: '0'};

Expand Down
4 changes: 2 additions & 2 deletions app/templates/settings/code-injection.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
<div class="form-group settings-code">
<label for="ghost-head">Blog Header</label>
<p>Code here will be injected into the <code>\{{ghost_head}}</code> tag on every page of your blog</p>
{{gh-cm-editor model.ghost_head id="ghost-head" class="gh-input settings-code-editor" name="codeInjection[ghost_head]" type="text" update=(action (mut model.ghost_head))}}
{{gh-cm-editor model.ghostHead id="ghost-head" class="gh-input settings-code-editor" name="codeInjection[ghost_head]" type="text" update=(action (mut model.ghostHead))}}
</div>

<div class="form-group settings-code">
<label for="ghost-foot">Blog Footer</label>
<p>Code here will be injected into the <code>\{{ghost_foot}}</code> tag on every page of your blog</p>
{{gh-cm-editor model.ghost_foot id="ghost-foot" class="gh-input settings-code-editor" name="codeInjection[ghost_foot]" type="text" update=(action (mut model.ghost_foot))}}
{{gh-cm-editor model.ghostFoot id="ghost-foot" class="gh-input settings-code-editor" name="codeInjection[ghost_foot]" type="text" update=(action (mut model.ghostFoot))}}
</div>
</fieldset>
</form>
Expand Down
8 changes: 4 additions & 4 deletions mirage/fixtures/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export default [
},
{
id: 5,
key: 'defaultLang',
key: 'default_lang',
value: 'en_US',
type: 'blog',
created_at: '2013-11-25T14:48:11.000Z',
Expand All @@ -52,7 +52,7 @@ export default [
},
{
id: 7,
key: 'forceI18n',
key: 'force_i18n',
value: 'true',
type: 'blog',
created_at: '2013-11-25T14:48:11.000Z',
Expand Down Expand Up @@ -117,7 +117,7 @@ export default [
id: 14,
created_at: '2015-09-11T09:44:30.810Z',
created_by: 1,
key: 'isPrivate',
key: 'is_private',
type: 'blog',
updated_at: '2015-09-23T13:32:49.868Z',
updated_by: 1,
Expand Down Expand Up @@ -167,7 +167,7 @@ export default [
id: 19,
created_at: '2015-09-11T09:44:30.810Z',
created_by: 1,
key: 'activeTimezone',
key: 'active_timezone',
type: 'blog',
updated_at: '2015-09-23T13:32:49.868Z',
updated_by: 1,
Expand Down

0 comments on commit eac3f39

Please sign in to comment.