Permalink
Browse files

Merge branch 'master' of git://github.com/addyosmani/backbone.paginator

  • Loading branch information...
2 parents 4b91ad4 + 45a159b commit 4a593f8fbca84273367fbdc7601c0c8d95f08ae2 @alexandernst alexandernst committed Jun 1, 2012
Showing with 7 additions and 2 deletions.
  1. +7 −2 examples/netflix-request-paging/collections/PaginatedCollection.js
@@ -64,7 +64,12 @@
'$skip': function() { return this.currentPage * this.perPage },
// field to sort by
- '$orderby': 'ReleaseYear',
+ '$orderby': function() {
+ if(this.sortField === undefined)
+ return 'ReleaseYear';
+ return this.sortField;
+ },
+
// what format would you like to request results in?
'$format': 'json',
@@ -87,4 +92,4 @@
});
-})( app.collections, app.models.Item, Backbone.Paginator);
+})( app.collections, app.models.Item, Backbone.Paginator);

0 comments on commit 4a593f8

Please sign in to comment.