Skip to content

Commit

Permalink
Merge branch '1.0' into 1.x
Browse files Browse the repository at this point in the history
  • Loading branch information
aryaantony92 committed Aug 21, 2023
2 parents 855756f + 373d01b commit 6e8f061
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@
"pimcore/newsletter-bundle": "^1.0",
"colinmollenhour/credis": "^1.10.0",
"mjaschen/phpgeo": "^4.0",
"pimcore/admin-ui-classic-bundle": "^1.0"
"pimcore/admin-ui-classic-bundle": "^1.0.6"
},
"require-dev": {
"phpunit/phpunit": "^9.5",
"phpstan/phpstan": "^1.10.5",
"phpstan/phpstan-symfony": "^1.2.14",
"codeception/phpunit-wrapper": "^9",
Expand Down
19 changes: 9 additions & 10 deletions public/js/settings/conditions.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,18 +258,18 @@ pimcore.bundle.personalization.settings.conditions = (function () {
var leafletMap, marker, circle;

var searchHandler = function() {
var address = searchfield.getValue();
Ext.Ajax.request({
url: pimcore.bundle.personalization.settings.conditions.getSearchUrl(address),
method: "GET",
success: function (response, opts) {
var data = Ext.decode(response.responseText);
const address = searchfield.getValue();
pimcore.helpers.sendRequest(
"GET",
pimcore.bundle.personalization.settings.conditions.getSearchUrl(address),
function (response) {
const data = Ext.decode(response.responseText);
if (data[0].lat !== null && data[0].lon !== null) {
marker.setLatLng(L.latLng(data[0].lat, data[0].lon));
leafletMap.setView(L.latLng(data[0].lat, data[0].lon), 7);
}
}.bind(this),
});
}
);
};

var searchfield = new Ext.form.TextField({
Expand Down Expand Up @@ -740,8 +740,7 @@ pimcore.bundle.personalization.settings.conditions = (function () {
},

getSearchUrl: function (query) {
var url = pimcore.settings.geocoding_url_template.replace('{q}', urlencode(query));
return url;
return pimcore.settings.geocoding_url_template.replace('{q}', urlencode(query));
},

get: function (name) {
Expand Down

0 comments on commit 6e8f061

Please sign in to comment.