TryGhost/Ghost — pull request #2884 by appleYaks (2014-06-05 00:17:26+00:00)
Title: Auto-sorting of posts list; Allow getting posts/drafts from API

closes #2883
Create a sorting function in PostsController for out-of-order loading
Permit getting a draft post from the API
Permit getting a post from the API in EditorRoute and PostsPostRoute
Refresh updated posts on PostsIndexRoute to make PostsList highlight the latest draft

Currently it fails two tests:

* [it can't retrieve a draft post](https://github.com/TryGhost/Ghost/blob/master/core/test/functional/routes/api/posts_test.js#L308)
* [it can't retrieve a draft page](https://github.com/TryGhost/Ghost/blob/master/core/test/functional/routes/api/posts_test.js#L326)