From ed225e77268a0c7eab0b563394b2ec4acc59f29c Mon Sep 17 00:00:00 2001 From: otrok7 <50595291+otrok7@users.noreply.github.com> Date: Sat, 21 Sep 2024 01:06:31 +0200 Subject: [PATCH 1/2] fixes --- crouton.php | 2 +- croutonjs/meetingMap/js/meeting_map.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/crouton.php b/crouton.php index 9591608..9a11cd6 100644 --- a/crouton.php +++ b/crouton.php @@ -73,7 +73,7 @@ class Crouton "has_languages" => '0', "has_common_needs" => '0', "has_venues" => '1', - "filter_visible" => '0', + "filter_visible" => 0, "include_city_button" => '1', "include_weekday_button" => '1', "include_unpublished" => '0', diff --git a/croutonjs/meetingMap/js/meeting_map.js b/croutonjs/meetingMap/js/meeting_map.js index 21ab085..b737ce7 100644 --- a/croutonjs/meetingMap/js/meeting_map.js +++ b/croutonjs/meetingMap/js/meeting_map.js @@ -160,7 +160,7 @@ function MeetingMap(inConfig) { gDelegate.setViewToPosition(position, filterMeetingsAndBounds, filterVisible); }).catch(error => { console.error(error.message); - $('.geo').removeClass("hide").addClass("show").html(`
${error.message}
`); + jQuery('.geo').removeClass("hide").addClass("show").html(`${error.message}
`); }); dropdownContent = document.getElementById("map-menu-dropdown").style.display = "none"; }); @@ -589,6 +589,7 @@ function MeetingMap(inConfig) { marker_html, null ,meetings.map((m)=>parseInt(m.id_bigint))); }; var listOnlyVisible = false; + var listener = null; function filterBounds(bounds) { return gAllMeetings.filter((meeting) => gDelegate.contains(bounds, meeting.latitude, meeting.longitude)); } @@ -597,7 +598,7 @@ function MeetingMap(inConfig) { gDelegate.addListener('dragend', filterVisible, true); } function filterVisible(on=true) { - if (on===listOnlyVisible) return on; + if (on==listOnlyVisible) return on; let mtgs = on ? filterBounds(gDelegate.getBounds()) : gAllMeetings; let visible = mtgs.map((m)=>m.id_bigint); jQuery(".bmlt-data-row").each(function(index,row) { From 4c99537b528d3f5cb0671cc374a74ec9637d493c Mon Sep 17 00:00:00 2001 From: otrok7 <50595291+otrok7@users.noreply.github.com> Date: Sun, 22 Sep 2024 14:25:11 +0200 Subject: [PATCH 2/2] fixes --- croutonjs/src/js/crouton-core.js | 2 +- partials/_instructions.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/croutonjs/src/js/crouton-core.js b/croutonjs/src/js/crouton-core.js index 736a8ff..00865d5 100644 --- a/croutonjs/src/js/crouton-core.js +++ b/croutonjs/src/js/crouton-core.js @@ -1401,7 +1401,7 @@ Crouton.prototype.render = function(doMeetingMap = false) { self.showPage(".bmlt-header"); self.showPage(".bmlt-tabs"); - self.showView(self.config['view_by']); + self.showView(self.config['view_by'], false); if (self.config['default_filter_dropdown'] !== "") { var filter = self.config['default_filter_dropdown'].toLowerCase().split("="); diff --git a/partials/_instructions.php b/partials/_instructions.php index 4080175..97c09a1 100644 --- a/partials/_instructions.php +++ b/partials/_instructions.php @@ -232,7 +232,7 @@With this parameter you can add restrictions to root server query, as an alternative to specifying a custom query. -
[bmlt_tabs venues="1|2|3"]
+[bmlt_tabs venue_types="1|2|3"]
Where
The values can also be negative, which means that the venue type should be excluded from the results. To specify more the one type, use a comma separated list.