Commit Graph

2587 Commits

Author SHA1 Message Date
Aileen Nowak
24e71ffdaa 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-06-03 16:23:39 +02:00
Hannah Wolfe
b9864114ea Merge pull request #39 from kevinansfield/version-header-fixes
Minor version header fixes
2016-06-03 15:16:33 +01:00
Kevin Ansfield
5e9cec8384 Minor version header fixes
refs #38
- use same version regex as `safeVersion` does on the server
- remove errant `console.log` from store service test
2016-06-03 14:47:47 +01:00
Austin Burdine
c854dacefe Merge pull request #38 from kevinansfield/version-header
Add version header to API requests
2016-06-03 05:09:18 -06:00
Kevin Ansfield
4cc4781b3e Add version header to API requests
no issue
- modifies the version info included in `env.APP.version` to only include the `major.minor` version numbers
- update base adapter to include `X-Ghost-Version` header
- update `ajax` service to include `X-Ghost-Version` header
2016-06-03 11:53:29 +01:00
Austin Burdine
a4d519d20c Merge pull request #33 from kevinansfield/bower-deps
Bower dependency updates
2016-06-02 21:34:56 -06:00
Hannah Wolfe
31947d24bc Merge pull request #36 from kevinansfield/linting
Add Gruntfile.js, setup linting task and Travis build
2016-06-02 17:32:44 +01:00
Kevin Ansfield
a2a041db2a Add Gruntfile.js, setup linting task and Travis build
refs #23
- add `grunt lint`
- add lint build to Travis matrix
2016-06-02 17:19:30 +01:00
Kevin Ansfield
55cb0f1dbe Merge pull request #35 from TryGhost/greenkeeper-ember-wormhole-0.3.6
Update ember-wormhole to version 0.3.6 🚀
2016-06-02 16:55:24 +01:00
greenkeeperio-bot
dd25a24c3a chore(package): update ember-wormhole to version 0.3.6
https://greenkeeper.io/
2016-06-02 16:36:38 +01:00
Kevin Ansfield
8c58424bfe deps: pretender@1.1.0 2016-06-01 12:26:56 +01:00
Kevin Ansfield
1fd0981f3b deps: moment@2.13.0 2016-06-01 12:21:57 +01:00
Kevin Ansfield
20989bcf57 deps: jquery-file-upload@9.12.3 2016-06-01 12:15:00 +01:00
Kevin Ansfield
e1d5dfa971 deps: google-caja@6005.0.0 2016-06-01 12:02:00 +01:00
Kevin Ansfield
c56f22122f deps: codemirror@5.15.2 2016-06-01 11:50:18 +01:00
Kevin Ansfield
65e04bf61d Merge pull request #31 from TryGhost/greenkeeper-ember-power-select-0.10.10
Update ember-power-select to version 0.10.10 🚀
2016-05-31 15:38:51 +01:00
greenkeeperio-bot
215fc70e86 chore(package): update ember-power-select to version 0.10.10
https://greenkeeper.io/
2016-05-31 15:28:59 +01:00
Hannah Wolfe
3e64cbe5f9 Merge pull request #27 from kevinansfield/improve-file-upload-tests
Improve uploader tests + test subscribers CSV import
2016-05-27 19:29:07 +01:00
Kevin Ansfield
66ed2a02df Improve uploader tests + test subscribers CSV import
no issue
- override `x-file-input` in `gh-file-input` to look for a custom property on the change event if we are in testing mode (this is necessary because Ember 2.5+ use native rather than jQuery events so `target.files` is readonly, see https://github.com/emberjs/ember.js/issues/13540)
- migrate unit tests for the uploader components to the integration tests
- add skipped acceptance tests for the subscribers CSV import now that it's possible to simulate file uploads
2016-05-27 13:34:31 +01:00
Hannah Wolfe
faf24e4f4f Merge pull request #26 from kevinansfield/remove-search-outline
Remove outline from search input
2016-05-25 18:20:49 +01:00
Kevin Ansfield
3e1087f80f Remove outline from search input
no issue
- remove the outline that is shown on the search input once the dropdown box has closed
- remove unused styles for the old selectize-based search input
2016-05-25 10:52:21 +01:00
Austin Burdine
a64169dee1 Merge pull request #24 from TryGhost/greenkeeper-ember-power-select-0.10.9
Update ember-power-select to version 0.10.9 🚀
2016-05-24 11:57:28 -06:00
greenkeeperio-bot
5c3ae0fec2 chore(package): update ember-power-select to version 0.10.9
https://greenkeeper.io/
2016-05-24 17:32:07 +01:00
Kevin Ansfield
f8a3e84b56 Merge pull request #21 from TryGhost/greenkeeper-ember-cli-htmlbars-inline-precompile-0.3.2
Update ember-cli-htmlbars-inline-precompile to version 0.3.2 🚀
2016-05-23 12:14:02 +01:00
greenkeeperio-bot
6c323c62c9 chore(package): update ember-cli-htmlbars-inline-precompile to version 0.3.2
https://greenkeeper.io/
2016-05-23 12:04:43 +01:00
Kevin Ansfield
f60d28470d Merge pull request #22 from TryGhost/greenkeeper-ember-cli-htmlbars-1.0.8
Update ember-cli-htmlbars to version 1.0.8 🚀
2016-05-23 12:04:29 +01:00
Kevin Ansfield
08fa7bd4a7 Rename PULL_REQUEST_TEMPLATE to PULL_REQUEST_TEMPLATE.md 2016-05-23 10:50:15 +01:00
Kevin Ansfield
97e16ed09f Create PULL_REQUEST_TEMPLATE 2016-05-23 10:49:08 +01:00
greenkeeperio-bot
1ee20be51e chore(package): update ember-cli-htmlbars to version 1.0.8
https://greenkeeper.io/
2016-05-22 23:18:02 +01:00
Kevin Ansfield
9aa1c5e742 Merge pull request #3 from TryGhost/greenkeeper-update-all
Update all dependencies 🌴
2016-05-22 09:56:28 +01:00
greenkeeperio-bot
b2277244d6 chore(package): update dependencies
https://greenkeeper.io/
2016-05-22 09:42:57 +01:00
Kevin Ansfield
06ad2eed55 Merge pull request #14 from TryGhost/greenkeeper-ember-cli-jshint-1.0.3
Update ember-cli-jshint to version 1.0.3 🚀
2016-05-22 09:35:21 +01:00
greenkeeperio-bot
a921a14e2d chore(package): update ember-cli-jshint to version 1.0.3
https://greenkeeper.io/
2016-05-22 09:27:48 +01:00
Kevin Ansfield
fb0b1631a7 Merge pull request #12 from TryGhost/greenkeeper-loader.js-4.0.7
Update loader.js to version 4.0.7 🚀
2016-05-22 09:27:34 +01:00
greenkeeperio-bot
d47ef4393a chore(package): update loader.js to version 4.0.7
https://greenkeeper.io/
2016-05-21 02:31:44 +01:00
Austin Burdine
e54da7314b Merge pull request #15 from TryGhost/greenkeeper-ember-cli-2.5.1
Update ember-cli to version 2.5.1 🚀
2016-05-20 19:31:30 -06:00
greenkeeperio-bot
f80404c495 chore(package): update ember-cli to version 2.5.1
https://greenkeeper.io/
2016-05-20 16:30:21 +01:00
Kevin Ansfield
2e9934ce2e Merge pull request #10 from TryGhost/greenkeeper-ember-cli-htmlbars-1.0.7
Update ember-cli-htmlbars to version 1.0.7 🚀
2016-05-20 12:24:45 +01:00
greenkeeperio-bot
514008ad01 chore(package): update ember-cli-htmlbars to version 1.0.7
https://greenkeeper.io/
2016-05-20 06:11:11 +01:00
Kevin Ansfield
2e4655855e Add initial Travis config file
no issue
- basic testing of the admin client with both Chrome and Firefox
2016-05-19 13:33:14 +01:00
Kevin Ansfield
540b6a179d Match .gitignore and .editorconfig with Ghost repo
no issue
- as it's more likely that Ghost-Admin will be checked out separately it makes sense that it has its own `.gitignore` and `.editorconfig` that match the core repository
2016-05-19 11:39:15 +01:00
Kevin Ansfield
3ec0a0b248 Initial sub-project README.md
no issue
- point visitors to the core repo for instructions and bugs
2016-05-19 11:39:15 +01:00
Kevin Ansfield
131d08f1e6 Fix broken editor when content contains wrapped images
no issue
- don't assume that the upload element that is being replaced is top-level, target the element's parentNode rather than the overall fragment
2016-05-18 21:52:07 +01:00
Kevin Ansfield
92c5394449 Fix drag-n-drop files from Chrome's download bar
closes #6850
- HTML5 drag-n-drop has some weird inconsistencies around the `dragOver` event where it defaults the "drop" behaviour to nothing so you need to cancel the defaults and override
	- http://stackoverflow.com/questions/19526430/drag-and-drop-file-uploads-from-chrome-downloads-bar
2016-05-18 09:53:10 +01:00
Kevin Ansfield
64a85ced32 Fix unwanted clearing of social inputs on blur with no edits
no issue
- updates the logic to expect `null` scratch values as the scratch values won't be set until the input value has changed
- adds tests for initial value display and regression tests for the cleared input bug
2016-05-17 19:14:14 +01:00
Aileen Nowak
01e52013e7 Fixes error in validation
closes #6826

- refactors the validation of facebook and twitter input field in `general.js` and `user.js` controller
	- Example validations for facebook:
		- `facebook.com/username` will be corrected to the full URL
		- `user` will show error `Your Page name is not a valid Facebook Page name' for `general.js` and `Your Username is not a valid Facebook Username` for `user.js` as the username in facebook has to be at least 5 characters long
		- `twitter.com/username` will be autocorrected to the valid facebook URL incl. the `username`
	- Example validations for twitter:
		- `twitter.com/user_` will be corrected to the full URL
                - `user:99` will show error `Your Username is not a valid Twitter Username`
                - `facebook.com/username` will be autocorrected to the valid twitter URL incl. the `username`
- updates both acceptance tests
- adds further validation for facebook pages in general settings and user. Submitting a url which incl. `/page/` or `/pages/` will now accept any username followed incl. further `/`.
- adds a custom transform `facebook-url-user` which will extract the username (if it's a facebook page, incl. `pages/`) to store only this in the backend
- uses the `twitter-url-user` transform now also for user
2016-05-17 17:44:23 +01:00
Kevin Ansfield
7fda1082f3 Merge pull request #6838 from acburdine/esa-1.1
deps: ember-simple-auth@1.1.0
2016-05-16 11:51:23 +02:00
Kevin Ansfield
df118c07e3 Merge pull request #6830 from acburdine/no-show-nav-menu
Don't show the nav menu when on a 404 route and not signed in
2016-05-16 11:01:44 +02:00
Austin Burdine
4856276a06 update document title on blog title change
no issue
- force document.title to recompute when the blog title is changed in settings/general
2016-05-15 18:41:28 -06:00
Austin Burdine
ced797de76 deps: ember-simple-auth@1.1.0 2016-05-15 16:45:16 -06:00