Skip to content
This repository has been archived by the owner on Jul 4, 2021. It is now read-only.

Commit

Permalink
removing query parameters for totalPages and totalRecords state
Browse files Browse the repository at this point in the history
  • Loading branch information
ehteshamkafeel committed May 25, 2016
1 parent 580512e commit dee85d0
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lib/backbone.paginator.js
Expand Up @@ -1174,7 +1174,7 @@
var queryParams = this.mode == "client" ?
_pick(this.queryParams, "sortKey", "order") :
_omit(_pick(this.queryParams, _keys(PageableProto.queryParams)),
"directions");
"directions", "totalPages", "totalRecords");

var thisCopy = _.clone(this);
_.each(queryParams, function (v, k) {
Expand Down
4 changes: 1 addition & 3 deletions test/infinite-pageable.js
Expand Up @@ -113,9 +113,7 @@ $(document).ready(function () {
strictEqual(this.ajaxSettings.url, "url");
deepEqual(this.ajaxSettings.data, {
page: 2,
"per_page": 2,
"total_entries": 4,
"total_pages": 2
"per_page": 2
});

this.ajaxSettings.success([
Expand Down
4 changes: 0 additions & 4 deletions test/server-pageable.js
Expand Up @@ -295,8 +295,6 @@ $(document).ready(function () {
page: 0,
"per_page": 50,
"sort_by": "name",
"total_entries": 50,
"total_pages": 1,
"access_token": 1
});

Expand Down Expand Up @@ -324,8 +322,6 @@ $(document).ready(function () {
"per_page": 50,
"sort_by": ["firstSort", "secondSort"],
"order_test": ["asc", "desc"],
"total_entries": 50,
"total_pages": 1,
"access_token": 1
});

Expand Down

0 comments on commit dee85d0

Please sign in to comment.