@bmlt-enabled/croutonjs 3.16.1 → 3.16.3

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.
@@ -14599,6 +14599,7 @@ function Crouton(config) {
14599
14599
 
14600
14600
  self.rowClick = function(id) {
14601
14601
  var map_marker = self.findMarkerById(id);
14602
+ if (!map_marker) return;
14602
14603
  self.map.setCenter(map_marker.getPosition());
14603
14604
  self.map.setZoom(17);
14604
14605
  google.maps.event.trigger(map_marker, "click");
@@ -15557,7 +15558,7 @@ Crouton.prototype.render = function() {
15557
15558
  dropdownCssClass: 'bmlt-drop'
15558
15559
  });
15559
15560
 
15560
- jQuery('[data-toggle="popover"]').popover();
15561
+ jQuery('[data-toggle="popover"]').popover().click(function(e) {e.preventDefault(); e.stopPropagation()});
15561
15562
  jQuery('html').on('click', function (e) {
15562
15563
  if (jQuery(e.target).data('toggle') !== 'popover') {
15563
15564
  jQuery('[data-toggle="popover"]').popover('hide');
@@ -15733,25 +15734,12 @@ Crouton.prototype.renderMap = function() {
15733
15734
  }
15734
15735
  })
15735
15736
  };
15736
- calculateBounds = function() {
15737
- var bounds = new google.maps.LatLngBounds();
15738
- // We go through all the results, and get the "spread" from them.
15739
- for (var c = 0; c < self.meetingData.length; c++) {
15740
- var lat = self.meetingData[c].latitude;
15741
- var lng = self.meetingData[c].longitude;
15742
- // We will set our minimum and maximum bounds.
15743
- bounds.extend(new google.maps.LatLng(lat, lng));
15744
- }
15745
- // We now have the full rectangle of our meeting search results. Scale the map to fit them.
15746
- self.map.fitBounds(bounds);
15747
-
15748
- }
15749
15737
  Crouton.prototype.initMap = function(callback) {
15750
15738
  var self = this;
15751
15739
  if (self.map == null) {
15752
15740
  jQuery("#bmlt-tabs").before("<div id='bmlt-map' class='bmlt-map'></div>");
15753
15741
  var mapOpt = { zoom: 3 };
15754
- if (self.handlebarMapOptions) mapOpt = {
15742
+ if (self.handlebarMapOptions.length > 0) mapOpt = {
15755
15743
  center: new google.maps.LatLng(self.handlebarMapOptions.lat, self.handlebarMapOptions.lng),
15756
15744
  zoom: self.handlebarMapOptions.zoom,
15757
15745
  mapTypeId:google.maps.MapTypeId.ROADMAP
@@ -15760,7 +15748,17 @@ Crouton.prototype.initMap = function(callback) {
15760
15748
  }
15761
15749
 
15762
15750
  jQuery("#bmlt-map").removeClass("hide");
15763
- if (!self.handlebarMapOptions) self.calculateBounds();
15751
+ var bounds = new google.maps.LatLngBounds();
15752
+ // We go through all the results, and get the "spread" from them.
15753
+ for (var c = 0; c < self.meetingData.length; c++) {
15754
+ if (self.meetingData[c].venue_type == venueType.VIRTUAL) continue;
15755
+ var lat = self.meetingData[c].latitude;
15756
+ var lng = self.meetingData[c].longitude;
15757
+ // We will set our minimum and maximum bounds.
15758
+ bounds.extend(new google.maps.LatLng(lat, lng));
15759
+ }
15760
+ // We now have the full rectangle of our meeting search results. Scale the map to fit them.
15761
+ self.map.fitBounds(bounds);
15764
15762
  var infoWindow = new google.maps.InfoWindow();
15765
15763
 
15766
15764
  // Create OverlappingMarkerSpiderfier instance
@@ -15809,6 +15807,7 @@ Crouton.prototype.initMap = function(callback) {
15809
15807
  // create an array of markers based on a given "locations" array.
15810
15808
  // The map() method here has nothing to do with the Google Maps API.
15811
15809
  self.meetingData.map(function (location, i) {
15810
+ if (location.venue_type == venueType.VIRTUAL) return;
15812
15811
  var marker_html = '<dl><dt><strong>';
15813
15812
  marker_html += location.meeting_name;
15814
15813
  marker_html += '</strong></dt>';