@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.
package/crouton-gmaps.js CHANGED
@@ -14835,7 +14835,7 @@ var croutonDefaultTemplates = {
14835
14835
  "{{#isNotTemporarilyClosed this}}",
14836
14836
  " {{#unless (hasFormats 'VM' this)}}",
14837
14837
  " <div>",
14838
- " <a onclick='crouton.meetingModal({{this.id_bigint}})' id='map-button' class='btn btn-primary btn-xs'>",
14838
+ " <a onclick='crouton.meetingModal({{this.id_bigint}})' tabindex='0' href='#' id='map-button' class='btn btn-primary btn-xs'>",
14839
14839
  " <span class='glyphicon glyphicon-search' aria-hidden='true'></span>",
14840
14840
  " {{getWord 'meeting details'}}",
14841
14841
  " </a>",
@@ -14865,10 +14865,10 @@ var croutonDefaultTemplates = {
14865
14865
  "{{/if}}"
14866
14866
  ].join('\n'),
14867
14867
  meeting_modal_template: [
14868
- "<a onclick='crouton.meetingModal({{this.id_bigint}})'><span class='glyphicon glyphicon-search' aria-hidden='true'></span>{{this.meeting_name}}</a>",
14868
+ "<a tabindex='0' href='#' onclick='crouton.meetingModal({{this.id_bigint}})'><span class='glyphicon glyphicon-search' aria-hidden='true'></span>{{this.meeting_name}}</a>",
14869
14869
  ].join('\n'),
14870
14870
  meetingpage_frame_template: `
14871
- <div id="meeting_modal" class="modal bootstrap-bmlt" style="display: none;">
14871
+ <div id="meeting_modal" class="modal bootstrap-bmlt" style="display: none;" tabindex="-1" >
14872
14872
  <div class="modal-content">
14873
14873
  <span class="modal-title">{{getWord "Meeting Details"}}</span><span id="close_meeting_details" class="modal-close">×</span>
14874
14874
  <table id="meeting-details-table" class="bmlt-table table table-striped table-hover table-bordered tablesaw tablesaw-stack meeting-details">
@@ -14884,9 +14884,9 @@ var croutonDefaultTemplates = {
14884
14884
  </tbody>
14885
14885
  </table>
14886
14886
  <div>
14887
- <a id="map-button" class="btn btn-primary btn-xs" href="{{{this.meeting_details_url}}}" target="_blank" rel="noopener noreferrer" style="float:left">
14887
+ <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">
14888
14888
  {{getWord "Meeting Page"}}</a>
14889
- <a id="map-button" class="btn btn-primary btn-xs modal-close" style="float:right">
14889
+ <a id="map-button" class="btn btn-primary btn-xs modal-close" tabindex="0" style="float:right">
14890
14890
  {{getWord "Close"}}</a>
14891
14891
  </div>
14892
14892
  </div></div>`,
@@ -18047,6 +18047,7 @@ function MeetingMap(inConfig) {
18047
18047
  var g_suspendedFullscreen = false;
18048
18048
  function closeModalWindow(modal) {
18049
18049
  gDelegate.modalOff();
18050
+ activeModal = null;
18050
18051
  if (!modal.classList.contains("modal"))
18051
18052
  return closeModalWindow(modal.parentNode);
18052
18053
  modal.style.display = "none";
@@ -18057,12 +18058,20 @@ function MeetingMap(inConfig) {
18057
18058
  }
18058
18059
  }
18059
18060
  }
18061
+ var activeModal = null;
18062
+ document.addEventListener("keydown", function(event) {
18063
+ if (activeModal && event.key == "Escape") {
18064
+ closeModalWindow(activeModal);
18065
+ }
18066
+ }, true);
18060
18067
  function openModalWindow(modal) {
18061
18068
  if (isFullscreen()) {
18062
18069
  g_suspendedFullscreen = true;
18063
18070
  toggleFullscreen();
18064
18071
  }
18065
18072
  modal.style.display = "block";
18073
+ modal.focus();
18074
+ activeModal = modal;
18066
18075
  dd = document.getElementById("map-menu-dropdown");
18067
18076
  if (dd) dd.style.display = "none";
18068
18077
  gDelegate.modalOn();