Skip to content

Commit

Permalink
Merge pull request #467 from bmlt-enabled:release-3.18.7
Browse files Browse the repository at this point in the history
add wheelchair icon
  • Loading branch information
otrok7 authored Feb 11, 2024
2 parents 7861349 + c855beb commit de7f031
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
4 changes: 2 additions & 2 deletions crouton.php
Original file line number Diff line number Diff line change
Expand Up @@ -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__)) {
Expand Down Expand Up @@ -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)
Expand Down
8 changes: 8 additions & 0 deletions croutonjs/src/js/crouton-core.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand Down Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion croutonjs/src/js/crouton-default-templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ var croutonDefaultTemplates = {

observer_template: [
"<div class='observerLine'>{{this.contact_name_1}} {{this.contact_phone_1}} {{this.contact_email_1}}</div>",
"<div class='observerLine'>{{this.contact_name_2}} {{this.contact_phone_2}} {{this.contact_email_2}}</div>"
"<div class='observerLine'>{{this.contact_name_2}} {{this.contact_phone_2}} {{this.contact_email_2}}</div>",
"{{#if this.wheelchair}}<div style='font-style:normal; font-size:x-large;'>&#x267F;</div>{{/if}}"
].join('\n'),

meeting_count_template: [
Expand Down
4 changes: 4 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit de7f031

Please sign in to comment.