From 12f016e45add2e0b8d8ad40701a2cb5506596de7 Mon Sep 17 00:00:00 2001 From: otrok7 <50595291+otrok7@users.noreply.github.com> Date: Mon, 11 Nov 2024 14:09:06 +0100 Subject: [PATCH] Remove unneccessary call to root server --- crouton.php | 2 +- croutonjs/meetingMap/js/meeting_map.js | 6 +++++- croutonjs/src/js/crouton-core.js | 2 +- readme.txt | 6 +++++- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/crouton.php b/crouton.php index 4e4efa8..9248c92 100644 --- a/crouton.php +++ b/crouton.php @@ -5,7 +5,7 @@ Description: A tabbed based display for showing meeting information. Author: bmlt-enabled Author URI: https://bmlt.app -Version: 3.20.6 +Version: 3.20.7 */ /* Disallow direct access to the plugin file */ if (basename($_SERVER['PHP_SELF']) == basename(__FILE__)) { diff --git a/croutonjs/meetingMap/js/meeting_map.js b/croutonjs/meetingMap/js/meeting_map.js index b737ce7..a482c9f 100644 --- a/croutonjs/meetingMap/js/meeting_map.js +++ b/croutonjs/meetingMap/js/meeting_map.js @@ -197,7 +197,9 @@ function MeetingMap(inConfig) { return controlDiv; } - + function hasMapSearch() { + return 'map_search' in config; + } function loadFromCrouton(inDiv_id, meetings_responseObject, menuContext = null, handlebarMapOptions = null, fitBounds = true, callback) { if (!gDelegate.isApiLoaded()) { preloadApiLoadedCallback(loadFromCrouton, [inDiv_id, meetings_responseObject, menuContext, handlebarMapOptions, fitBounds, callback]); @@ -724,6 +726,7 @@ function MeetingMap(inConfig) { this.closeModalWindow = closeModalWindow; this.loadPopupMap = loadPopupMap; this.filterVisible = filterVisible; + this.hasMapSearch = hasMapSearch; }; MeetingMap.prototype.initialize = null; MeetingMap.prototype.showMap = null; @@ -736,3 +739,4 @@ MeetingMap.prototype.openModalWindow = null; MeetingMap.prototype.closeModalWindow = null; MeetingMap.prototype.loadPopupMap = null; MeetingMap.prototype.filterVisible = null; +MeetingMap.prototype.hasMapSearch = null; diff --git a/croutonjs/src/js/crouton-core.js b/croutonjs/src/js/crouton-core.js index 997717b..9ac8e00 100644 --- a/croutonjs/src/js/crouton-core.js +++ b/croutonjs/src/js/crouton-core.js @@ -897,7 +897,7 @@ function Crouton(config) { if (self.config['map_search']) self.searchMap(); else self.meetingSearch(); } - else if (!self.config['map_search']) self.meetingSearch(); + else if (!window.croutonMap.hasMapSearch()) self.meetingSearch(); } Crouton.prototype.setConfig = function(config) { diff --git a/readme.txt b/readme.txt index 019085d..9ce6ce9 100644 --- a/readme.txt +++ b/readme.txt @@ -5,7 +5,7 @@ Tags: na, meeting list, meeting finder, maps, recovery, addiction, webservant, b Requires at least: 4.0 Required PHP: 8.0 Tested up to: 6.6.2 -Stable tag: 3.20.6 +Stable tag: 3.20.7 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html crouton implements a Tabbed UI for BMLT. @@ -36,6 +36,10 @@ https://demo.bmlt.app/crouton == Changelog == += 3.20.7 = +* Assure "Fetching" message is deleted. +* Remove unnecessary call to root server. + = 3.20.6 = * Fix for 3.20.5