@bmlt-enabled/croutonjs 3.12.7 → 3.12.8

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.
@@ -14272,7 +14272,7 @@ function Crouton(config) {
14272
14272
  self.formatsData = mainMeetings['formats'];
14273
14273
 
14274
14274
  if (extraMeetings) {
14275
- self.meetingData.concat(extraMeetings['meetings']);
14275
+ self.meetingData = self.meetingData.concat(extraMeetings['meetings']);
14276
14276
  }
14277
14277
  self.mutex = false;
14278
14278
  });
@@ -15099,61 +15099,67 @@ Crouton.prototype.mapSearchTextMode = function(location) {
15099
15099
  Crouton.prototype.renderMap = function() {
15100
15100
  var self = this;
15101
15101
  jQuery("#bmlt-tabs").before("<div id='bmlt-map' class='bmlt-map'></div>");
15102
-
15103
15102
  self.geocoder = new google.maps.Geocoder();
15104
- self.map = new google.maps.Map(document.getElementById('bmlt-map'), {
15105
- zoom: self.config['map_search']['zoom'] || 10,
15106
- center: {
15107
- lat: self.config['map_search']['latitude'],
15108
- lng: self.config['map_search']['longitude'],
15109
- },
15110
- mapTypeControl: false,
15111
- });
15112
-
15113
- var controlDiv = document.createElement('div');
15114
-
15115
- // Set CSS for the control border
15116
- var controlUI = document.createElement('div');
15117
- controlUI.className = 'mapcontrolcontainer';
15118
- controlUI.title = 'Click to recenter the map';
15119
- controlDiv.appendChild(controlUI);
15120
-
15121
- // Set CSS for the control interior
15122
- var clickSearch = document.createElement('div');
15123
- clickSearch.className = 'mapcontrols';
15124
- clickSearch.innerHTML = '<label for="nearme" class="mapcontrolslabel"><input type="radio" id="nearme" name="mapcontrols"> ' + self.localization.getWord('near_me') + '</label><label for="textsearch" class="mapcontrolslabel"><input type="radio" id="textsearch" name="mapcontrols"> ' + self.localization.getWord('text_search') + '</label><label for="clicksearch" class="mapcontrolslabel"><input type="radio" id="clicksearch" name="mapcontrols"> ' + self.localization.getWord('click_search') + '</label><label for="panzoom" class="mapcontrolslabel"><input type="radio" id="panzoom" name="mapcontrols" checked> ' + self.localization.getWord('pan_and_zoom') + '</label>';
15125
- controlUI.appendChild(clickSearch);
15126
- controlDiv.index = 1;
15127
-
15128
- google.maps.event.addDomListener(clickSearch, 'click', function() {
15129
- var controlsButtonSelections = jQuery("input:radio[name='mapcontrols']:checked").attr("id");
15130
- if (controlsButtonSelections === "textsearch") {
15131
- self.mapSearchTextMode(prompt("Enter a location or postal code:"));
15132
- } else if (controlsButtonSelections === "nearme") {
15133
- self.mapSearchNearMeMode();
15134
- } else if (controlsButtonSelections === "clicksearch") {
15135
- self.mapSearchClickMode();
15136
- } else if (controlsButtonSelections === "panzoom") {
15137
- self.mapSearchPanZoomMode();
15103
+ jQuery.when(jQuery.getJSON(self.config['template_path'] + "/themes/" + self.config['theme'] + ".json").then(
15104
+ function (data, textStatus, jqXHR) {
15105
+ return self.config["theme_js"] = data["google_map_theme"];
15138
15106
  }
15139
- });
15107
+ )).then(function() {
15108
+ self.map = new google.maps.Map(document.getElementById('bmlt-map'), {
15109
+ zoom: self.config['map_search']['zoom'] || 10,
15110
+ center: {
15111
+ lat: self.config['map_search']['latitude'],
15112
+ lng: self.config['map_search']['longitude'],
15113
+ },
15114
+ mapTypeControl: false,
15115
+ styles: self.config["theme_js"]
15116
+ });
15140
15117
 
15141
- self.map.controls[google.maps.ControlPosition.TOP_LEFT].push(controlDiv);
15142
- self.map.addListener('click', function (data) {
15143
- if (self.mapClickSearchMode) {
15144
- self.mapSearchPanZoomMode();
15145
- jQuery("#panzoom").prop("checked", true);
15146
- self.searchByCoordinates(data.latLng.lat(), data.latLng.lng());
15147
- }
15148
- });
15118
+ var controlDiv = document.createElement('div');
15119
+
15120
+ // Set CSS for the control border
15121
+ var controlUI = document.createElement('div');
15122
+ controlUI.className = 'mapcontrolcontainer';
15123
+ controlUI.title = 'Click to recenter the map';
15124
+ controlDiv.appendChild(controlUI);
15125
+
15126
+ // Set CSS for the control interior
15127
+ var clickSearch = document.createElement('div');
15128
+ clickSearch.className = 'mapcontrols';
15129
+ clickSearch.innerHTML = '<label for="nearme" class="mapcontrolslabel"><input type="radio" id="nearme" name="mapcontrols"> ' + self.localization.getWord('near_me') + '</label><label for="textsearch" class="mapcontrolslabel"><input type="radio" id="textsearch" name="mapcontrols"> ' + self.localization.getWord('text_search') + '</label><label for="clicksearch" class="mapcontrolslabel"><input type="radio" id="clicksearch" name="mapcontrols"> ' + self.localization.getWord('click_search') + '</label><label for="panzoom" class="mapcontrolslabel"><input type="radio" id="panzoom" name="mapcontrols" checked> ' + self.localization.getWord('pan_and_zoom') + '</label>';
15130
+ controlUI.appendChild(clickSearch);
15131
+ controlDiv.index = 1;
15132
+
15133
+ google.maps.event.addDomListener(clickSearch, 'click', function () {
15134
+ var controlsButtonSelections = jQuery("input:radio[name='mapcontrols']:checked").attr("id");
15135
+ if (controlsButtonSelections === "textsearch") {
15136
+ self.mapSearchTextMode(prompt("Enter a location or postal code:"));
15137
+ } else if (controlsButtonSelections === "nearme") {
15138
+ self.mapSearchNearMeMode();
15139
+ } else if (controlsButtonSelections === "clicksearch") {
15140
+ self.mapSearchClickMode();
15141
+ } else if (controlsButtonSelections === "panzoom") {
15142
+ self.mapSearchPanZoomMode();
15143
+ }
15144
+ });
15149
15145
 
15150
- if (self.config['map_search']['auto']) {
15151
- self.mapSearchNearMeMode();
15152
- } else if (self.config['map_search']['location'] !== undefined) {
15153
- self.mapSearchTextMode(self.config['map_search']['location']);
15154
- } else if (self.config['map_search']['coordinates_search']) {
15155
- self.searchByCoordinates(self.config['map_search']['latitude'], self.config['map_search']['longitude']);
15156
- }
15146
+ self.map.controls[google.maps.ControlPosition.TOP_LEFT].push(controlDiv);
15147
+ self.map.addListener('click', function (data) {
15148
+ if (self.mapClickSearchMode) {
15149
+ self.mapSearchPanZoomMode();
15150
+ jQuery("#panzoom").prop("checked", true);
15151
+ self.searchByCoordinates(data.latLng.lat(), data.latLng.lng());
15152
+ }
15153
+ });
15154
+
15155
+ if (self.config['map_search']['auto']) {
15156
+ self.mapSearchNearMeMode();
15157
+ } else if (self.config['map_search']['location'] !== undefined) {
15158
+ self.mapSearchTextMode(self.config['map_search']['location']);
15159
+ } else if (self.config['map_search']['coordinates_search']) {
15160
+ self.searchByCoordinates(self.config['map_search']['latitude'], self.config['map_search']['longitude']);
15161
+ }
15162
+ })
15157
15163
  };
15158
15164
 
15159
15165
  Crouton.prototype.initMap = function(callback) {