emberjs/ember.js — pull request #4785 by huafu (2014-04-29 04:32:09+00:00)
Title: [FEATURE] Sort order per proeprty in Sortable mixin

This is a non breaking change that would allow one to specify a different sort order per property in `sortProperties` array.

Let's say you have an array of users each of who has a weight. Weight can be the same for 2 users so then one would want the order to use the names, and logically the user with the most weight should be on the top of the list. With this feature it's possible now by adding a `!` in front of the property which needs to be inverted before being included in the sort order:

```javascript
sortProperties: ['!weight', 'name'],
```

Basically the `Sortable` mixin has the same behaviour as before (related to `sortProperties` and `sortAscending`) except that now you can prepend one or more property name(s) in `sortProperties` array with a `!` so that for that property(ies) the order function will work the other way around.