2015-02-13 07:22:32 +03:00
|
|
|
{
|
|
|
|
"predef": [
|
2015-10-13 16:52:41 +03:00
|
|
|
"server",
|
2015-10-05 09:07:44 +03:00
|
|
|
"authenticateSession",
|
|
|
|
"invalidateSession",
|
|
|
|
"currentSession",
|
2015-02-13 07:22:32 +03:00
|
|
|
"document",
|
|
|
|
"window",
|
|
|
|
"location",
|
|
|
|
"setTimeout",
|
|
|
|
"-Promise",
|
|
|
|
"define",
|
|
|
|
"console",
|
|
|
|
"visit",
|
|
|
|
"exists",
|
|
|
|
"fillIn",
|
|
|
|
"click",
|
|
|
|
"keyEvent",
|
|
|
|
"triggerEvent",
|
|
|
|
"find",
|
|
|
|
"findWithAssert",
|
|
|
|
"wait",
|
|
|
|
"DS",
|
|
|
|
"andThen",
|
|
|
|
"currentURL",
|
|
|
|
"currentPath",
|
2015-02-18 23:29:30 +03:00
|
|
|
"currentRouteName",
|
2016-05-24 15:07:31 +03:00
|
|
|
"expect",
|
Timezones: Always use the timezone of blog setting
closes TryGhost/Ghost#6406
follow-up PR of #2
- adds a `timeZone` Service to provide the offset (=timezone reg. moment-timezone) of the users blog settings
- `gh-datetime-input` will read the offset of the timezone now and adjust the `publishedAt` date with it. This is the date which will be shown in the PSM 'Publish Date' field. When the user writes a new date/time, the offset is considered and will be deducted again before saving it to the model. This way, we always work with a UTC publish date except for this input field.
- gets `availableTimezones` from `configuration/timezones` API endpoint
- adds a `moment-utc` transform on all date attr (`createdAt`, `updatedAt`, `publishedAt`, `unsubscribedAt` and `lastLogin`) to only work with UTC times on serverside
- when switching the timezone in the select box, the user will be shown the local time of the selected timezone
- `createdAt`-property in `gh-user-invited` returns now `moment(createdAt).fromNow()` as `createdAt` is a moment date already
- added clock service to show actual time ticking below select box
- default timezone is '(GMT) Greenwich Mean Time : Dublin, Edinburgh, London'
- if no timezone is saved in the settings yet, the default value will be used
- shows the local time in 'Publish Date' in PSM by default, until user overwrites it
- adds dependency `moment-timezone 0.5.4` to `bower.json`
---------
**Tests:**
- sets except for clock service in test env
- adds fixtures to mirage
- adds `service.ajax` and `service:ghostPaths` to navigation-test.js
- adds unit test for `gh-format-timeago` helper
- updates acceptance test `general-setting`
- adds acceptance test for `editor`
- adds integration tests for `services/config` and `services/time-zone`
---------
**Todos:**
- [ ] Integration tests: ~~`services/config`~~, ~~`services/time-zone`~~, `components/gh-datetime-input`
- [x] Acceptance test: `editor`
- [ ] Unit tests: `utils/date-formatting`
- [ ] write issue for renaming date properties (e. g. `createdAt` to `createdAtUTC`) and translate those for server side with serializers
2016-02-02 10:04:40 +03:00
|
|
|
"fileUpload",
|
|
|
|
"moment"
|
2015-02-13 07:22:32 +03:00
|
|
|
],
|
2015-02-18 23:29:30 +03:00
|
|
|
"mocha": true,
|
2015-02-13 07:22:32 +03:00
|
|
|
"node": false,
|
|
|
|
"browser": false,
|
|
|
|
"boss": true,
|
|
|
|
"curly": false,
|
|
|
|
"debug": false,
|
|
|
|
"devel": false,
|
|
|
|
"eqeqeq": true,
|
|
|
|
"evil": true,
|
2015-02-18 23:29:30 +03:00
|
|
|
"expr": true,
|
2015-02-13 07:22:32 +03:00
|
|
|
"forin": false,
|
|
|
|
"immed": false,
|
|
|
|
"laxbreak": false,
|
|
|
|
"newcap": true,
|
|
|
|
"noarg": true,
|
|
|
|
"noempty": false,
|
|
|
|
"nonew": false,
|
|
|
|
"nomen": false,
|
|
|
|
"onevar": false,
|
|
|
|
"plusplus": false,
|
|
|
|
"regexp": false,
|
|
|
|
"undef": true,
|
|
|
|
"sub": true,
|
|
|
|
"strict": false,
|
|
|
|
"white": false,
|
|
|
|
"eqnull": true,
|
2016-07-31 22:47:19 +03:00
|
|
|
"esversion": 6
|
2015-02-13 07:22:32 +03:00
|
|
|
}
|