Skip to content

Commit

Permalink
Merge pull request #3 from contao-estatemanager/support/1.0
Browse files Browse the repository at this point in the history
Support/1.0
  • Loading branch information
eki89 authored Oct 27, 2022
2 parents cc2c89a + 1782d01 commit 07e292e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 27 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
],
"require":{
"php":"^7.4 || ^8.0",
"contao/core-bundle":"^4.4",
"ext-mbstring": "*",
"contao/core-bundle":"^4.9",
"contao-estatemanager/core": "^1.0",
"contao-estatemanager/google-services": "^1.0"
},
Expand Down
5 changes: 2 additions & 3 deletions src/Resources/contao/modules/ExposeModuleGoogleMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
use Contao\BackendTemplate;
use Contao\Config;
use ContaoEstateManager\ExposeModule;
use Patchwork\Utf8;

/**
* Expose module "google map".
Expand All @@ -33,7 +32,7 @@ class ExposeModuleGoogleMap extends ExposeModule
protected $strTemplate = 'expose_mod_googlemap';

/**
* Do not display the module if there are no real etates.
* Do not display the module if there are no real estates.
*
* @return string
*/
Expand All @@ -42,7 +41,7 @@ public function generate()
if (TL_MODE === 'BE')
{
$objTemplate = new BackendTemplate('be_wildcard');
$objTemplate->wildcard = '### '.Utf8::strtoupper($GLOBALS['TL_LANG']['FMD']['virtual_tour'][0]).' ###';
$objTemplate->wildcard = '### '. mb_strtoupper($GLOBALS['TL_LANG']['FMD']['virtual_tour'][0], 'UTF-8') . ' ###';
$objTemplate->title = $this->headline;
$objTemplate->id = $this->id;
$objTemplate->link = $this->name;
Expand Down
6 changes: 3 additions & 3 deletions src/Resources/contao/modules/ModuleRealEstateGoogleMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
namespace ContaoEstateManager\GoogleMaps;

use Contao\BackendTemplate;
use Contao\Config;
use ContaoEstateManager\ModuleRealEstate;
use Patchwork\Utf8;

/**
* Front end module "real estate google map".
Expand All @@ -41,7 +41,7 @@ public function generate()
if (TL_MODE === 'BE')
{
$objTemplate = new BackendTemplate('be_wildcard');
$objTemplate->wildcard = '### '.Utf8::strtoupper($GLOBALS['TL_LANG']['FMD']['realEstateGoogleMap'][0]).' ###';
$objTemplate->wildcard = '### '. mb_strtoupper($GLOBALS['TL_LANG']['FMD']['realEstateGoogleMap'][0], 'UTF-8') . ' ###';
$objTemplate->title = $this->headline;
$objTemplate->id = $this->id;
$objTemplate->link = $this->name;
Expand Down Expand Up @@ -103,7 +103,7 @@ protected function compile(): void
'filterMode' => $this->filterMode,
'groups' => $this->realEstateGroups,
'pageId' => $objPage->id,
'moduleId' => $this->id,
'moduleId' => $this->id
],
],
'popup' => [
Expand Down
20 changes: 0 additions & 20 deletions src/Resources/public/google-maps-viewer/google-maps-viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -491,23 +491,3 @@ var GoogleMapsViewer = (function () {

return Constructor;
})();

/**
* Listen to Google Callback for start building the map
*/
function onGoogleMapsApiReady (e){
if (document.readyState !== 'complete') {
var stateCheck = setInterval(function() {
if (document.readyState === 'complete') {
clearInterval(stateCheck);
onGoogleMapsApiReady(e);
}
}, 100);

return false;
}

var customOnReadyEvent = new CustomEvent('googlemaps.onApiReady', {detail: e});

document.dispatchEvent(customOnReadyEvent);
}

0 comments on commit 07e292e

Please sign in to comment.