Skip to content
This repository has been archived by the owner on Nov 12, 2019. It is now read-only.

Commit

Permalink
Fix for bug with changing pages
Browse files Browse the repository at this point in the history
  • Loading branch information
pavel-luhin committed Jun 30, 2016
1 parent ed2cfa4 commit 364bf44
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,7 @@ angular.module('sms-server').controller('StatisticsController', ['$scope', '$htt
};

var changePage = function (targetPage) {
if (targetPage > currentPage) {
skip = currentPage * currentPageSize.value;
} else {
skip = skip - targetPage * currentPageSize.value
}
skip = (targetPage - 1) * currentPageSize.value;

currentPage = targetPage;
recalculatePages();
Expand Down

0 comments on commit 364bf44

Please sign in to comment.