Skip to content

Commit

Permalink
Update to v0.10.0
Browse files Browse the repository at this point in the history
See release notes
  • Loading branch information
michaelbromley committed Jan 22, 2016
1 parent e8d49a2 commit 33bb22b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angularUtils-pagination",
"version": "0.9.4",
"version": "0.10.0",
"homepage": "https://github.com/michaelbromley/angularUtils/tree/master/src/directives/pagination",
"authors": [
"Michael Bromley <[email protected]>"
Expand Down
14 changes: 11 additions & 3 deletions dirPagination.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,9 @@

if (!paginationService.isRegistered(paginationId) && !paginationService.isRegistered(rawId)) {
var idMessage = (paginationId !== DEFAULT_ID) ? ' (id: ' + paginationId + ') ' : ' ';
console.warn('Pagination directive: the pagination controls' + idMessage + 'cannot be used without the corresponding pagination directive, which was not found at link time.');
if (window.console) {
console.warn('Pagination directive: the pagination controls' + idMessage + 'cannot be used without the corresponding pagination directive, which was not found at link time.');
}
}

if (!scope.maxSize) { scope.maxSize = 9; }
Expand Down Expand Up @@ -309,13 +311,19 @@

function goToPage(num) {
if (paginationService.isRegistered(paginationId) && isValidPageNumber(num)) {
var oldPageNumber = scope.pagination.current;

scope.pages = generatePagesArray(num, paginationService.getCollectionLength(paginationId), paginationService.getItemsPerPage(paginationId), paginationRange);
scope.pagination.current = num;
updateRangeValues();

// if a callback has been set, then call it with the page number as an argument
// if a callback has been set, then call it with the page number as the first argument
// and the previous page number as a second argument
if (scope.onPageChange) {
scope.onPageChange({ newPageNumber : num });
scope.onPageChange({
newPageNumber : num,
oldPageNumber : oldPageNumber
});
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion package.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package.describe({
name: 'angularutils:pagination',
summary: 'Magical automatic pagination for anything in AngularJS',
version: '0.9.4',
version: '0.10.0',
git: 'https://github.com/michaelbromley/angularUtils-pagination'
});

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-utils-pagination",
"version": "0.9.4",
"version": "0.10.0",
"description": "Magical automatic pagination for anything in AngularJS",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 33bb22b

Please sign in to comment.