|
1 |
| -/*! jQuery Google Maps Store Locator - v2.7.2 - 2016-12-03 |
| 1 | +/*! jQuery Google Maps Store Locator - v2.7.3 - 2017-03-21 |
2 | 2 | * http://www.bjornblog.com/web/jquery-store-locator-plugin
|
3 |
| -* Copyright (c) 2016 Bjorn Holine; Licensed MIT */ |
| 3 | +* Copyright (c) 2017 Bjorn Holine; Licensed MIT */ |
4 | 4 |
|
5 | 5 | ;(function ($, window, document, undefined) {
|
6 | 6 | 'use strict';
|
|
19 | 19 |
|
20 | 20 | // Create the defaults once. DO NOT change these settings in this file - settings should be overridden in the plugin call
|
21 | 21 | var defaults = {
|
22 |
| - 'mapID' : 'bh-sl-map', |
23 |
| - 'locationList' : 'bh-sl-loc-list', |
24 |
| - 'formContainer' : 'bh-sl-form-container', |
25 |
| - 'formID' : 'bh-sl-user-location', |
26 |
| - 'addressID' : 'bh-sl-address', |
27 |
| - 'regionID' : 'bh-sl-region', |
28 |
| - 'mapSettings' : { |
29 |
| - zoom : 12, |
30 |
| - mapTypeId: google.maps.MapTypeId.ROADMAP |
31 |
| - }, |
32 |
| - 'markerImg' : null, |
33 |
| - 'markerDim' : null, |
34 |
| - 'catMarkers' : null, |
35 |
| - 'selectedMarkerImg' : null, |
36 |
| - 'selectedMarkerImgDim' : null, |
37 |
| - 'disableAlphaMarkers' : false, |
38 |
| - 'lengthUnit' : 'm', |
39 |
| - 'storeLimit' : 26, |
40 |
| - 'distanceAlert' : 60, |
41 |
| - 'dataType' : 'xml', |
42 |
| - 'dataLocation' : 'data/locations.xml', |
43 |
| - 'dataRaw' : null, |
44 |
| - 'xmlElement' : 'marker', |
45 |
| - 'listColor1' : '#ffffff', |
46 |
| - 'listColor2' : '#eeeeee', |
47 |
| - 'originMarker' : false, |
48 |
| - 'originMarkerImg' : null, |
49 |
| - 'originMarkerDim' : null, |
50 |
| - 'bounceMarker' : true, |
51 |
| - 'slideMap' : true, |
52 |
| - 'modal' : false, |
53 |
| - 'overlay' : 'bh-sl-overlay', |
54 |
| - 'modalWindow' : 'bh-sl-modal-window', |
55 |
| - 'modalContent' : 'bh-sl-modal-content', |
56 |
| - 'closeIcon' : 'bh-sl-close-icon', |
57 |
| - 'defaultLoc' : false, |
58 |
| - 'defaultLat' : null, |
59 |
| - 'defaultLng' : null, |
60 |
| - 'autoComplete' : false, |
61 |
| - 'autoCompleteOptions' : {}, |
62 |
| - 'autoGeocode' : false, |
63 |
| - 'geocodeID' : null, |
64 |
| - 'maxDistance' : false, |
65 |
| - 'maxDistanceID' : 'bh-sl-maxdistance', |
66 |
| - 'fullMapStart' : false, |
67 |
| - 'fullMapStartBlank' : false, |
68 |
| - 'fullMapStartListLimit' : false, |
69 |
| - 'noForm' : false, |
70 |
| - 'loading' : false, |
71 |
| - 'loadingContainer' : 'bh-sl-loading', |
72 |
| - 'featuredLocations' : false, |
73 |
| - 'pagination' : false, |
74 |
| - 'locationsPerPage' : 10, |
75 |
| - 'inlineDirections' : false, |
76 |
| - 'nameSearch' : false, |
77 |
| - 'searchID' : 'bh-sl-search', |
78 |
| - 'nameAttribute' : 'name', |
79 |
| - 'visibleMarkersList' : false, |
80 |
| - 'dragSearch' : false, |
81 |
| - 'infowindowTemplatePath' : 'assets/js/plugins/storeLocator/templates/infowindow-description.html', |
82 |
| - 'listTemplatePath' : 'assets/js/plugins/storeLocator/templates/location-list-description.html', |
83 |
| - 'KMLinfowindowTemplatePath': 'assets/js/plugins/storeLocator/templates/kml-infowindow-description.html', |
84 |
| - 'KMLlistTemplatePath' : 'assets/js/plugins/storeLocator/templates/kml-location-list-description.html', |
85 |
| - 'listTemplateID' : null, |
86 |
| - 'infowindowTemplateID' : null, |
87 |
| - 'taxonomyFilters' : null, |
88 |
| - 'taxonomyFiltersContainer' : 'bh-sl-filters-container', |
89 |
| - 'exclusiveFiltering' : false, |
90 |
| - 'querystringParams' : false, |
91 |
| - 'debug' : false, |
92 |
| - 'sessionStorage' : false, |
93 |
| - 'markerCluster' : null, |
94 |
| - 'infoBubble' : null, |
| 22 | + 'mapID' : 'bh-sl-map', |
| 23 | + 'locationList' : 'bh-sl-loc-list', |
| 24 | + 'formContainer' : 'bh-sl-form-container', |
| 25 | + 'formID' : 'bh-sl-user-location', |
| 26 | + 'addressID' : 'bh-sl-address', |
| 27 | + 'regionID' : 'bh-sl-region', |
| 28 | + 'mapSettings': { |
| 29 | + gestureHandling: 'cooperative', |
| 30 | + mapTypeId: google.maps.MapTypeId.ROADMAP, |
| 31 | + zoom: 12 |
| 32 | + }, |
| 33 | + 'markerImg' : null, |
| 34 | + 'markerDim' : null, |
| 35 | + 'catMarkers' : null, |
| 36 | + 'selectedMarkerImg' : null, |
| 37 | + 'selectedMarkerImgDim' : null, |
| 38 | + 'disableAlphaMarkers' : false, |
| 39 | + 'lengthUnit' : 'm', |
| 40 | + 'storeLimit' : 26, |
| 41 | + 'distanceAlert' : 60, |
| 42 | + 'dataType' : 'xml', |
| 43 | + 'dataLocation' : 'data/locations.xml', |
| 44 | + 'dataRaw' : null, |
| 45 | + 'xmlElement' : 'marker', |
| 46 | + 'listColor1' : '#ffffff', |
| 47 | + 'listColor2' : '#eeeeee', |
| 48 | + 'originMarker' : false, |
| 49 | + 'originMarkerImg' : null, |
| 50 | + 'originMarkerDim' : null, |
| 51 | + 'bounceMarker' : true, |
| 52 | + 'slideMap' : true, |
| 53 | + 'modal' : false, |
| 54 | + 'overlay' : 'bh-sl-overlay', |
| 55 | + 'modalWindow' : 'bh-sl-modal-window', |
| 56 | + 'modalContent' : 'bh-sl-modal-content', |
| 57 | + 'closeIcon' : 'bh-sl-close-icon', |
| 58 | + 'defaultLoc' : false, |
| 59 | + 'defaultLat' : null, |
| 60 | + 'defaultLng' : null, |
| 61 | + 'autoComplete' : false, |
| 62 | + 'autoCompleteOptions' : {}, |
| 63 | + 'autoCompleteDisableListener': false, |
| 64 | + 'autoGeocode' : false, |
| 65 | + 'geocodeID' : null, |
| 66 | + 'maxDistance' : false, |
| 67 | + 'maxDistanceID' : 'bh-sl-maxdistance', |
| 68 | + 'fullMapStart' : false, |
| 69 | + 'fullMapStartBlank' : false, |
| 70 | + 'fullMapStartListLimit' : false, |
| 71 | + 'noForm' : false, |
| 72 | + 'loading' : false, |
| 73 | + 'loadingContainer' : 'bh-sl-loading', |
| 74 | + 'featuredLocations' : false, |
| 75 | + 'pagination' : false, |
| 76 | + 'locationsPerPage' : 10, |
| 77 | + 'inlineDirections' : false, |
| 78 | + 'nameSearch' : false, |
| 79 | + 'searchID' : 'bh-sl-search', |
| 80 | + 'nameAttribute' : 'name', |
| 81 | + 'visibleMarkersList' : false, |
| 82 | + 'dragSearch' : false, |
| 83 | + 'infowindowTemplatePath' : 'assets/js/plugins/storeLocator/templates/infowindow-description.html', |
| 84 | + 'listTemplatePath' : 'assets/js/plugins/storeLocator/templates/location-list-description.html', |
| 85 | + 'KMLinfowindowTemplatePath' : 'assets/js/plugins/storeLocator/templates/kml-infowindow-description.html', |
| 86 | + 'KMLlistTemplatePath' : 'assets/js/plugins/storeLocator/templates/kml-location-list-description.html', |
| 87 | + 'listTemplateID' : null, |
| 88 | + 'infowindowTemplateID' : null, |
| 89 | + 'taxonomyFilters' : null, |
| 90 | + 'taxonomyFiltersContainer' : 'bh-sl-filters-container', |
| 91 | + 'exclusiveFiltering' : false, |
| 92 | + 'querystringParams' : false, |
| 93 | + 'debug' : false, |
| 94 | + 'sessionStorage' : false, |
| 95 | + 'markerCluster' : null, |
| 96 | + 'infoBubble' : null, |
95 | 97 | // Callbacks
|
96 |
| - 'callbackNotify' : null, |
97 |
| - 'callbackRegion' : null, |
98 |
| - 'callbackBeforeSend' : null, |
99 |
| - 'callbackSuccess' : null, |
100 |
| - 'callbackModalOpen' : null, |
101 |
| - 'callbackModalReady' : null, |
102 |
| - 'callbackModalClose' : null, |
103 |
| - 'callbackJsonp' : null, |
104 |
| - 'callbackCreateMarker' : null, |
105 |
| - 'callbackPageChange' : null, |
106 |
| - 'callbackDirectionsRequest': null, |
107 |
| - 'callbackCloseDirections' : null, |
108 |
| - 'callbackNoResults' : null, |
109 |
| - 'callbackListClick' : null, |
110 |
| - 'callbackMarkerClick' : null, |
111 |
| - 'callbackFilters' : null, |
112 |
| - 'callbackMapSet' : null, |
| 98 | + 'callbackNotify' : null, |
| 99 | + 'callbackRegion' : null, |
| 100 | + 'callbackBeforeSend' : null, |
| 101 | + 'callbackSuccess' : null, |
| 102 | + 'callbackModalOpen' : null, |
| 103 | + 'callbackModalReady' : null, |
| 104 | + 'callbackModalClose' : null, |
| 105 | + 'callbackJsonp' : null, |
| 106 | + 'callbackCreateMarker' : null, |
| 107 | + 'callbackPageChange' : null, |
| 108 | + 'callbackDirectionsRequest' : null, |
| 109 | + 'callbackCloseDirections' : null, |
| 110 | + 'callbackNoResults' : null, |
| 111 | + 'callbackListClick' : null, |
| 112 | + 'callbackMarkerClick' : null, |
| 113 | + 'callbackFilters' : null, |
| 114 | + 'callbackMapSet' : null, |
113 | 115 | // Language options
|
114 |
| - 'addressErrorAlert' : 'Unable to find address', |
115 |
| - 'autoGeocodeErrorAlert' : 'Automatic location detection failed. Please fill in your address or zip code.', |
116 |
| - 'distanceErrorAlert' : 'Unfortunately, our closest location is more than ', |
117 |
| - 'mileLang' : 'mile', |
118 |
| - 'milesLang' : 'miles', |
119 |
| - 'kilometerLang' : 'kilometer', |
120 |
| - 'kilometersLang' : 'kilometers', |
121 |
| - 'noResultsTitle' : 'No results', |
122 |
| - 'noResultsDesc' : 'No locations were found with the given criteria. Please modify your selections or input.', |
123 |
| - 'nextPage' : 'Next »', |
124 |
| - 'prevPage' : '« Prev' |
| 116 | + 'addressErrorAlert' : 'Unable to find address', |
| 117 | + 'autoGeocodeErrorAlert' : 'Automatic location detection failed. Please fill in your address or zip code.', |
| 118 | + 'distanceErrorAlert' : 'Unfortunately, our closest location is more than ', |
| 119 | + 'mileLang' : 'mile', |
| 120 | + 'milesLang' : 'miles', |
| 121 | + 'kilometerLang' : 'kilometer', |
| 122 | + 'kilometersLang' : 'kilometers', |
| 123 | + 'noResultsTitle' : 'No results', |
| 124 | + 'noResultsDesc' : 'No locations were found with the given criteria. Please modify your selections or input.', |
| 125 | + 'nextPage' : 'Next »', |
| 126 | + 'prevPage' : '« Prev' |
125 | 127 | };
|
126 | 128 |
|
127 | 129 | // Plugin constructor
|
|
200 | 202 | var autoPlaces = new google.maps.places.Autocomplete(searchInput, this.settings.autoCompleteOptions);
|
201 | 203 |
|
202 | 204 | // Add listener when autoComplete selection changes.
|
203 |
| - if (this.settings.autoComplete === true) { |
| 205 | + if (this.settings.autoComplete === true && this.settings.autoCompleteDisableListener !== true) { |
204 | 206 | autoPlaces.addListener('place_changed', function(e) {
|
205 | 207 | _this.processForm(e);
|
206 | 208 | });
|
|
1159 | 1161 |
|
1160 | 1162 | // Set up the list template with the location data
|
1161 | 1163 | var listHtml = listTemplate(locations);
|
1162 |
| - $('.' + this.settings.locationList + ' ul').append(listHtml); |
| 1164 | + $('.' + this.settings.locationList + ' > ul').append(listHtml); |
1163 | 1165 | },
|
1164 | 1166 |
|
1165 | 1167 | /**
|
|
1807 | 1809 |
|
1808 | 1810 | // Set up the filters
|
1809 | 1811 | _this.taxonomyFiltersInit();
|
1810 |
| - |
| 1812 | + |
1811 | 1813 | // Check query string for taxonomy parameter keys.
|
1812 | 1814 | _this.checkQueryStringFilters();
|
1813 | 1815 |
|
|
1931 | 1933 |
|
1932 | 1934 | // Set up the list template with the location data
|
1933 | 1935 | listHtml = listTemplate(locations);
|
1934 |
| - $('.' + _this.settings.locationList + ' ul').append(listHtml); |
| 1936 | + $('.' + _this.settings.locationList + ' > ul').append(listHtml); |
1935 | 1937 | }
|
1936 | 1938 | });
|
1937 | 1939 |
|
|
0 commit comments