workaround because chrome doesn't support onclick in select options

This commit is contained in:
lenovo
2022-11-14 13:42:18 +01:00
parent 49daf21ae6
commit 48e1572957
8 changed files with 46 additions and 37 deletions

View File

@@ -103,24 +103,21 @@ function mp_ljdp_map() {
*/
$events = mp_get_published_events();
mp_console_log("php events:");
mp_console_log($events);
//mp_console_log("php events:");
//mp_console_log($events);
$locations = mp_sort_events($events);
mp_console_log("php locations:");
mp_console_log($locations);
//mp_console_log("php locations:");
//mp_console_log($locations);
$filters = mp_get_filters($events);
mp_console_log("php filters:");
mp_console_log($filters);
$to_add = array(
"locations" => $locations,
"filters" => $filters,
);
//mp_console_log("php filters:");
//mp_console_log($filters);
// if post event instead of map page, change ccoordinate and zoom
global $mp_zoom;
global $mp_zoom_set;
global $mp_coordinates_default;
if (is_event_post()) {
$mp_zoom = $mp_zoom_set[1];
@@ -130,6 +127,11 @@ function mp_ljdp_map() {
$mp_coordinates_default = $coordinates;
}
$to_add = array(
"locations" => $locations,
"filters" => $filters,
);
mp_add_to_scripts($to_add);