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

152 commits

Author SHA1 Message Date
Kevin Ansfield
0ead35484f Merge pull request #6373 from kevinkucharczyk/standardise-camelcase
Standardise client property names to camelCase
2016-02-03 16:41:23 +00:00
Fabian Becker
6bee085074 Correctly use POST request to reset password
closes #6423
2016-02-02 12:58:39 +01:00
James Seymour-Lock
b2b1d7a63c Always show current year in copyright text on "About" page
no issue
- add `copyrightYear` CP to about page controller
- displays the current year in the copyright notice
2016-01-25 11:33:10 +00: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
Hannah Wolfe
3e2f6f4eca Merge pull request #6341 from kevinansfield/fix-mixed-content-on-team-page
Move user/cover image files used in admin team area into the client folder
2016-01-21 09:46:00 +00:00
Austin Burdine
b2c91dd3be cleanup usage of Ember.inject 2016-01-19 07:03:27 -06:00
Austin Burdine
e24e85d94a deps: ember-ajax@0.7.1 2016-01-18 09:37:14 -06:00
Austin Burdine
be1bf27285 refactor slug-generator object into a service
refs #6243
2016-01-15 09:43:17 -06:00
Kevin Ansfield
771b6babb0 Move user/cover image files used in admin team area into the client folder
no issue
- fixes potential "mixed content" warnings if non-admin urls are redirected
2016-01-14 16:26:48 +00:00
Kevin Ansfield
97bb577496 Refactor modals
refs #5798, closes #5018
- adds new `gh-fullscreen-modal` component - modals are now specified in-context so that they can have deeper interaction with their surrounding components/controller/route, i.e. a modal component can be a thin confirm/deny wrapper over the underlying controller action keeping all context-sensitive logic in one place
- adds spin-buttons to all modals with async behaviour
- adds/improves behaviour of inline-validation in modals
- improves re-authenticate modal to properly handle validation and authentication errors
2016-01-12 20:53:08 +00:00
Hannah Wolfe
b151185c6c Merge pull request #6317 from kevinansfield/quick-fix-unnecessary-leave-editor-modal
Quick-fix for unnecessary "discard changes" modals
2016-01-12 09:39:59 +00: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
ef0be5024b Transition after setup step 3 submission even if invite takes a long time
refs #5779
- adds a timeout of 4 seconds to step 3 submission so that we transition even if we haven't heard back from the server yet. Notification alerts will be displayed asynchronously once all server requests have returned.
- adds a message to check e-mail configuration to step 3 invitation failure alert
2016-01-08 17:06:41 +00:00
Austin Burdine
9b8a149bdc fix authentication error if setup/two is re-submitted
closes #6226
- adds calls to oauth middleware on PUT /authentication/setup/
- prevent setup/two from trying to log in again if user is already logged in
2015-12-18 12:18:13 -07:00
Kevin Ansfield
8b0afa53f6 Fix password reset
closes #6229
- removes `_super` call in the reset route's `setupController` hook to avoid a `model` property being set which was being picked up by the validation engine
- throw the error if we fail in the password reset process from something we aren't expecting
2015-12-15 21:51:36 +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
17b3ced8c9 Always call _super when using Ember hooks
no issue
- review use of Ember core hooks and add a call to `this._super` if missing
- fix a few occurrences of using the wrong component lifecycle hooks that could result in multiple/duplicate event handlers being attached

`_super` should always be called when overriding Ember's base hooks so that core functionality or app functionality added through extensions, mixins or addons is not lost. This is important as it guards against issues arising from later refactorings or core changes.

As example of lost functionality, there were a number of routes that extended from `AuthenticatedRoute` but then overrode the `beforeModel` hook without calling `_super` which meant that the route was no longer treated as authenticated.
2015-11-30 12:45:37 +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
Kevin Ansfield
976a2e6141 Merge pull request #6108 from mixonic/no-rerender-selectors
Unify mobile state in JS, drop resize
2015-11-30 08:45:03 +00:00
Hannah Wolfe
1c02a4182a Merge pull request #6129 from kevinansfield/invalid-origin-errors
Display error message on setup if origin doesn't match config.js url
2015-11-27 00:25:57 +08:00
Kevin Ansfield
21fc4662ff Display error message on setup if origin doesn't match config.js url
refs #6106
- add error handler for authentication step of blog setup
- move setup acceptance test out of 'settings' folder
2015-11-26 11:22:16 +00:00
Kevin Ansfield
86f52081cc Fix missing error on signin when server has gone away
no issue
- `session.authenticate` calls out to jQuery for the ajax request which then raises it's own error but returns nothing when the server is not reachable. This is a quick fix so that we don't error and can pass through to the default error handler in the authentication step.
2015-11-26 11:15:17 +00:00
Matthew Beale
4d98363c7c Unify mobile state in JS, drop resize
In `gh-content-view-container` the visibility of another DOM node was
being used to detect if a given view was mobile or not. This means the
UI needed to have layout forced (and DOM rendered) before the content
view container would render a second time. This is slow interaction with
the DOM (forcing layout) and slow for Ember's renderer (it needs to
render the container once with a default, then again when the value
changes).

Additionally there were two ways resize was being observed. The
`Window.matchMedia` API was used for some styles and the `ember-resize`
addon used to detect other changes. Here I've unified around just the
`Window.matcheMedia` API but abstracted it behind a service.

Sizes are exposed as properties that can be bound to or used directly in
templates.
2015-11-25 11:54:08 -05:00
Kevin Ansfield
91e86bde61 Update client for tag.post_count -> tag.count.posts rename
refs #6105
- adds `raw` ember-data transform to handle standard JSON `count` attribute
- update mirage factory to return correct `count.posts` format
- rename all uses of `post_count` to `count.posts`
2015-11-23 19:57:56 +00:00
Matthew Beale
056e3e465d Properly use htmlSafe styles 2015-11-20 17:48:48 -05:00
Kevin Ansfield
7db0ffbda2 Fix auth regressions after ESA 1.0 upgrade
refs #6039, closes #6047, closes #6048

- delete old/unused fixtures file
- add failing tests for #6047 & #6048
- redirect to sign-in if we get a 401 when making an API request
- fix incorrect `this.notifications` call in tag controller
- raise `authorizationFailed` action in application route's `sessionInvalidated` hook so that it can be handled by leaf routes (fixes re-auth modal display)
- close "saving failed" alert when successfully re-authenticated
- adds a "window-proxy" util so that we can override `window.*` operations in tests
- fix `gh-selectize` attempting to register event handlers when the component has already been destroyed
2015-11-12 12:56:27 +00:00
Hannah Wolfe
5f68b5477a Merge pull request #6017 from kevinansfield/finalize-debounced-gravatar
Finish changes in #5807 (debounced gravatar load in gh-profile-image)
2015-11-02 18:14:53 +00:00
Hannah Wolfe
63e3c33ea0 Merge pull request #5984 from sebgie/issue#5941
Move Public API behind labs flag
2015-11-02 16:15:50 +00:00
Sebastian Gierlinger
8650f34665 Move Public API behind labs flag
closes #5941
- added UI to labs page
- added method to determine if full authentication is required
- updated public_api tests to enable public api first
2015-11-02 14:18:58 +01:00
Kevin Ansfield
14a182d691 Mobile fixes for tag management UI
refs #5845, #5969
- when on mobile devices tag management UI will only display a list and when a tag is accessed the tag settings form will slide in from the right
- tag settings form header has a 'back' button when on mobile to go back to tags list
- switching from mobile to standard modes will auto load the first tag as per standard tags screen on desktop
- if no tags are present then the blank-slate template will be shown when on mobile
2015-11-02 13:18:10 +00:00
Hannah Wolfe
8d32afdac4 Merge pull request #5969 from kevinansfield/routable-tags
Routable tags
2015-11-01 15:34:33 +00:00
Nazar Gargol
3d6f4d15ba Adds debounced email validation and gravatar loading on second setup/signup screen
closes #5797
- adds debounced email validation as user types
- adds debounced gravatar loading for valid email
2015-10-28 09:40:40 +00:00
Kevin Ansfield
4ecdf182e6 Routable tags
refs #5845
- Updates tag settings screen to match content screen behaviour. Each now tag has it's own route that is link-able from other areas of the app
- Updates a number of places where jQuery event handler code was not wrapped in Ember's run loop
2015-10-27 12:48:41 +00:00
Kevin Ansfield
6ea49f3a03 Update admin area queries to use new filter parameter
refs #6005
- updates use of the query params removed in #6005 to use new `filter` param
2015-10-27 12:13:35 +00:00
Hannah Wolfe
ff17c0191b Merge pull request #5952 from kevinansfield/tag-settings-ui
Minor tag settings validation updates & fixes
2015-10-21 17:40:53 +01:00
Austin Burdine
58f7c8f6b2 fix session data loading in settings/labs
closes #5973
- updating session data loading to new esa 1.0 api
2015-10-20 07:50:41 -05:00
Kevin Ansfield
3759930a77 Minor tag settings validation updates & fixes
refs #5845
- add tests for `tag-settings` validator
- add validation for tag slug length
- fix display of error message when saving tag fails on the server
- add max chars text to description char count, remove error message as the count/input colour already indicates an error
2015-10-19 10:45:41 +01:00
Kevin Ansfield
c3d656ad2c Merge pull request #5955 from acburdine/esa-1.0
deps: ember-simple-auth@1.0.0
2015-10-19 10:40:35 +01: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
John O'Nolan
b3e03ea802 Email error message cleanup 2015-10-16 12:07:09 +02:00
Kevin Ansfield
55840eb57f Avoid duplicate alerts, clear alerts on successful retry or sign-in
closes #5903, refs #5409
- switch alert/notification component tests from unit to integration where appropriate
- rename `notifications.closeAll` to `notifications.clearAll` to better represent it's behaviour
- add concept of a "key" to alerts/notifications and ability to close only specified keys through notifications service
- close duplicate alerts/notifications before showing a new one
- specify a key for all existing alerts
- close failure alerts on successful retries
- clear all currently displayed alerts on successful sign-in
2015-10-12 19:21:30 +01: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
Kevin Ansfield
d127d79019 Standardize on var-less export default across ember app
no issue
- drops the `var Foo = Ember.Thing.extend({}); export default Foo;` syntax in favour of exporting directly, eg: `export default Ember.Thing.extend({})`
- discussion on this change [here](https://github.com/TryGhost/Ghost/pull/5340#issuecomment-105828423) and [here](https://github.com/TryGhost/Ghost/pull/5694#discussion-diff-37511606)
2015-10-06 10:59:50 +01:00
Kevin Ansfield
0ee1c1ed1b Merge pull request #5871 from cobbspur/preventEnter
Prevent enter button reloading page when focus is on meta-title in PSM
2015-09-27 14:03:47 +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
Kevin Ansfield
4ebacc7d9c Fix nav regressions in admin client
issue #5841

- fix relative link checks in navlink url input component
- fix navlink url input component sending absolute URLs instead of relative URLs to action handler
- remove URL manipulation in navigation settings controller (url input handles URL manipulation, validator flags anything that's still incorrect)
- capture cmd-s in url input to ensure changes are actioned before save
- automatically add mailto: to e-mail addresses
- add gh-validation-state-container component so .error/.success validation classes can be applied to any container element
- add validation-state mixin that can be mixed in to any other component to give it access to validation status (used in gh-navitem component to keep alignment when inline error message elements are added)
- validate and display inline errors on save
- improve ember test coverage for navigation settings related controller and components
2015-09-23 17:05:41 +01:00
Hannah Wolfe
7a64207827 Adds rudimentary validation to user invite
refs #5652

- with these changes, validation appears, but doesn't properly prevent closing the modal
- this needs revisiting at some point
2015-09-02 22:26:59 +01:00
Hannah Wolfe
f88390af3b Merge pull request #5794 from novaugust/psm-blog-url
Add config.blogUrl key to PSM's seoURL property
2015-09-02 20:50:50 +01:00
Matt Enlow
6ccef929e0 Add config.blogUrl key to PSM's seoURL property
Closes #5793
2015-09-02 12:34:48 -06:00