Skip to content

Commit

Permalink
v5.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Kris-B committed Apr 28, 2016
1 parent 4a0e284 commit 3809641
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 26 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nanogallery",
"version": "5.9.1",
"version": "5.10.0",
"homepage": "http://nanogallery.brisbois.fr",
"authors": [
"Christophe Brisbois"
Expand Down
12 changes: 12 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@ nanoGALLERY - jQuery plugin
ChangeLog
------

v5.10.0
------

##### New options
- **paginationVisiblePages**: thumbnail pagination - maximum visible pages.
*integer; Default: 10*
- content source nanoPhotosProvider now supports options `albumList`, `whiteList`, `blackList`, `album`

##### Misc
- spanish translation (thanks to eae710 - https://github.com/eae710)


v5.9.1
------

Expand Down
2 changes: 1 addition & 1 deletion demonstration.html
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@
//paginationMaxItemsPerPage:3,
paginationMaxLinesPerPage:1,
// paginationDots : true,
paginationVisiblePages: 4,
paginationVisiblePages: 10,
thumbnailHoverEffect:'imageInvisible,imageScale150',
viewerDisplayLogo:true,
useTags:false,
Expand Down
14 changes: 7 additions & 7 deletions dist/jquery.nanogallery.min.js

Large diffs are not rendered by default.

44 changes: 29 additions & 15 deletions jquery.nanogallery.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**!
* @preserve nanoGALLERY v5.9.2beta
* @preserve nanoGALLERY v5.10.0
* Plugin for jQuery by Christophe Brisbois
* Demo: http://nanogallery.brisbois.fr
* Sources: https://github.com/Kris-B/nanoGALLERY
Expand All @@ -22,15 +22,15 @@

/*
nanoGALLERY v5.9.2beta release notes.
nanoGALLERY v5.10.0 release notes.
##### New options
- **paginationVisiblePages**: maximum visible pages.
- **paginationVisiblePages**: thumbnail pagination - maximum visible pages.
*integer; Default: 10*
- nanoPhotosProvider now supports options `albumList`, `whiteList`, `blackList`, `album`
- content source nanoPhotosProvider now supports options `albumList`, `whiteList`, `blackList`, `album`
##### Misc
- spanish translation (thanks to eae710 - https://github.com/eae710)
- spanish translation (thanks to eae710 - https://github.com/eae710)
**Visit nanoGALLERY homepage for usage details: [http://nanogallery.brisbois.fr](http://www.nanogallery.brisbois.fr/)**
Expand Down Expand Up @@ -5059,20 +5059,28 @@ console.log(url);
n2=Math.ceil(G.I[albumIdx].contentLength/(G.pgMaxLinesPerPage*G.pgMaxNbThumbnailsPerRow));
}


var vp=G.O.paginationVisiblePages;

var lastPage=n2;
// no previous/next
if( !G.O.paginationDots ) {
if( pageNumber >= (vp/2) ) {
firstPage=pageNumber-(vp/2)+1;
if( n2 > pageNumber+(G.O.paginationVisiblePages/2)+1 ) {
n2=pageNumber+(G.O.paginationVisiblePages/2)+1;
}
var vp=G.O.paginationVisiblePages;
if( vp >= n2 ) {
firstPage=0;
}
else {
if( n2 > G.O.paginationVisiblePages ) {
n2=G.O.paginationVisiblePages;
// we have more pages than we want to display
if( isOdd(vp) ) {
firstPage=pageNumber-(vp-1)/2;
lastPage=pageNumber+(vp-1)/2;
}
else {
firstPage=pageNumber - vp/2;
lastPage=pageNumber + Math.max((vp/2-1),1);
}
if( lastPage >= n2 ) {
firstPage=n2-vp;
}
if( firstPage < 0 ) {
firstPage=0;
}
}
}
Expand All @@ -5099,6 +5107,10 @@ console.log(url);
}
renderGallery(aIdx,pn);
});

if( (i-firstPage) >= (vp-1) ) {
break;
}

}

Expand All @@ -5114,6 +5126,8 @@ console.log(url);

}

function isOdd(num) { return (num % 2) == 1;}

function paginationNextPage() {
var aIdx=G.$E.conPagin.data('galleryIdx'),
n1=0;
Expand Down
2 changes: 1 addition & 1 deletion nanogallery.jquery.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"touchscreen",
"RTL"
],
"version": "5.9.1",
"version": "5.10.0",
"author": {
"name": "Kris_B",
"url": "http://www.brisbois.fr"
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": "nanogallery",
"version": "5.9.1",
"version": "5.10.0",
"homepage": "http://nanogallery.brisbois.fr",
"author": "Christophe Brisbois <[email protected]>",
"description": "image gallery simplified - jQuery plugin",
Expand Down

0 comments on commit 3809641

Please sign in to comment.