Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes #495

Merged
merged 2 commits into from
Sep 22, 2024
Merged

fixes #495

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crouton.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
5 changes: 3 additions & 2 deletions croutonjs/meetingMap/js/meeting_map.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ function MeetingMap(inConfig) {
gDelegate.setViewToPosition(position, filterMeetingsAndBounds, filterVisible);
}).catch(error => {
console.error(error.message);
$('.geo').removeClass("hide").addClass("show").html(`<p>${error.message}</p>`);
jQuery('.geo').removeClass("hide").addClass("show").html(`<p>${error.message}</p>`);
});
dropdownContent = document.getElementById("map-menu-dropdown").style.display = "none";
});
Expand Down Expand Up @@ -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));
}
Expand All @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion croutonjs/src/js/crouton-core.js
Original file line number Diff line number Diff line change
Expand Up @@ -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("=");
Expand Down
2 changes: 1 addition & 1 deletion partials/_instructions.php
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@
<h3 class="help-accordian"><strong>Query: Select by venue type</strong></h3>
<div>
<p>With this parameter you can add restrictions to root server query, as an alternative to specifying a custom query.
<p><strong>[bmlt_tabs venues="1|2|3"]</strong></p>
<p><strong>[bmlt_tabs venue_types="1|2|3"]</strong></p>
<p>Where<ul><li>1 = In-Person Meetings</li><li>2 = Virtual Meetings</li><li>3 = Hybrid Meetings</li></ul>
<p>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.</p>
</div>
Expand Down
Loading