Commit Graph

15 Commits

Author SHA1 Message Date
Jacob Gable
5abeadf80d 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
Jacob Gable
f795a907f0 Add ghostPaths util and initializer
No Issue

- Move the ghostPaths from base model to utils
- Add initializer that injects it into every route, model and controller
- Add a adminUrl and apiUrl helper method
2014-05-24 08:52:47 +02:00
Hannah Wolfe
e30ea91234 Merge pull request #2764 from jgable/emberSignin
Improve signin
2014-05-18 15:56:54 +01:00
Fabian Becker
f64203cdf7 Correct behaviour for trailing slashes
fixes #2741
- Extend HistoryLocation
- Add trailing slash to path
2014-05-15 22:28:05 +00:00
Jacob Gable
42a1d55858 Improve signin
Ref #2413

- Remove fixture and use actual API
- Store and send down actual logged in user data
- Refactor isLoggedIn to use computed property on application
- After signin, update user data in dependency container
- Add CSRF to all routes and controllers via initializer
- Update authenticated route to check for user.isLoggedIn
- Add notifications for signin error
- Add notifications.showAPIError helper
- Add plumbing for refreshless signup to doSignUp in admin controller
2014-05-15 09:18:43 -05:00
Hannah Wolfe
fd8837511f Merge pull request #2472 from halfdan/ember-notifications-2417
[Ember.js] Implement Notifications for Ember
2014-04-16 20:03:00 +01:00
Fabian Becker
a4f8088697 Implement Notifications for Ember
closes #2417
- Adds Notification(s)Component
- Render notifications in application.hbs
- Adds handleError in application route
2014-04-09 00:36:15 +00:00
Peter Szel
39ae3869a1 Added fancy fade-in effect and autofocus to the login pages (signin, signup, forgotten, reset).
- Added CSS to implement the fade in effect.
- Added 'autofocus' to the attribute bindings of the TextField so they accept it.
2014-04-08 00:02:54 +02:00
Robert Jackson
3a912bd89e Refactor navbar to eliminate nested {{link-to}}.
no related issue

This is essentially setting up a binding from the `LinkView`'s `active`
status and whatever is set as `alternativeActive` in the `{{link-to}}`
(in our case the `activating-list-item` component.

Screenshots showing that the proper CSS classes are given:

![screenshot](http://monosnap.com/image/tzOH6n82rIVGNEFAUWVOLN52QuASQ4.png)

![screenshot](http://monosnap.com/image/5gmcwJcj0kgEXt8lnET4OKgIZ8KRpH.png)

![screenshot](http://monosnap.com/image/UCVNukTXLMNfVneLhzwVyhkrVlGSBt.png)
2014-04-01 22:36:16 -04:00
Manuel Mitasch
dddae8e257 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
49ea71ed4f 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
Taras Mankovski
a89f38c165 Minor refactoring of the routers:
- Moved post route under posts resource
- Changed ajax to use ic.ajax.request instead of ic.ajax.raw
2014-03-07 14:01:27 +00:00
Manuel Mitasch
47bfd046bb 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
Harry Wolff
4334c3deb6 Move Ember Admin to use es6 modules
- adds required dependencies to package.json
 and to bower.json
- added required Grunt tasks to transpile and
 concat ember admin files
2014-02-26 23:48:54 -05:00
Harry Wolff
2295c9470b Add basic template for Ghost admin in Ember
Inspired and derived from:

https://github.com/taras/Ghost/compare/ember-admin
https://github.com/manuelmitasch/ghost-admin-ember-demo
https://github.com/stefanpenner/ember-app-kit
2014-02-26 20:39:45 -05:00