| @@ -86,44 +86,40 @@ discard block | ||
| 86 | 86 |          Requirements::css('locator/css/map.css'); | 
| 87 | 87 | |
| 88 | 88 |          $featured = (Locator::getLocations(array('Featured' => 1))->count() > 0) ? | 
| 89 | - 'featuredLocations: true' : | |
| 90 | - 'featuredLocations: false'; | |
| 89 | + 'featuredLocations: true' : 'featuredLocations: false'; | |
| 91 | 90 | |
| 92 | 91 | // map config based on user input in Settings tab | 
| 93 | 92 | // AutoGeocode or Full Map | 
| 94 | 93 | $load = ($this->data()->AutoGeocode) ? | 
| 95 | - 'autoGeocode: true, fullMapStart: false,' : | |
| 96 | - 'autoGeocode: false, fullMapStart: true, storeLimit: 1000, maxDistance: true,'; | |
| 94 | + 'autoGeocode: true, fullMapStart: false,' : 'autoGeocode: false, fullMapStart: true, storeLimit: 1000, maxDistance: true,'; | |
| 97 | 95 | |
| 98 | 96 | $base = Director::baseFolder(); | 
| 99 | - $themePath = $base.'/'.$themeDir; | |
| 97 | + $themePath = $base . '/' . $themeDir; | |
| 100 | 98 | |
| 101 | - $listTemplatePath = (file_exists($themePath.'/templates/location-list-description.html')) ? | |
| 102 | - $themeDir.'/templates/location-list-description.html' : | |
| 103 | - 'locator/templates/location-list-description.html'; | |
| 104 | - $infowindowTemplatePath = (file_exists($themePath.'/templates/infowindow-description.html')) ? | |
| 105 | - $themeDir.'/templates/infowindow-description.html' : | |
| 106 | - 'locator/templates/infowindow-description.html'; | |
| 99 | + $listTemplatePath = (file_exists($themePath . '/templates/location-list-description.html')) ? | |
| 100 | + $themeDir . '/templates/location-list-description.html' : 'locator/templates/location-list-description.html'; | |
| 101 | + $infowindowTemplatePath = (file_exists($themePath . '/templates/infowindow-description.html')) ? | |
| 102 | + $themeDir . '/templates/infowindow-description.html' : 'locator/templates/infowindow-description.html'; | |
| 107 | 103 | |
| 108 | 104 | // in page or modal | 
| 109 | 105 | $modal = ($this->data()->ModalWindow) ? 'modalWindow: true' : 'modalWindow: false'; | 
| 110 | 106 | |
| 111 | 107 | $kilometer = ($this->data()->Unit == 'km') ? 'lengthUnit: "km"' : 'lengthUnit: "m"'; | 
| 112 | 108 | |
| 113 | - $link = $this->Link().'xml.xml'; | |
| 109 | + $link = $this->Link() . 'xml.xml'; | |
| 114 | 110 | |
| 115 | 111 | // init map | 
| 116 | 112 |          if (Locator::getLocations()) { | 
| 117 | 113 |              Requirements::customScript(" | 
| 118 | 114 |                  $(function($) { | 
| 119 | 115 |                      $('#map-container').storeLocator({ | 
| 120 | - ".$load." | |
| 121 | - dataLocation: '".$link."', | |
| 122 | - listTemplatePath: '".$listTemplatePath."', | |
| 123 | - infowindowTemplatePath: '".$infowindowTemplatePath."', | |
| 116 | + ".$load . " | |
| 117 | + dataLocation: '".$link . "', | |
| 118 | + listTemplatePath: '".$listTemplatePath . "', | |
| 119 | + infowindowTemplatePath: '".$infowindowTemplatePath . "', | |
| 124 | 120 | originMarker: true, | 
| 125 | - ".$modal.', | |
| 126 | - '.$featured.", | |
| 121 | + ".$modal . ', | |
| 122 | + '.$featured . ", | |
| 127 | 123 | slideMap: false, | 
| 128 | 124 | zoomLevel: 0, | 
| 129 | 125 | distanceAlert: 120, | 
| @@ -131,7 +127,7 @@ discard block | ||
| 131 | 127 | inputID: 'Form_LocationSearch_address', | 
| 132 | 128 | categoryID: 'Form_LocationSearch_category', | 
| 133 | 129 | distanceAlert: -1, | 
| 134 | - ".$kilometer.' | |
| 130 | + ".$kilometer . ' | |
| 135 | 131 | }); | 
| 136 | 132 | }); | 
| 137 | 133 | '); |