Skip to content

Commit e3861b1

Browse files
committed
Fixed issues with visibleMarkersList and location list background colors and selection
1 parent 8619385 commit e3861b1

File tree

7 files changed

+28
-16
lines changed

7 files changed

+28
-16
lines changed

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jquery-storelocator-plugin",
3-
"version": "2.5.0",
3+
"version": "2.5.1",
44
"description": "This jQuery plugin takes advantage of Google Maps API version 3 to create an easy to implement store locator. No back-end programming is required, you just need to feed it KML, XML, or JSON data with all the location information.",
55
"repository": {
66
"type": "git",

dist/assets/js/plugins/storeLocator/jquery.storelocator.js

+9-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! jQuery Google Maps Store Locator - v2.5.0 - 2016-03-06
1+
/*! jQuery Google Maps Store Locator - v2.5.1 - 2016-03-12
22
* http://www.bjornblog.com/web/jquery-store-locator-plugin
33
* Copyright (c) 2016 Bjorn Holine; Licensed MIT */
44

@@ -1711,6 +1711,10 @@
17111711
$('.' + _this.settings.locationList + ' ul').append(listHtml);
17121712
}
17131713
});
1714+
1715+
// Re-add the list background colors
1716+
$('.' + this.settings.locationList + ' ul li:even').css('background', this.settings.listColor1);
1717+
$('.' + this.settings.locationList + ' ul li:odd').css('background', this.settings.listColor2);
17141718
},
17151719

17161720
/**
@@ -2206,10 +2210,6 @@
22062210
_this.settings.callbackListClick.call(this, markerId, selectedMarker);
22072211
}
22082212

2209-
// Focus on the list
2210-
$('.' + _this.settings.locationList + ' li').removeClass('list-focus');
2211-
$('.' + _this.settings.locationList + ' li[data-markerid=' + markerId + ']').addClass('list-focus');
2212-
22132213
map.panTo(selectedMarker.getPosition());
22142214
var listLoc = 'left';
22152215
if (_this.settings.bounceMarker === true) {
@@ -2228,6 +2228,10 @@
22282228
if (_this.settings.selectedMarkerImg !== null) {
22292229
_this.changeSelectedMarker(selectedMarker);
22302230
}
2231+
2232+
// Focus on the list
2233+
$('.' + _this.settings.locationList + ' li').removeClass('list-focus');
2234+
$('.' + _this.settings.locationList + ' li[data-markerid=' + markerId + ']').addClass('list-focus');
22312235
});
22322236
}
22332237

dist/assets/js/plugins/storeLocator/jquery.storelocator.min.js

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jquery-storelocator-plugin",
3-
"version": "2.5.0",
3+
"version": "2.5.1",
44
"description": "This jQuery plugin takes advantage of Google Maps API version 3 to create an easy to implement store locator. No back-end programming is required, you just need to feed it KML, XML, or JSON data with all the location information.",
55
"repository": {
66
"type": "git",

readme.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,13 @@ filtering.
3535

3636
## Changelog
3737

38+
### Version 2.5.1
39+
40+
* Fixed issues with visibleMarkersList and location list background colors and selection.
41+
3842
### Version 2.5.0
3943

40-
* Added new dragSearch setting which peforms a new search when the map is dragged when enabled.
44+
* Added new dragSearch setting which performs a new search when the map is dragged when enabled.
4145
* Added new geocodeID setting so that the HTML geocoding API can be triggered by a button instead of firing automatically.
4246
* Fixed issues with no results where clicking the marker would display data from the previous result and clicking the location list item would throw an error.
4347
* Merged in pull request from [hawkmeister](https://github.com/hawkmeister) with update to bower.json file with main property.

src/js/jquery.storelocator.js

+8-4
Original file line numberDiff line numberDiff line change
@@ -1708,6 +1708,10 @@
17081708
$('.' + _this.settings.locationList + ' ul').append(listHtml);
17091709
}
17101710
});
1711+
1712+
// Re-add the list background colors
1713+
$('.' + this.settings.locationList + ' ul li:even').css('background', this.settings.listColor1);
1714+
$('.' + this.settings.locationList + ' ul li:odd').css('background', this.settings.listColor2);
17111715
},
17121716

17131717
/**
@@ -2203,10 +2207,6 @@
22032207
_this.settings.callbackListClick.call(this, markerId, selectedMarker);
22042208
}
22052209

2206-
// Focus on the list
2207-
$('.' + _this.settings.locationList + ' li').removeClass('list-focus');
2208-
$('.' + _this.settings.locationList + ' li[data-markerid=' + markerId + ']').addClass('list-focus');
2209-
22102210
map.panTo(selectedMarker.getPosition());
22112211
var listLoc = 'left';
22122212
if (_this.settings.bounceMarker === true) {
@@ -2225,6 +2225,10 @@
22252225
if (_this.settings.selectedMarkerImg !== null) {
22262226
_this.changeSelectedMarker(selectedMarker);
22272227
}
2228+
2229+
// Focus on the list
2230+
$('.' + _this.settings.locationList + ' li').removeClass('list-focus');
2231+
$('.' + _this.settings.locationList + ' li[data-markerid=' + markerId + ']').addClass('list-focus');
22282232
});
22292233
}
22302234

storelocator.jquery.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"title": "jQuery Google Maps Store Locator",
44
"description": "This jQuery plugin takes advantage of Google Maps API version 3 to create an easy to implement store locator. No back-end programming is required, you just need to feed it KML, XML, or JSON data with all the location information.",
55
"keywords": ["jquery","locator","store", "location", "locations", "maps", "map", "stores", "find"],
6-
"version": "2.5.0",
6+
"version": "2.5.1",
77
"author": {
88
"name": "Bjorn Holine",
99
"url": "http://www.bjornblog.com/"

0 commit comments

Comments
 (0)