From 98594f3da7e71f444dc40e3f5f45617c673d06e0 Mon Sep 17 00:00:00 2001 From: Michael Bromley Date: Wed, 24 Feb 2016 11:58:19 +0100 Subject: [PATCH] Update to v0.10.1 See release notes --- bower.json | 2 +- dirPagination.js | 12 ++++++++++++ package.js | 2 +- package.json | 2 +- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/bower.json b/bower.json index 5887b17..2e8d978 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "angularUtils-pagination", - "version": "0.10.0", + "version": "0.10.1", "homepage": "https://github.com/michaelbromley/angularUtils/tree/master/src/directives/pagination", "authors": [ "Michael Bromley " diff --git a/dirPagination.js b/dirPagination.js index f4194f4..361a18b 100644 --- a/dirPagination.js +++ b/dirPagination.js @@ -89,6 +89,7 @@ } }); } else { + paginationService.setAsyncModeFalse(paginationId); scope.$watchCollection(function() { return collectionGetter(scope); }, function(collection) { @@ -260,6 +261,13 @@ total: 1 }; + scope.$watch('maxSize', function(val) { + if (val) { + paginationRange = Math.max(scope.maxSize, 5); + generatePagination(); + } + }); + scope.$watch(function() { if (paginationService.isRegistered(paginationId)) { return (paginationService.getCollectionLength(paginationId) + 1) * paginationService.getItemsPerPage(paginationId); @@ -550,6 +558,10 @@ instances[instanceId].asyncMode = true; }; + this.setAsyncModeFalse = function(instanceId) { + instances[instanceId].asyncMode = false; + }; + this.isAsyncMode = function(instanceId) { return instances[instanceId].asyncMode; }; diff --git a/package.js b/package.js index d8afdba..6e48a43 100644 --- a/package.js +++ b/package.js @@ -1,7 +1,7 @@ Package.describe({ name: 'angularutils:pagination', summary: 'Magical automatic pagination for anything in AngularJS', - version: '0.10.0', + version: '0.10.1', git: 'https://github.com/michaelbromley/angularUtils-pagination' }); diff --git a/package.json b/package.json index c039b01..c9e43d0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "angular-utils-pagination", - "version": "0.10.0", + "version": "0.10.1", "description": "Magical automatic pagination for anything in AngularJS", "main": "index.js", "scripts": {