@bmlt-enabled/croutonjs 4.1.4 → 4.1.6

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.
@@ -11410,6 +11410,8 @@ function CroutonLocalization(language) {
11410
11410
  "address_lookup_fail": "Die Adresse konnte nicht gefunden werden. Bitte versuchen Sie es erneut.",
11411
11411
  "contact": "Kontakt",
11412
11412
  "distance": "Entfernung",
11413
+ "all meetings": "Alle Meetings",
11414
+ 'upcoming meetings': "Nächste 24 Stunden",
11413
11415
  },
11414
11416
  'el-GR': {
11415
11417
  "days_of_the_week": ["", "Κυριακή", "Δευτέρα", "Τρίτη", "Τετάρτη", "Πέμπτη", "Παρασκευή", "Σάββατο"],
@@ -11500,6 +11502,8 @@ function CroutonLocalization(language) {
11500
11502
  "meets virtually": "Διαδικτυακή ομάδα",
11501
11503
  "meets in person": "Φυσική ομάδα",
11502
11504
  "meets virtually and in person": "Διαδικτυακή και φυσική ομάδα",
11505
+ "all meetings": "Όλες οι ομάδες",
11506
+ "upcoming meetings": "Προσεχείς ομάδες",
11503
11507
  },
11504
11508
  "en-AU": {
11505
11509
  "days_of_the_week": ["", "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
@@ -11866,6 +11870,8 @@ function CroutonLocalization(language) {
11866
11870
  "address": "Address",
11867
11871
  "comments": "Comments",
11868
11872
  "more info": "More Info",
11873
+ "all meetings": "All Meetings",
11874
+ 'upcoming meetings': "Upcoming Meetings",
11869
11875
  },
11870
11876
  "es-US": {
11871
11877
  "days_of_the_week": ["", "Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado"],
@@ -15280,7 +15286,7 @@ function Crouton(config) {
15280
15286
  self.currentView = "weekday";
15281
15287
  self.distanceTabAllowed = false;
15282
15288
  self.config = {
15283
- version: '4.1.4', // CroutonJS version for debugging
15289
+ version: '4.1.6', // CroutonJS version for debugging
15284
15290
  on_complete: null, // Javascript function to callback when data querying is completed.
15285
15291
  root_server: null, // The root server to use.
15286
15292
  placeholder_id: "bmlt-tabs", // The DOM id that will be used for rendering
@@ -15318,7 +15324,7 @@ function Crouton(config) {
15318
15324
  has_meeting_count: false, // Shows the meeting count
15319
15325
  recurse_service_bodies: false,// Recurses service bodies when making service bodies request
15320
15326
  service_body: [], // Array of service bodies to return data for.
15321
- formats: '', // Return only meetings with these formats (format shared-id, not key-string)
15327
+ formats: [], // Return only meetings with these formats (format shared-id, not key-string)
15322
15328
  venue_types: [], // Return only meetings with this venue type (1, 2 or 3)
15323
15329
  meeting_details_href: '', // Link to the meeting details page
15324
15330
  virtual_meeting_details_href: '', // Link to the virtual meeting details page
@@ -15436,6 +15442,7 @@ function Crouton(config) {
15436
15442
  url += self.config['formats'].reduce(function(prev,id) {
15437
15443
  return prev +'&formats[]='+id;
15438
15444
  }, '');
15445
+ if (self.config['formatComparisonOp'] === 'OR') url += '&formats_comparison_operator=OR';
15439
15446
  }
15440
15447
  if (self.config.map_search && !Array.isArray(self.config['venue_types'])) {
15441
15448
  self.config['venue_types'] = [];
@@ -15528,10 +15535,10 @@ function Crouton(config) {
15528
15535
  }
15529
15536
  } else if (viewName=='map') {
15530
15537
  self.mapView();
15531
- } else if (jQuery('#groupingButton_'+viewName.toUpperCase()).length == 0) {
15532
- self.groupedView(self.config.grouping_buttons.find((bf) => bf.title.toLowerCase() === viewName).field);
15538
+ } else if (jQuery('#groupingButton_'+viewName).length == 0) {
15539
+ self.groupedView(self.config.grouping_buttons.find((bf) => bf.title.toLowerCase() === viewName.toLowerCase()).field);
15533
15540
  } else {
15534
- self.groupedView(viewName.toUpperCase());
15541
+ self.groupedView(viewName);
15535
15542
  }
15536
15543
  };
15537
15544
 
@@ -16063,7 +16070,7 @@ function Crouton(config) {
16063
16070
  });
16064
16071
  return groups;
16065
16072
  }
16066
- Crouton.prototype.updateDistances = function() {
16073
+ Crouton.prototype.updateDistances = function(initial=false) {
16067
16074
  const self = this;
16068
16075
  var knt = 0;
16069
16076
  jQuery('.meeting-distance').each(function(index) {
@@ -16114,6 +16121,7 @@ function Crouton(config) {
16114
16121
  if (knt > 0) {
16115
16122
  jQuery('#groupingButton_distance_in_km').removeClass('hide');
16116
16123
  self.distanceTabAllowed = true;
16124
+ if (initial && self.config.view_by === "distance") self.groupedView("distance_in_km");
16117
16125
  }
16118
16126
  }
16119
16127
  self.registerPartial = function(name, template) {
@@ -16721,7 +16729,7 @@ Crouton.prototype.render = function(doMeetingMap = false, fitBounds=true) {
16721
16729
  });
16722
16730
 
16723
16731
  jQuery(".groupingButtonLogic").on('click', function (e) {
16724
- self.showView(e.target.attributes['data-field'].value.toLowerCase());
16732
+ self.showView(e.target.attributes['data-field'].value);
16725
16733
  });
16726
16734
  jQuery('#groupingButton_embeddedMapPage').on('click', function (e) {
16727
16735
  self.showView('map')
@@ -17319,19 +17327,19 @@ function MeetingMap(inConfig) {
17319
17327
  </label>
17320
17328
  </div>
17321
17329
  </div>`;
17322
- rules = [`.onoffswitch-inner:before {
17323
- content: "__text__";
17330
+ let rules = `.onoffswitch-inner:before {
17331
+ content: "__text1__";
17324
17332
  padding-left: 10px;
17325
17333
  background-color: #2d5c88; color: #FFFFFF;
17326
- }`,
17327
- `.onoffswitch-inner:after {
17328
- content: "__text__";
17334
+ }
17335
+ .onoffswitch-inner:after {
17336
+ content: "__text2__";
17329
17337
  padding-left: 30px;
17330
17338
  background-color: #EEEEEE; color: #2d5c88;
17331
17339
  text-align: left;
17332
- }`];
17333
- rules[0] = rules[0].replace("__text__", crouton.localization.getWord("Upcoming Meetings"));
17334
- rules[1] = rules[1].replace("__text__", crouton.localization.getWord("All Meetings"));
17340
+ }`
17341
+ .replace("__text1__", crouton.localization.getWord("Upcoming Meetings"))
17342
+ .replace("__text2__", crouton.localization.getWord("All Meetings"));
17335
17343
  var controlDiv = document.createElement('div');
17336
17344
  controlDiv.innerHTML = toggleSrc;
17337
17345
  controlDiv.querySelector(".onoffswitch").addEventListener('click', function (event) {
@@ -17341,8 +17349,9 @@ function MeetingMap(inConfig) {
17341
17349
  crouton.filterNext24(next24status);
17342
17350
  fitDuringFilter = true;
17343
17351
  });
17344
- document.styleSheets[0].insertRule(rules[0]);
17345
- document.styleSheets[0].insertRule(rules[1]);
17352
+ let style = document.createElement('style');
17353
+ style.innerHTML = rules;
17354
+ document.head.appendChild(style);
17346
17355
  return controlDiv;
17347
17356
  }
17348
17357
  function createMenuButton(menuContext) {
@@ -17541,7 +17550,7 @@ function MeetingMap(inConfig) {
17541
17550
  filterVisible(isFilterVisible());
17542
17551
  });
17543
17552
  gSearchPoint = {"lat": position.coords.latitude, "lng": position.coords.longitude};
17544
- crouton.updateDistances();
17553
+ crouton.updateDistances(true);
17545
17554
  },
17546
17555
  showGeocodingDialog
17547
17556
  );