wireload/screenly-ose — pull request #230 by richard-to (2014-10-10 01:54:02+00:00)
Title: GH-229 - Partially fix asset order issue on client-side

This resolves part of the issue with GH-229. The behavior should now be the same as the current server-side behavior. I also added a basic unit test to test this behavior on the Assets collection.

**Current Server-side behavior**

When active assets are re-ordered, the new order of active assets is saved using the API endpoint `/api/assets/order`

**New Client-side behavior**

When active assets are re-ordered, the new order of active assets is updated on the server side by sorting the collection of assets using the `play_order` attribute, which I added to the Asset model.

----

Note that the some behavior is still left unchanged.

If an asset is set from `enabled` to `disabled`, it's old `play_order` is retained. It's unclear what the actual behavior should be.

This also occurs when the asset becomes `inactive`. In this case, the `play_order` is still retained and not reset.

For example:

1. You have the following assets order like `A, B, C, D`
2. Disable `C`
3. Enable `C`
4. Result is `A, B, C, D`