@bmlt-enabled/croutonjs 3.18.10 → 3.18.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14832,7 +14832,7 @@ var croutonDefaultTemplates = {
14832
14832
  "{{#isNotTemporarilyClosed this}}",
14833
14833
  " {{#unless (hasFormats 'VM' this)}}",
14834
14834
  " <div>",
14835
- " <a onclick='crouton.meetingModal({{this.id_bigint}})' id='map-button' class='btn btn-primary btn-xs'>",
14835
+ " <a onclick='crouton.meetingModal({{this.id_bigint}})' tabindex='0' href='#' id='map-button' class='btn btn-primary btn-xs'>",
14836
14836
  " <span class='glyphicon glyphicon-search' aria-hidden='true'></span>",
14837
14837
  " {{getWord 'meeting details'}}",
14838
14838
  " </a>",
@@ -14862,10 +14862,10 @@ var croutonDefaultTemplates = {
14862
14862
  "{{/if}}"
14863
14863
  ].join('\n'),
14864
14864
  meeting_modal_template: [
14865
- "<a onclick='crouton.meetingModal({{this.id_bigint}})'><span class='glyphicon glyphicon-search' aria-hidden='true'></span>{{this.meeting_name}}</a>",
14865
+ "<a tabindex='0' href='#' onclick='crouton.meetingModal({{this.id_bigint}})'><span class='glyphicon glyphicon-search' aria-hidden='true'></span>{{this.meeting_name}}</a>",
14866
14866
  ].join('\n'),
14867
14867
  meetingpage_frame_template: `
14868
- <div id="meeting_modal" class="modal bootstrap-bmlt" style="display: none;">
14868
+ <div id="meeting_modal" class="modal bootstrap-bmlt" style="display: none;" tabindex="-1" >
14869
14869
  <div class="modal-content">
14870
14870
  <span class="modal-title">{{getWord "Meeting Details"}}</span><span id="close_meeting_details" class="modal-close">×</span>
14871
14871
  <table id="meeting-details-table" class="bmlt-table table table-striped table-hover table-bordered tablesaw tablesaw-stack meeting-details">
@@ -14881,9 +14881,9 @@ var croutonDefaultTemplates = {
14881
14881
  </tbody>
14882
14882
  </table>
14883
14883
  <div>
14884
- <a id="map-button" class="btn btn-primary btn-xs" href="{{{this.meeting_details_url}}}" target="_blank" rel="noopener noreferrer" style="float:left">
14884
+ <a id="map-button" class="btn btn-primary btn-xs" href="{{{this.meeting_details_url}}}" tabindex="0" target="_blank" rel="noopener noreferrer" style="float:left">
14885
14885
  {{getWord "Meeting Page"}}</a>
14886
- <a id="map-button" class="btn btn-primary btn-xs modal-close" style="float:right">
14886
+ <a id="map-button" class="btn btn-primary btn-xs modal-close" tabindex="0" style="float:right">
14887
14887
  {{getWord "Close"}}</a>
14888
14888
  </div>
14889
14889
  </div></div>`,
@@ -18044,6 +18044,7 @@ function MeetingMap(inConfig) {
18044
18044
  var g_suspendedFullscreen = false;
18045
18045
  function closeModalWindow(modal) {
18046
18046
  gDelegate.modalOff();
18047
+ activeModal = null;
18047
18048
  if (!modal.classList.contains("modal"))
18048
18049
  return closeModalWindow(modal.parentNode);
18049
18050
  modal.style.display = "none";
@@ -18054,12 +18055,20 @@ function MeetingMap(inConfig) {
18054
18055
  }
18055
18056
  }
18056
18057
  }
18058
+ var activeModal = null;
18059
+ document.addEventListener("keydown", function(event) {
18060
+ if (activeModal && event.key == "Escape") {
18061
+ closeModalWindow(activeModal);
18062
+ }
18063
+ }, true);
18057
18064
  function openModalWindow(modal) {
18058
18065
  if (isFullscreen()) {
18059
18066
  g_suspendedFullscreen = true;
18060
18067
  toggleFullscreen();
18061
18068
  }
18062
18069
  modal.style.display = "block";
18070
+ modal.focus();
18071
+ activeModal = modal;
18063
18072
  dd = document.getElementById("map-menu-dropdown");
18064
18073
  if (dd) dd.style.display = "none";
18065
18074
  gDelegate.modalOn();