File tree Expand file tree Collapse file tree 4 files changed +27
-11
lines changed
dist/assets/js/plugins/storeLocator Expand file tree Collapse file tree 4 files changed +27
-11
lines changed Original file line number Diff line number Diff line change 1
- /*! jQuery Google Maps Store Locator - v2.6.2 - 2016-07-16
1
+ /*! jQuery Google Maps Store Locator - v2.6.2 - 2016-07-19
2
2
* http://www.bjornblog.com/web/jquery-store-locator-plugin
3
3
* Copyright (c) 2016 Bjorn Holine; Licensed MIT */
4
4
869
869
paginationSetup : function ( currentPage ) {
870
870
this . writeDebug ( 'paginationSetup' , arguments ) ;
871
871
var pagesOutput = '' ;
872
- var totalPages = locationset . length / this . settings . locationsPerPage ;
872
+ var totalPages ;
873
873
var $paginationList = $ ( '.bh-sl-pagination-container .bh-sl-pagination' ) ;
874
874
875
+ // Total pages
876
+ if ( this . settings . storeLimit === - 1 || locationset . length < this . settings . storeLimit ) {
877
+ totalPages = locationset . length / this . settings . locationsPerPage ;
878
+ } else {
879
+ totalPages = this . settings . storeLimit / this . settings . locationsPerPage ;
880
+ }
881
+
875
882
// Current page check
876
883
if ( typeof currentPage === 'undefined' ) {
877
884
currentPage = 0 ;
2377
2384
} ) ;
2378
2385
2379
2386
// Add the list li background colors - this wil be dropped in a future version in favor of CSS
2380
- $ ( '.' + _this . settings . locationList + ' ul li:even' ) . css ( 'background' , _this . settings . listColor1 ) ;
2381
- $ ( '.' + _this . settings . locationList + ' ul li:odd' ) . css ( 'background' , _this . settings . listColor2 ) ;
2387
+ $ ( '.' + _this . settings . locationList + ' ul > li:even' ) . css ( 'background' , _this . settings . listColor1 ) ;
2388
+ $ ( '.' + _this . settings . locationList + ' ul > li:odd' ) . css ( 'background' , _this . settings . listColor2 ) ;
2382
2389
2383
2390
// Visible markers list
2384
2391
if ( _this . settings . visibleMarkersList === true ) {
Original file line number Diff line number Diff line change @@ -36,8 +36,10 @@ filtering.
36
36
## Changelog
37
37
38
38
### Version 2.6.2
39
+
39
40
* Added callbackMapSet callback that fires after the map has been set up.
40
- * Fixed issue where locations without attributes could get those attribute values from prior locations.
41
+ * Fixed issue where locations without attributes set could get the attribute values from prior locations.
42
+ * Fixed issue where pagination total number of pages was based on the full location set total instead of the storeLimit setting.
41
43
* Removed form markup from initial query string example index file as it's not needed until the submission page.
42
44
43
45
### Version 2.6.1
Original file line number Diff line number Diff line change 866
866
paginationSetup : function ( currentPage ) {
867
867
this . writeDebug ( 'paginationSetup' , arguments ) ;
868
868
var pagesOutput = '' ;
869
- var totalPages = locationset . length / this . settings . locationsPerPage ;
869
+ var totalPages ;
870
870
var $paginationList = $ ( '.bh-sl-pagination-container .bh-sl-pagination' ) ;
871
871
872
+ // Total pages
873
+ if ( this . settings . storeLimit === - 1 || locationset . length < this . settings . storeLimit ) {
874
+ totalPages = locationset . length / this . settings . locationsPerPage ;
875
+ } else {
876
+ totalPages = this . settings . storeLimit / this . settings . locationsPerPage ;
877
+ }
878
+
872
879
// Current page check
873
880
if ( typeof currentPage === 'undefined' ) {
874
881
currentPage = 0 ;
2374
2381
} ) ;
2375
2382
2376
2383
// Add the list li background colors - this wil be dropped in a future version in favor of CSS
2377
- $ ( '.' + _this . settings . locationList + ' ul li:even' ) . css ( 'background' , _this . settings . listColor1 ) ;
2378
- $ ( '.' + _this . settings . locationList + ' ul li:odd' ) . css ( 'background' , _this . settings . listColor2 ) ;
2384
+ $ ( '.' + _this . settings . locationList + ' ul > li:even' ) . css ( 'background' , _this . settings . listColor1 ) ;
2385
+ $ ( '.' + _this . settings . locationList + ' ul > li:odd' ) . css ( 'background' , _this . settings . listColor2 ) ;
2379
2386
2380
2387
// Visible markers list
2381
2388
if ( _this . settings . visibleMarkersList === true ) {
You can’t perform that action at this time.
0 commit comments