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

30 commits

Author SHA1 Message Date
Matt Enlow 6bbc62d3c2 The great migration (EAK -> ember-cli) 2015-03-11 12:37:41 -06:00
Felix Rieseberg 56b3805776 Dynamic Titles in Ghost Admin
- Every route can set a title token that is combined with the blog’s
title, resulting in titles like ‘Content - Test Blog’.
- Subroutes are supported (‘Settings - General - Test Blog’)
- The blog’s name is applied to and taken from the `config` object to
spare Ember a REST call via `store.find(‘settings’)`.
- Tests have been changed to test for the new titles.
- The initially proposed solution
(https://github.com/paddle8/ember-document-title) doesn’t play nice
with EAK, which is why I went with this solution
(https://gist.github.com/machty/8413411) by Ember.JS core dev @Machty.
2014-11-27 15:41:00 -08:00
Matt Enlow 5bcf82be7c Consolidate SimpleAuth.AuthenticatedRouteMixin into AuthenticatedRoute
No issue
2014-10-28 08:29:42 -06:00
Matt Enlow a3b6d08a6a Go between post list / post content with keyboard
Closes #3940
- Pushing left/right changes the "focus" of the posts screen to the list / content, respectively
- Once one of these has been focused, up/down keyboards work on that section in particular
- By default, the post list is selected
- Using the keyboard to focus one of the two makes it go "poof" to let you know you changed stuff
2014-10-27 09:41:13 -06:00
Jason Williams e1666234be Enable JSCS checking on client.
Refs #4001
- grunt-jscs@0.8.1 which provides ES6 support.
2014-10-25 16:13:04 +00:00
Matt Enlow 11d2ba0587 Add Gmail-style shortcuts
Ref #3940
- add `j`/`k` for navigating posts down / up
- `c` for opening a new post
-  `o` to open the selected post
- update keymaster dep to allow for multiple key unbinds (`key.unbind('up, j')`)
2014-09-21 11:02:42 -06:00
Matt Enlow a2a766ba1b Abstract mobile transition interactions
Closes #4032
- Created "mobile" views: `parent-view`, `content-view` and `index-view`
- `mobile/parent-view` has three callbacks for managing layout, and a mediaQuery listener to keep in sync with the user
- content-view and index-view use their parent-views callbacks to bring themselves into and out of the viewport as appropriate
- fixed media queries for post content list from 800px to 900px
- Created `mobile-index-route` to intelligently transition to a new route on desktops (used by both PostsIndexRoute and SettingsIndexRoute)
- Extract mobile interactions from settings views to new mobile utility views
- `js-` prefixed settings view transitions
- removed unused openEditor action from PostsRoute
- removed unused mobile util "responsiveAction"
2014-09-16 07:28:03 -06:00
Robert Jackson e5785d2c42 Do not loop keyboard nav on content list. 2014-08-07 09:15:24 -04:00
Robert Jackson 924f856b55 Ensure keyboard navigation matches custom post sorting. 2014-08-02 10:39:26 -04:00
Hannah Wolfe d3861c2ef8 Completed post & user list filer by role
closes #3446, closes #3086

- Authors can only ever get to their own posts
- Editors only ever see authors in the user list
2014-07-31 11:23:37 +01:00
Robert Jackson c8259cf685 Limit Posts for Authors.
* Ensures that posts listing only shows posts that the current user
  authored, if they only have the Author role.
* Do not transition into the posts.post route if the current user is
  not the author (but has the Author role). This is needed because
  the API server will always return the post (regardless of the current
  user).
2014-07-31 09:02:49 +01:00
Hannah Wolfe 6f8a55f5ca Post list: authors see their own posts
issue #3446
2014-07-31 09:02:48 +01:00
Matt Enlow 24cf1f56f6 Add keyboard navigation of posts
Closes #3015
- Added stepThroughPosts method to PostsRouter, takes a integer, goes that far, wraps around the array.
- PostsPostRoute notifies the PostsController of which model it currently has, to help stepThroughPosts know who's selected
2014-07-30 22:23:02 -06:00
Marco Otte-Witte 06a43213f3 updated Ember Simple Auth to latest version 2014-07-25 16:04:19 +02:00
Hannah Wolfe 9b7b0e86a1 Merge pull request #3346 from jaswilli/issue-3325
Extend adapter to support automatic includes
2014-07-21 20:38:57 +01:00
Maurice Williams 1450699242 Pagination for Users Management screen
closes #3222
- implementing server-side pagination for /users API
- passing /users?limit=none will return all users
- passing /users?status=invited will filter base on user status
- creating 3 mixins (route, controller and view) to keep pagination logic DRY
- updating route, controller and view for Posts to use new mixing
- implementing infinite scrolling for Users Management screen (using new mixins)
- Users Management screen displays all invited users, but paginates active users
2014-07-21 14:03:26 -04:00
Jason Williams 0df7542bf4 Extend adapter to support automatic includes
Closes #3325
- Add Roles model and add hasMany roles to User model.
- Add EmbeddedRelationAdapter that will automatically include
  hasMany relations in calls to the API.
- UserAdapter and PostAdapter now extend EmbeddedRelationAdapter
  and all explicit includes from store.find() have been removed.
2014-07-21 17:05:13 +00:00
Sebastian Gierlinger cb463e6856 oAuth
closes #2759
closes #3027

- added oauth2orize library for server side oAuth handling
- added ember-simple-auth library for admin oAuth handling
- added tables for client, accesstoken and refreshtoken
- implemented RFC6749 4.3 Ressouce Owner Password Credentials Grant
- updated api tests with oAuth
- removed session, authentication is now token based

Known issues:
- Restore spam prevention #3128
- Signin after Signup #3125
- Signin validation #3125

**Attention**
- oldClient doesn't work with this PR anymore, session authentication
was
removed
2014-06-30 14:58:10 +02:00
David Arvelo 99c474f12f Calls to POST API have include=tags
closes #2998
- update PostSerializer to use DS.EmbeddedRecordsMixin
- create PostAdapter to include include=tags in query params for POST and PUT
- set include=tags for various GET post requests
- change PostModel to have { embedded: always } instead of { async: true }
- update Ember-Data to beta8 from beta7
- make call to get tags from model in editor.edit route synchronous since the tags now exist in the store
- change casper test to wait for call to posts api with `?include=tags`
2014-06-28 03:13:31 -04:00
Matt Enlow 20095bafe0 Better editor entry
Ref #2308

- Double clicking a PostItemView on the content screen will open that post
  in the editor.
- Added `'ctrl+e, command+e': 'openEditor'` shortcut will open editor as well
2014-06-23 10:15:06 -06:00
Maurice Williams 385afefb46 Re-implementing the loading indicator for the Ember admin
closes #2855 , closes #2848
- New  mixin that utilizes NProgress for displaying a loading indictor for all routes who's model issue a "loading" event (aka: when requesting data from the server during a route change).
- Also removing (the now unnecessary) "loading" template.
2014-06-23 10:01:33 -04:00
Hannah Wolfe f6db00b0e1 Merge pull request #3002 from novaugust/shortcuts
Implement Shortcuts in Ember
2014-06-21 15:15:50 +01:00
Hannah Wolfe ebf8d2dfda Remove limit from ember post API calls
ref #3004

- this is unnecessary and causing bugs
2014-06-20 11:40:32 +01:00
Matt Enlow 2da97808a5 Implement Shortcuts in Ember
Closes #2988, #2752
Ref #1463, #2984,
 # Shortcuts via Keymaster
- Added KeyMaster to bower dependencies. KeyMaster is a minimal keyboard
  shortcuts library.
- Added `ShortcutsRouteMixin` for routes that will use shortcuts.
  Currently, only routes can have shortcuts. See the extensive comment
  at the top of `core/client/mixins/shortcuts-route.js` for a
  description of how to implement shortcuts.

 ## Other Changes
- Injected popover service into ApplicationRoute
- Created `EditorRouteBase` mixin for the `editor.new` and
  `editor.edit` routes to mixin.
- `StyleBodyMixin` now calls `this._super()` on `activate` and
  `deactivate` to play nicely with other mixins.

 ## Shortcuts and Stubs implemented
 #### Application-Wide
- `'esc':'closePopups'` shortcut **stub** to close popovers,
 modals, and notifcations

 #### Editor Shortcuts
- `'ctrl+s, command+s': 'save'` note that `command` is the
  `meta` key.
- `'ctrl+alt+p': 'publish'`
- `'ctrl+alt+z': 'toggleZenMode'`
2014-06-19 15:07:42 -06:00
David Arvelo 4b7bf58ffa Infinite Scroll on Posts List
closes #2414
- Add PostsController with loadNextPage action
- Collect and store pagination info from PostsRoute into PostsController
- Use `store.filter` on PostsRoute model hook to auto-update posts list template as post models are added to the store
- Add content list view and use it to check for scroll event
- Make PostRoute only load a post that's already in the store, until we figure how to load multiple pages on refresh
- Add util function from clientold that concats error messages from server response
2014-05-30 22:14:45 -04:00
Jacob Gable 20bd112e6d Ember Data with Posts
Ref #2699

- Introduce ember data dependency
- Add loadInitializers and refactor most initializers into one combined
- Add Post ember data model
- Refactor generateSlug to use title of post and ghostPaths
- Refactor post controller to not reference model.property everywhere
- Use RESTAdapter for posts, users and tags
- Setup author and tag relations in Post model
- Fix broken API calls by adding CSRF header
- Add initiaizer for csrf value
- Use actual User model for current user initializer
- Add action for setting featured post, test with actual api call
- Fix the sending of UUID's up to the server
- Refactor current-user to use ember-data store
- If a user is preloaded in the application, use pushPayload to put it
in the store
- Do a lookup on the store to get an actual User model for injection
- Fix posts/post controllerName in route/new.js
- Alter signup process to push user into ember data store
2014-05-29 07:42:51 -05:00
Matt Enlow b18c36259b Create Post Settings Menu and its functionality on the Post controller.
closes #2419
- Added blur-text-field component, which fires actions on focusOut
- Added utils/date-formatting for moment & date functionality  consolidation
- Added functionality to PostsPostController
- Added fixtures: posts/3 & posts/4, posts/slug/test%20title/
- Added Post model saving
- Set posts.post as controller for EditorRoute
- Added PostSettingsMenuView and template
- Added "showErrors" convenience method to notifications
2014-04-20 13:28:43 -06:00
Manuel Mitasch 745f8379a1 Ember.js: User fixtures + injection + login
* Adding **user fixtures** for signin

* Adds an initializer for the **current logged in user**.
The created singleton object is injected into all controllers + routes.
It can be used inside routes + controllers with this.get('user').
For simple development the object is instanciated with a userFixture.
Once a proper login and api mock is in place, the fixture needs to be removed.

* Added **route 'login'** on url '/ghost/ember/signin'
* Added authenticated route with an error hook that redirects to the login route, if status 401 (unauthorized) is returned from REST API.
* All "secure" routes now extend from authenticated route
* Add /ghost/ember to noAuthNeeded routes in middleware
2014-03-12 19:26:47 +01:00
Manuel Mitasch fba798b27b Amend fixtures & put body classes in styleBody mixin
- Change fixture response of posts route to actual format.
- Extracted classNames logic of routes into style-body mixin.
- Additionally replaced all double-quotes with single-quotes for style conformance.
2014-03-09 15:30:54 +00:00
Manuel Mitasch 805aad31ca Add admin prototype
issue #2270

- from https://github.com/manuelmitasch/ghost-admin-ember-demo
- Not working properly: added ic-ajax mock in app.js but promise not resolving => loading route always active
2014-03-07 14:01:26 +00:00