diff --git a/crouton.php b/crouton.php index aaaa628..0d153d8 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.18.6 +Version: 3.18.7 */ /* Disallow direct access to the plugin file */ if (basename($_SERVER['PHP_SELF']) == basename(__FILE__)) { @@ -389,7 +389,7 @@ private function renderMap($atts, $croutonMap = true) public function initCrouton($atts) { - return $this->getInitializeCroutonBlock("", ...$this->getCroutonJsConfig($atts)); + return $this->getInitializeCroutonBlock("crouton.renderMeetingCount();", ...$this->getCroutonJsConfig($atts)); } public function meetingCount($atts) diff --git a/croutonjs/src/js/crouton-core.js b/croutonjs/src/js/crouton-core.js index ccb2fec..8b98497 100644 --- a/croutonjs/src/js/crouton-core.js +++ b/croutonjs/src/js/crouton-core.js @@ -763,9 +763,11 @@ function Crouton(config) { var formats = meetingData[m]['formats'].split(","); var formats_expanded = []; let formatRootServer = self.formatsData.filter((f)=>f['root_server_uri'] == meetingData[m]['root_server_uri']); + meetingData[m]['wheelchar'] = false; for (var f = 0; f < formats.length; f++) { for (var g = 0; g < formatRootServer.length; g++) { if (formats[f] === formatRootServer[g]['key_string']) { + if (formatRootServer[g]['world_id'] == 'WCHR') meetingData[m]['wheelchair'] = true; formats_expanded.push( { "id": formatRootServer[g]['id'], @@ -1642,6 +1644,12 @@ function getUniqueFormatsOfType(array, type){ return carry; },[]); } +Crouton.prototype.renderMeetingCount = function() { + self = this; + self.lock(function() { + self.updateMeetingCount() + }); +} Crouton.prototype.getAdjustedDateTime = function(meeting_day, meeting_time, meeting_time_zone) { var timeZoneAware = this.config['auto_tz_adjust'] === true || this.config['auto_tz_adjust'] === "true"; var meeting_date_time_obj; diff --git a/croutonjs/src/js/crouton-default-templates.js b/croutonjs/src/js/crouton-default-templates.js index 5404364..08144f9 100644 --- a/croutonjs/src/js/crouton-default-templates.js +++ b/croutonjs/src/js/crouton-default-templates.js @@ -48,7 +48,8 @@ var croutonDefaultTemplates = { observer_template: [ "
{{this.contact_name_1}} {{this.contact_phone_1}} {{this.contact_email_1}}
", - "
{{this.contact_name_2}} {{this.contact_phone_2}} {{this.contact_email_2}}
" + "
{{this.contact_name_2}} {{this.contact_phone_2}} {{this.contact_email_2}}
", + "{{#if this.wheelchair}}
{{/if}}" ].join('\n'), meeting_count_template: [ diff --git a/readme.txt b/readme.txt index b0e197e..04a8edf 100644 --- a/readme.txt +++ b/readme.txt @@ -36,6 +36,10 @@ https://demo.bmlt.app/crouton == Changelog == += 3.18.7 = +* Show wheelchair character in first column for meetings with a format that corresponds to NAWS WHEELCHAIR. +* Use [init_crouton] for pages with [meeting_count] but no other "main" crouton shortcode. + = 3.18.6 = * French translation. * Correctly handle links when default permalinks are used.