@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | |
162 | 162 | Requirements::javascript('framework/thirdparty/jquery/jquery.js'); |
163 | 163 | if (Locator::getLocations()) { |
164 | - Requirements::javascript('//maps.google.com/maps/api/js?key=' . $key); |
|
164 | + Requirements::javascript('//maps.google.com/maps/api/js?key='.$key); |
|
165 | 165 | Requirements::javascript('locator/thirdparty/handlebars/handlebars-v1.3.0.js'); |
166 | 166 | Requirements::javascript('locator/thirdparty/jquery-store-locator/js/jquery.storelocator.js'); |
167 | 167 | } |
@@ -169,44 +169,40 @@ discard block |
||
169 | 169 | Requirements::css('locator/css/map.css'); |
170 | 170 | |
171 | 171 | $featured = (Locator::getLocations(array('Featured' => 1))->count() > 0) ? |
172 | - 'featuredLocations: true' : |
|
173 | - 'featuredLocations: false'; |
|
172 | + 'featuredLocations: true' : 'featuredLocations: false'; |
|
174 | 173 | |
175 | 174 | // map config based on user input in Settings tab |
176 | 175 | // AutoGeocode or Full Map |
177 | 176 | $load = ($this->data()->AutoGeocode) ? |
178 | - 'autoGeocode: true, fullMapStart: false,' : |
|
179 | - 'autoGeocode: false, fullMapStart: true, storeLimit: 1000, maxDistance: true,'; |
|
177 | + 'autoGeocode: true, fullMapStart: false,' : 'autoGeocode: false, fullMapStart: true, storeLimit: 1000, maxDistance: true,'; |
|
180 | 178 | |
181 | 179 | $base = Director::baseFolder(); |
182 | - $themePath = $base . '/' . $themeDir; |
|
180 | + $themePath = $base.'/'.$themeDir; |
|
183 | 181 | |
184 | - $listTemplatePath = (file_exists($themePath . '/templates/location-list-description.html')) ? |
|
185 | - $themeDir . '/templates/location-list-description.html' : |
|
186 | - 'locator/templates/location-list-description.html'; |
|
187 | - $infowindowTemplatePath = (file_exists($themePath . '/templates/infowindow-description.html')) ? |
|
188 | - $themeDir . '/templates/infowindow-description.html' : |
|
189 | - 'locator/templates/infowindow-description.html'; |
|
182 | + $listTemplatePath = (file_exists($themePath.'/templates/location-list-description.html')) ? |
|
183 | + $themeDir.'/templates/location-list-description.html' : 'locator/templates/location-list-description.html'; |
|
184 | + $infowindowTemplatePath = (file_exists($themePath.'/templates/infowindow-description.html')) ? |
|
185 | + $themeDir.'/templates/infowindow-description.html' : 'locator/templates/infowindow-description.html'; |
|
190 | 186 | |
191 | 187 | // in page or modal |
192 | 188 | $modal = ($this->data()->ModalWindow) ? 'modalWindow: true' : 'modalWindow: false'; |
193 | 189 | |
194 | 190 | $kilometer = ($this->data()->Unit == 'km') ? 'lengthUnit: "km"' : 'lengthUnit: "m"'; |
195 | 191 | |
196 | - $link = $this->Link() . 'xml.xml'; |
|
192 | + $link = $this->Link().'xml.xml'; |
|
197 | 193 | |
198 | 194 | // init map |
199 | 195 | if (Locator::getLocations()) { |
200 | 196 | Requirements::customScript(" |
201 | 197 | $(function($) { |
202 | 198 | $('#map-container').storeLocator({ |
203 | - " . $load . " |
|
204 | - dataLocation: '" . $link . "', |
|
205 | - listTemplatePath: '" . $listTemplatePath . "', |
|
206 | - infowindowTemplatePath: '" . $infowindowTemplatePath . "', |
|
199 | + " . $load." |
|
200 | + dataLocation: '" . $link."', |
|
201 | + listTemplatePath: '" . $listTemplatePath."', |
|
202 | + infowindowTemplatePath: '" . $infowindowTemplatePath."', |
|
207 | 203 | originMarker: true, |
208 | - " . $modal . ', |
|
209 | - ' . $featured . ", |
|
204 | + " . $modal.', |
|
205 | + ' . $featured.", |
|
210 | 206 | slideMap: false, |
211 | 207 | zoomLevel: 0, |
212 | 208 | distanceAlert: 120, |
@@ -214,7 +210,7 @@ discard block |
||
214 | 210 | inputID: 'Form_LocationSearch_address', |
215 | 211 | categoryID: 'Form_LocationSearch_category', |
216 | 212 | distanceAlert: -1, |
217 | - " . $kilometer . ' |
|
213 | + " . $kilometer.' |
|
218 | 214 | }); |
219 | 215 | }); |
220 | 216 | '); |