@bmlt-enabled/croutonjs 4.1.1 → 4.1.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.
- package/crouton-gmaps.js +35 -16
- package/crouton-gmaps.min.js +6 -6
- package/crouton-gmaps.min.js.map +1 -1
- package/crouton-map.js +4 -1
- package/crouton-map.min.js +1 -1
- package/crouton-map.min.js.map +1 -1
- package/crouton.js +35 -16
- package/crouton.min.js +6 -6
- package/crouton.min.js.map +1 -1
- package/crouton.nojquery.js +31 -15
- package/crouton.nojquery.min.js +6 -6
- package/crouton.nojquery.min.js.map +1 -1
- package/package.json +1 -1
package/crouton.nojquery.js
CHANGED
|
@@ -11976,7 +11976,7 @@ function CroutonLocalization(language) {
|
|
|
11976
11976
|
"google_directions": "مسیرهای Google به جلسه",
|
|
11977
11977
|
"apple_directions": "مسیرهای Apple به جلسه",
|
|
11978
11978
|
"no_meetings_for_this_day": "هیچ جلسه ای در این روز وجود ندارد",
|
|
11979
|
-
"css-direction: bmlt-rtl"
|
|
11979
|
+
"css-direction": "bmlt-rtl",
|
|
11980
11980
|
"bootstrap-popover-placement": "left",
|
|
11981
11981
|
"adjust search": "تنظیم جستجو",
|
|
11982
11982
|
"this number represents": "این عدد نشان دهنده",
|
|
@@ -13279,7 +13279,9 @@ this["hbs_Crouton"]["templates"]["groupDetails"] = Handlebars.template({"1":func
|
|
|
13279
13279
|
return undefined
|
|
13280
13280
|
};
|
|
13281
13281
|
|
|
13282
|
-
return "<div class=\"card group
|
|
13282
|
+
return "<div class=\"card group "
|
|
13283
|
+
+ container.escapeExpression((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias2).call(alias1,"css-direction",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":1,"column":23},"end":{"line":1,"column":50}}}))
|
|
13284
|
+
+ "\">\n <div class=\"card-body\">\n <div class=\"card-title header-elements\" style=\"display: flex; justify-content:space-between; align-items:center;\">\n"
|
|
13283
13285
|
+ ((stack1 = container.invokePartial(lookupProperty(partials,"groupTitle"),depth0,{"name":"groupTitle","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "")
|
|
13284
13286
|
+ " </div>\n <div class=\"row\" "
|
|
13285
13287
|
+ ((stack1 = (lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias2).call(alias1,"css-textAlign",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":6,"column":25},"end":{"line":6,"column":54}}})) != null ? stack1 : "")
|
|
@@ -15278,7 +15280,7 @@ function Crouton(config) {
|
|
|
15278
15280
|
self.currentView = "weekday";
|
|
15279
15281
|
self.distanceTabAllowed = false;
|
|
15280
15282
|
self.config = {
|
|
15281
|
-
version: '4.1.
|
|
15283
|
+
version: '4.1.3', // CroutonJS version for debugging
|
|
15282
15284
|
on_complete: null, // Javascript function to callback when data querying is completed.
|
|
15283
15285
|
root_server: null, // The root server to use.
|
|
15284
15286
|
placeholder_id: "bmlt-tabs", // The DOM id that will be used for rendering
|
|
@@ -16052,10 +16054,10 @@ function Crouton(config) {
|
|
|
16052
16054
|
commonFormats = commonFormats.filter(value => memberFormats.includes(value));
|
|
16053
16055
|
});
|
|
16054
16056
|
group['formats'] = commonFormats.join(',');
|
|
16055
|
-
group['formats_expanded'] = group['formats_expanded'].filter((format) => commonFormats.includes(format['key']));
|
|
16057
|
+
if (group['formats_expanded']) group['formats_expanded'] = group['formats_expanded'].filter((format) => commonFormats.includes(format['key']));
|
|
16056
16058
|
group['membersOfGroup'].forEach(function(member) {
|
|
16057
16059
|
member['formats'] = member['formats'].split(',').filter((f) => !commonFormats.includes(f)).join(',');
|
|
16058
|
-
member['formats_expanded'] = member['formats_expanded'].filter((format) => !commonFormats.includes(format['key']));
|
|
16060
|
+
if (member['formats_expanded']) member['formats_expanded'] = member['formats_expanded'].filter((format) => !commonFormats.includes(format['key']));
|
|
16059
16061
|
});
|
|
16060
16062
|
}
|
|
16061
16063
|
});
|
|
@@ -17184,7 +17186,9 @@ function MeetingMap(inConfig) {
|
|
|
17184
17186
|
}
|
|
17185
17187
|
});
|
|
17186
17188
|
}
|
|
17187
|
-
|
|
17189
|
+
function isFilterVisible() {
|
|
17190
|
+
return config.filter_visible && config.filter_visible == 1;
|
|
17191
|
+
}
|
|
17188
17192
|
/************************************************************************************//**
|
|
17189
17193
|
* \brief Load the map and set it up. *
|
|
17190
17194
|
****************************************************************************************/
|
|
@@ -17211,7 +17215,7 @@ function MeetingMap(inConfig) {
|
|
|
17211
17215
|
if (handlebarMapOptions) loc = {latitude: handlebarMapOptions.lat, longitude: handlebarMapOptions.lng};
|
|
17212
17216
|
if (gDelegate.createMap(inDiv, loc, hide)) {
|
|
17213
17217
|
// crouton_map and filter_visible triggers a query, Otherwise, redraw markers
|
|
17214
|
-
if (config.map_search &&
|
|
17218
|
+
if (config.map_search && isFilterVisible()) {
|
|
17215
17219
|
gDelegate.addListener('idle', triggerCroutonMapNewQuery, false);
|
|
17216
17220
|
} else {
|
|
17217
17221
|
gDelegate.addListener('zoomend', function (ev) {
|
|
@@ -17509,7 +17513,7 @@ function MeetingMap(inConfig) {
|
|
|
17509
17513
|
let lat_lngs = gAllMeetings.reduce(function(a,m) {a.push([m.latitude, m.longitude]); return a;},[]);
|
|
17510
17514
|
const maxRadius = config.maxTomatoWidth/2.0;
|
|
17511
17515
|
if (gSearchPoint) lat_lngs.push([gSearchPoint.lat, gSearchPoint.lng]);
|
|
17512
|
-
if (config.map_search &&
|
|
17516
|
+
if (config.map_search && isFilterVisible()) {
|
|
17513
17517
|
lat_lngs.sort((a,b) => getDistance({"lat":a[0],"lng":a[1]},gSearchPoint) - getDistance({"lat":b[0],"lng":b[1]},gSearchPoint));
|
|
17514
17518
|
while (getLatLngRadius(lat_lngs) > maxRadius && lat_lngs.length > 3) {
|
|
17515
17519
|
lat_lngs = lat_lngs.slice(0, lat_lngs.length/2);
|
|
@@ -17517,18 +17521,21 @@ function MeetingMap(inConfig) {
|
|
|
17517
17521
|
if (getLatLngRadius(lat_lngs) > maxRadius)
|
|
17518
17522
|
lat_lngs = lat_lngs.slice(1,1);
|
|
17519
17523
|
}
|
|
17520
|
-
gDelegate.fitBounds(lat_lngs);
|
|
17524
|
+
if (lat_lngs.length > 0) gDelegate.fitBounds(lat_lngs);
|
|
17521
17525
|
}
|
|
17522
17526
|
searchResponseCallback();
|
|
17523
17527
|
hideThrobber();
|
|
17524
|
-
if (
|
|
17528
|
+
if (isFilterVisible() || config.centerMe || config.goto) crouton.forceShowMap();
|
|
17525
17529
|
if (config.centerMe) {
|
|
17526
17530
|
if (navigator.geolocation) {
|
|
17527
17531
|
navigator.geolocation.getCurrentPosition(
|
|
17528
17532
|
function (position) {
|
|
17529
17533
|
coords = {latitude: position.coords.latitude, longitude: position.coords.longitude};
|
|
17530
17534
|
filterVisible(false);
|
|
17531
|
-
gDelegate.
|
|
17535
|
+
if (config.zoom) gDelegate.setZoom(false, config.zoom);
|
|
17536
|
+
gDelegate.setViewToPosition(coords, filterMeetingsAndBounds, () => {
|
|
17537
|
+
filterVisible(isFilterVisible());
|
|
17538
|
+
});
|
|
17532
17539
|
gSearchPoint = {"lat": position.coords.latitude, "lng": position.coords.longitude};
|
|
17533
17540
|
crouton.updateDistances();
|
|
17534
17541
|
},
|
|
@@ -17538,10 +17545,10 @@ function MeetingMap(inConfig) {
|
|
|
17538
17545
|
showGeocodingDialog();
|
|
17539
17546
|
}
|
|
17540
17547
|
} else {
|
|
17541
|
-
if ((!config.centerMe && !config.goto) && !(config.map_search &&
|
|
17542
|
-
gDelegate.afterInit(()=>filterVisible(
|
|
17548
|
+
if ((!config.centerMe && !config.goto) && !(config.map_search && isFilterVisible())) {
|
|
17549
|
+
gDelegate.afterInit(()=>filterVisible(isFilterVisible()));
|
|
17543
17550
|
}
|
|
17544
|
-
if (config.goto) gDelegate.callGeocoder(config.goto, resetVisibleThenFilterMeetingsAndBounds);
|
|
17551
|
+
if (config.goto) gDelegate.callGeocoder(config.goto, isFilterVisible() ? resetVisibleThenFilterMeetingsAndBounds : setVisibleThenFilterMeetingsAndBounds);
|
|
17545
17552
|
}
|
|
17546
17553
|
}
|
|
17547
17554
|
function createCityHash(allMeetings) {
|
|
@@ -17644,6 +17651,15 @@ function MeetingMap(inConfig) {
|
|
|
17644
17651
|
}
|
|
17645
17652
|
return ret;
|
|
17646
17653
|
}
|
|
17654
|
+
function setVisibleThenFilterMeetingsAndBounds(bounds, center=null) {
|
|
17655
|
+
filterVisible(false);
|
|
17656
|
+
const ret = filterMeetingsAndBounds(bounds);
|
|
17657
|
+
if (gSearchPoint.lat != center.lat || gSearchPoint.lng != center.lng) {
|
|
17658
|
+
gSearchPoint = center;
|
|
17659
|
+
crouton.updateDistances();
|
|
17660
|
+
}
|
|
17661
|
+
return ret;
|
|
17662
|
+
}
|
|
17647
17663
|
function lookupLocation(fullscreen) {
|
|
17648
17664
|
if (document.getElementById('goto-text').value != '') {
|
|
17649
17665
|
if (fullscreen) {
|
|
@@ -17841,7 +17857,7 @@ function MeetingMap(inConfig) {
|
|
|
17841
17857
|
function onDragEnd() {
|
|
17842
17858
|
isMouseDown = false;
|
|
17843
17859
|
// if no [crouton_map], then turn filter visible back on.
|
|
17844
|
-
if (config.map_search &&
|
|
17860
|
+
if (config.map_search && isFilterVisible()) triggerCroutonMapNewQuery(null);
|
|
17845
17861
|
else filterVisible(true);
|
|
17846
17862
|
}
|
|
17847
17863
|
function triggerCroutonMapNewQuery(ev) {
|