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

2397 commits

Author SHA1 Message Date
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
7621b4bdd2 Prevent 404-handler mixin from erroring on non-adapter errors
no issue
- add a check for existence of `error.errors` as that won't be present on non-404 errors - fixes non-404 errors such as "no action handled x" being hidden by a completely different error
2015-12-07 18:37:35 +00:00
Kevin Ansfield
d175ccf836 Merge pull request #6178 from syaiful6/select-native
Fix Select Component
2015-12-07 10:40:40 +00:00
Syaiful Bahri
2a361d4911 Fix Select Component
jQuery instance isn't iterable, so we cant destructuring it.

closes https://github.com/TryGhost/Ghost/issues/6171
2015-12-07 16:44:54 +07:00
Austin Burdine
1822afcaf7 add team acceptance test 2015-12-06 15:24:06 -06:00
Hannah Wolfe
68389da756 Merge pull request #6161 from kevinansfield/jscs-deps
deps: jscs@2.6.0 & ember-suave@1.2.3
2015-12-04 10:33:19 +00:00
Kevin Ansfield
6ac50f0ad1 Merge pull request #6098 from acburdine/tag-404
Fix 404 error handling in editor, tags, and team routes
2015-12-04 10:20:22 +00:00
Kevin Ansfield
4cbd829cbf deps: jscs@2.6.0 & ember-suave@1.2.3
no issue
- fixes an error that popped up after ember-suave's `brocolli-jscs` dependency moved to `2.6.0` which duplicated some of the rules that `ember-suave` used to implement
2015-12-04 09:58:03 +00:00
Austin Burdine
26018c43d3 fix 404 error handling in editor, tags, and team routes
closes #6094
- adds 404-handler mixin
- applies mixin to settings/tags/tag, editor/edit and team/user routes
- adds adapter-error test helper to override the default adapter error
2015-12-03 16:37:23 -06:00
Hannah Wolfe
94d07f8ef7 Merge pull request #6122 from kevinansfield/slug-query-with-include
Add count.posts support to user model on client
2015-12-03 14:48:21 +00:00
Gary Cao
5c76634118 Checkbox labels are cut off on mobile.
closes #6089
2015-12-02 18:28:50 +09: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
04632e4e25 Fix sub-dir being added to navigation urls when installed in sub-dir
refs #4989
- fix handling of urls relative to base domain when ghost is installed in a sub folder

Fixes an issue when ghost was installed to a sub-dir, e.g. `example.com/blog` and an attempt to link to `example.com/` or `example.com/something-else` would always be re-written to `example.com/blog/` or `example.com/blog/something-else`.
2015-12-01 15:23:21 +00:00
Sebastian Gierlinger
26ede4aa83 Merge pull request #6152 from kevinansfield/cleanup-dependency
Remove unused `ember-resize` dependency
2015-12-01 14:58:24 +01:00
Kevin Ansfield
71c4bbd328 Merge pull request #6147 from garyc40/bug-uploader-bind
Properly binds "this" in uploader.js
2015-12-01 13:08:00 +00:00
Kevin Ansfield
4d62348a16 Remove unused ember-resize dependency
no issue
- removes `ember-resize` dep that crept back in under the radar in the Ember 2.2 update
- updates `ember-cli-build`'s test dependencies to match the format specified in http://ember-cli.com/managing-dependencies/#test-assets
2015-12-01 11:03:53 +00:00
Gary Cao
57ab52ccee Properly binds "this" in uploader.js
closes #6146
2015-12-01 12:50:31 +09:00
Austin Burdine
f9b4c89e51 deps: ember/ember-data@2.2.0 2015-11-30 12:23:47 -06:00
Austin Burdine
0e04b62640 deps: ember-cli@1.13.13 2015-11-30 11:21:39 -06: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
4200e8f262 Add count.posts support to user model on client
no issue
- moves adapter tests from unit to integration as we are not testing them in isolation
- add test for querying user's by slug with `include=count.posts`
- add `count` attribute to User model
2015-11-24 17:11:35 +00:00
Kevin Ansfield
a1e7c485a1 Specify full SHAs when importing packages in bower.json
no issue
- removes warning: `bower password-generator#49accd7    short-sha Consider using longer commit SHA to avoid conflicts`
- fixes error: `bower jqueryui-touch-punch#*    error key must be a string or number. undefined`
2015-11-24 16:39:14 +00: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
Kevin Ansfield
21f384ff2b Merge pull request #6099 from acburdine/user-adapter
Implement custom user adapter to pull users by slug
2015-11-23 14:52:01 +00:00
Austin Burdine
777a7fed78 implement custom user adapter to pull users by slug
closes #6095
- implements custom user adapter for the `/team/:slug/` route
- abstracts slug-url behavior into a mixin (used in /settings/tags/ as well)
- adds unit tests for both tag and user adapters
2015-11-23 07:48:08 -06:00
Matthew Beale
4d3e0d664f Use private properties for unobserved render state
* Drop set for local private editor property
* Only run preview setup on didInsertElement
* Drop set for local scrollWrapper prop
* Selectize setup on afterRender instead of next
* Use local props for editor save timers
2015-11-21 09:25:21 -05:00
Matthew Beale
056e3e465d Properly use htmlSafe styles 2015-11-20 17:48:48 -05:00
Hannah Wolfe
e6ef39bc2c Fix & futureproof author filter
refs #5943
2015-11-20 10:13:30 +00:00
Hannah Wolfe
1097f1ce47 Update author query to use filter
refs #5943
2015-11-19 21:53:24 +00:00
Sebastian Gierlinger
6a2963ae20 Merge pull request #6049 from ErisDS/labs-text
Update public API labs flag text
2015-11-18 09:05:29 +01:00
Hannah Wolfe
f45c9b1ecf Update public API labs flag text 2015-11-17 21:28:16 +00:00
Hannah Wolfe
ff3062d5eb Merge pull request #6076 from kevinansfield/setup-flow-test
Add acceptance test for setup flow happy-path
2015-11-16 21:47:45 +00:00
Hannah Wolfe
c11dba5c90 Merge pull request #6071 from kevinansfield/fix-store-push-deprecations
Fix `store.push` deprecations in user model test
2015-11-16 21:27:39 +00:00
Kevin Ansfield
1e73e8c678 Add acceptance test for setup flow happy-path
refs #6039
- add `jquery-deparam` ember testing dependency for use in mirage config
- setup necessary mirage fixtures & endpoints for successful testing of setup flow's happy-path
- add happy-path acceptance test for setup flow
2015-11-15 11:51:19 +00:00
Kevin Ansfield
798e5ff1e0 Fix store.push deprecations in user model test
no issue
- `store.push` now accepts a single argument that is a JSON API compliant object (http://emberjs.com/blog/2015/06/18/ember-data-1-13-released.html#toc_internal-format-change-to-json-api)
2015-11-12 15:18:08 +00: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
Kevin Ansfield
8859d686d3 Fix ember browser tests to always use full height of preview container
no issue
- adds style to client/tests/index.html to force preview container and inner element to always fill 100%
- fixes issue with infinite-scroll test failing in browser but passing in phantomjs
2015-11-04 15:43:05 +00:00
Kevin Ansfield
d98ad41008 Set up ember-cli-mirage and update existing acceptance tests
refs #6039
- adds ember-cli-mirage dependency
- sets up mirage to match our API endpoints and responses
- adds fixture data for settings that are always present for all blogs
- converts existing acceptance tests to use mirage
2015-11-03 15:35:58 +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
Hannah Wolfe
df346ceb99 Merge pull request #6010 from kevinansfield/drag-drop-tags
Drag-n-drop re-ordering of tags in post settings menu
2015-11-02 16:15:33 +00:00
Kevin Ansfield
d2fda9cbce Add tags to auto-complete search
refs #5845
- display matched tags in auto-complete dropdown, load tag edit screen when selected
- fix bug where only 1 search item with the same ID would be displayed (eg. if a post and tag both had an ID of 1 it would only show the first-loaded item)
2015-11-02 15:34:13 +00:00
Kevin Ansfield
8357361aec Use tag slugs in URLs for tag management and add front-end edit redirect
refs #5845
- adds custom adapter for tags so that `store.queryRecord('tag', {slug: 'tag-slug'})` hits the `/tags/slug/tag-slug` endpoint instead of `/tags/?slug=tag-slug`
- updates tag management screens to use tag slugs instead of IDs
- adds `/tag/:slug/edit` redirect to front-end
2015-11-02 14:56:59 +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