1
0
Fork 0
mirror of https://github.com/TryGhost/Ghost-Admin.git synced 2023-12-14 02:33:04 +01:00
Commit graph

32 commits

Author SHA1 Message Date
Kevin Ansfield
604fda4348 Update package.json details, rename module to ghost-admin
no issue
- updates `package.json` details to better reflect the separation from the `Ghost` package
- update ember config and all import statements to reflect the new `ghost-admin` module name in `package.json`
2016-06-03 16:12:54 +01:00
Aileen Nowak
be8b31ec85 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
1ebe96b284 Merge pull request #6651 from kevinansfield/uploader-js-must-die
Replace jQuery-based uploader.js with ember components
2016-04-14 16:57:57 +01:00
Kevin Ansfield
39a175108b Replace jQuery-based uploader.js with ember components
no issue
- adds `gh-image-uploader` that handles image uploads in a fully ember fashion and with no dependency on `uploader.js`
- adds `gh-image-uploader-with-preview` that can fully replace the old `gh-uploader`
- replace uses of `gh-uploader` in PSM & TSM with `gh-image-uploader-with-preview`
- updates the editor preview image handling to use the new `gh-image-uploader-with-preview` component
- updates the image upload modal to use `gh-image-uploader` (utilises the `saveButton=false` flag which means the preview has to be handled externally to avoid auto-replacement when typing a URL)
- removes all old `uploader.js` related code
- adds custom `RequestEntityTooLargeError` and `UnsupportedMediaTypeError` errors to our `ajax` service
2016-04-05 12:03:20 +01:00
Peter Szel
2f7a206b7e Fixed bugs regarding the published date input field validation.
refs #5777

- removing error message from the previous validation
- only checking if date is in the past if the input date is valid to begin with
- always updating the view, even if the date hasn't changed to make sure the date format stays consistent
2016-02-28 01:33:24 +00:00
Kevin Ansfield
522b625376 Revert "pass post tags as array to ember-cli-selectize"
This reverts commit efff6f62ae.
2016-02-18 17:57:18 +00:00
Austin Burdine
95687e9266 pass post tags as array to ember-cli-selectize
closes #6483
- fix new post => settings/tags transition error
2016-02-17 22:24:16 -06:00
Kevin P. Kucharczyk
24cc72cafd Standardise client property names to camelCase
closes #6018
- added keyForAttribute method in application serializer
- override keyForAttribute in settings serializer to not apply camelCase/underscore conversion
- rename under_scored properties to camelCased
2016-01-23 19:12:22 +01:00
Austin Burdine
b2c91dd3be cleanup usage of Ember.inject 2016-01-19 07:03:27 -06:00
Austin Burdine
be1bf27285 refactor slug-generator object into a service
refs #6243
2016-01-15 09:43:17 -06:00
Kevin Ansfield
0120a75a4e Quick-fix for unnecessary "discard changes" modals
closes #6315
- don't set the `slug` attribute if we get an empty string back from the slug generator to prevent dirty attributes being triggered for `null` getting changed to `''`
2016-01-11 15:58:07 +00:00
Kevin Ansfield
08e3feee4c Fix changing text and jumping caret in PSM's date input
refs #5777
- adds new `gh-datetime-input` that takes a one-way-bound value and formats it, only triggering the supplied `update` action on focus-out
- fixes bug in PSM's `setPublishedAt` action if model's `published_at` is a Date object not a Moment object
2015-12-08 10:13:17 +00:00
Kevin Ansfield
5dae278efe Remove $ from jshint's predef, always use Ember's $
no issue
- fixes problems with "re-definition of $" errors
2015-12-01 20:52:25 +00:00
Kevin Ansfield
7ce3726589 Use es6 across client and add ember-suave to enforce rules
no issue
- add ember-suave dependency
- upgrade grunt-jscs dependency
- add a new .jscsrc for the client's tests directory that extends from client's base .jscsrc
- separate client tests in Gruntfile jscs task so they pick up the test's .jscsrc
- standardize es6 usage across client
2015-11-30 10:41:01 +00:00
Austin Burdine
031a129f0b deps: ember-simple-auth@1.0.0
closes #5951
- update to esa 1.0
2015-10-18 13:17:02 -05:00
Kevin Ansfield
fbb92476f0 Ember-cli, Ember, & Ember Data 1.13.x upgrades
closes #5630
- upgrade ember-cli to latest version
- upgrade ember to latest 1.13.x release
- upgrade ember data to latest 1.13.x release
    - update custom adapters and serialisers for new internal JSON-API compatible formats [(docs)][1]
    - update all store queries to use new standardised query methods [(docs)][2]
    - add ember-data-filter addon ready for store.filter removal in ember-data 2.0 [(docs)][3]
- remove use of prototype extensions for computed properties and observers
- consolidate pagination into a single route mixin and simplify configuration

[1]: http://emberjs.com/blog/2015/06/18/ember-data-1-13-released.html#toc_transition-to-the-new-jsonserializer-and-restserializer-apis
[2]: http://emberjs.com/blog/2015/06/18/ember-data-1-13-released.html#toc_simplified-find-methods
[3]: http://emberjs.com/blog/2015/06/18/ember-data-1-13-released.html#toc_ds-store-filter-moved-to-an-addon
2015-10-06 16:09:05 +01:00
cobbspur
e15d8e5abd Prevent enter button reloading page when focus is on meta-title in PSM
closes #5854

- adds an action that returns false on form submission
2015-09-27 13:59:08 +01:00
Matt Enlow
6ccef929e0 Add config.blogUrl key to PSM's seoURL property
Closes #5793
2015-09-02 12:34:48 -06:00
Hannah Wolfe
ecece6238f Improve error handling for the PSM
closes #5762

- changes date to use proper inline validation
- changes meta_title & desc to also use inline validation
- meta_title & desc also give proper errors on save
- title too long causes proper error on save
2015-08-30 17:26:52 +01:00
Hannah Wolfe
7346f428b8 Merge pull request #5709 from kevinansfield/tag-name-comma-validation
Validate leading commas in tag names
2015-08-28 19:03:31 +01:00
Kevin Ansfield
0483a59296 Fix post tag input so it keeps the tag order
refs #5732
- patches ember-selectize to send the caret position to the create-item action handler
- updates `addTag` method in PSM controller to insert new tag in the correct place
2015-08-26 21:46:57 +01:00
Kevin Ansfield
5e303ce07d Fix new tags disappearing in PSM when saving post
closes #5708
- when adding a tag give it a throwaway UUID so that every selected/available tag object has a unique identifier for use with selectize
2015-08-25 23:53:19 +01:00
Kevin Ansfield
48404e6ac6 Validate tag names don't start with commas
closes #5685
- Adds client and server-side validation for tag names starting with commas
- Trim tag names before adding in PSM (tag attributes are already trimmed before saving in TSM)
2015-08-24 16:55:30 +01:00
Kevin Ansfield
ad83bca937 Replace the current tag input with a selectize based input
issue #3800, closes #5648
- uses ember-cli-selectize addon for the tag editing functionality in the PSM
2015-08-20 14:40:56 +01:00
Kevin Ansfield
1ba6bcc131 Refactor notifications service & components
issue #5409

- change persistent/passive notification status to alert/notification
- replace showSuccess/Info/Warn/Error with showNotification/showAlert
- fix and clean up notification/alert components
2015-07-28 12:26:11 +01:00
Jason Williams
89102fdd6c Update Ember to 1.13.2
- Refactor to handle deprecations including removal of
  all Views, ArrayControllers, and ItemControllers.
2015-06-24 11:47:28 -05:00
Austin Burdine
0c5883cae0 removes usage of prototype extensions
No issue
- removes more usage of function prototype extensions in favor of Ember functions
- replaces some event calls with the direct function name
- adds comments to functions replaced with the event name
2015-06-15 14:07:25 -04:00
Austin Burdine
5f28034189 update Ember to 1.12.1/ember-data to 1.0.0-beta.18
No issue
- fixed "{{#each}}" helper in templates to use block syntax
- fixed deprecated ember.controller getter/setter function to use new syntax
- removed unnecessary pass-protect route view
2015-06-02 22:26:16 -06:00
Jason Williams
3ef1167815 Use Ember.inject instead of needs and initializers
No Issue
- Switches to the newer style of dependency injection.
- Instead of injection Controllers via "needs," use
  Ember.inject.controller().
- Get rid of initializers that were only injecting objects
  into various factories. Converts these objects into Ember.Service
  objects and declaratively inject them where needed via
  Ember.inject.service().  The added benefit to this is that it's no
  longer a mystery where these properties/methods come from and it's
  straightforward to inject them where needed.
2015-05-27 07:41:42 -05:00
Jason Williams
0ed941c0ed Refactor main nav menu into components 2015-05-24 01:42:59 -05:00
Matt Enlow
55472b143f Ember init, bower deps, es6 modules 2015-03-11 12:37:41 -06:00
Matt Enlow
6bbc62d3c2 The great migration (EAK -> ember-cli) 2015-03-11 12:37:41 -06:00
Renamed from controllers/post-settings-menu.js (Browse further)