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
22* http://www.bjornblog.com/web/jquery-store-locator-plugin
33* Copyright (c) 2016 Bjorn Holine; Licensed MIT */
44
869869 paginationSetup : function ( currentPage ) {
870870 this . writeDebug ( 'paginationSetup' , arguments ) ;
871871 var pagesOutput = '' ;
872- var totalPages = locationset . length / this . settings . locationsPerPage ;
872+ var totalPages ;
873873 var $paginationList = $ ( '.bh-sl-pagination-container .bh-sl-pagination' ) ;
874874
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+
875882 // Current page check
876883 if ( typeof currentPage === 'undefined' ) {
877884 currentPage = 0 ;
23772384 } ) ;
23782385
23792386 // 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 ) ;
23822389
23832390 // Visible markers list
23842391 if ( _this . settings . visibleMarkersList === true ) {
Original file line number Diff line number Diff line change @@ -36,8 +36,10 @@ filtering.
3636## Changelog
3737
3838### Version 2.6.2
39+
3940* 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.
4143* Removed form markup from initial query string example index file as it's not needed until the submission page.
4244
4345### Version 2.6.1
Original file line number Diff line number Diff line change 866866 paginationSetup : function ( currentPage ) {
867867 this . writeDebug ( 'paginationSetup' , arguments ) ;
868868 var pagesOutput = '' ;
869- var totalPages = locationset . length / this . settings . locationsPerPage ;
869+ var totalPages ;
870870 var $paginationList = $ ( '.bh-sl-pagination-container .bh-sl-pagination' ) ;
871871
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+
872879 // Current page check
873880 if ( typeof currentPage === 'undefined' ) {
874881 currentPage = 0 ;
23742381 } ) ;
23752382
23762383 // 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 ) ;
23792386
23802387 // Visible markers list
23812388 if ( _this . settings . visibleMarkersList === true ) {
You can’t perform that action at this time.
0 commit comments