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

add wheelchair icon #467

Merged
merged 2 commits into from
Feb 11, 2024
Merged
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
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
Loading