mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-15 11:34:24 +03:00
0122ecd593
Closes #3037 - Created `NProgressSaveMixin`, which extends the `save` method of a model to fire NProgress. - Extended `UserModel`, `PostModel`, and `SettingModel` with the new mixin. - NProgress can be disabled by passing an options hash to the save function with the `{disableNProgress:true}` - Now that the ValidationEngine isn't the only thing playing with options inside of `model#save`, refactored it to pass the options down the super chain.
21 lines
622 B
JavaScript
21 lines
622 B
JavaScript
import ValidationEngine from 'ghost/mixins/validation-engine';
|
|
import NProgressSaveMixin from 'ghost/mixins/nprogress-save';
|
|
|
|
var Setting = DS.Model.extend(NProgressSaveMixin, ValidationEngine, {
|
|
validationType: 'setting',
|
|
|
|
title: DS.attr('string'),
|
|
description: DS.attr('string'),
|
|
email: DS.attr('string'),
|
|
logo: DS.attr('string'),
|
|
cover: DS.attr('string'),
|
|
defaultLang: DS.attr('string'),
|
|
postsPerPage: DS.attr('number'),
|
|
forceI18n: DS.attr('boolean'),
|
|
permalinks: DS.attr('string'),
|
|
activeTheme: DS.attr('string'),
|
|
availableThemes: DS.attr()
|
|
});
|
|
|
|
export default Setting;
|