@bmlt-enabled/croutonjs 3.22.4 → 3.24.0
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-core.css +5 -18
- package/crouton-core.min.css +1 -1
- package/crouton-gmaps.js +386 -154
- package/crouton-gmaps.min.js +5 -5
- package/crouton-gmaps.min.js.map +1 -1
- package/crouton-map.js +77 -12
- package/crouton-map.min.js +1 -1
- package/crouton-map.min.js.map +1 -1
- package/crouton.css +5 -18
- package/crouton.js +391 -142
- package/crouton.min.css +1 -1
- package/crouton.min.js +5 -5
- package/crouton.min.js.map +1 -1
- package/crouton.nojquery.js +314 -130
- package/crouton.nojquery.min.js +5 -5
- package/crouton.nojquery.min.js.map +1 -1
- package/package.json +1 -1
- package/templates/themes/florida-nights.css +3 -8
- package/templates/themes/frog.css +2 -8
- package/templates/themes/one-nine.css +2 -8
- package/templates/themes/seattle-rain.css +3 -8
- package/templates/themes/truth.css +2 -8
package/crouton.nojquery.js
CHANGED
|
@@ -13337,6 +13337,7 @@ function CroutonLocalization(language) {
|
|
|
13337
13337
|
'report update': "Report an Update",
|
|
13338
13338
|
'filter by visibility': "List only these meetings",
|
|
13339
13339
|
'go': "Go!",
|
|
13340
|
+
"distance": "Afstand",
|
|
13340
13341
|
"get_directions": "Få vejvisning",
|
|
13341
13342
|
"select_map_app": "Vælg kortapp",
|
|
13342
13343
|
"apple_maps": "Apple Maps",
|
|
@@ -13345,6 +13346,7 @@ function CroutonLocalization(language) {
|
|
|
13345
13346
|
"google_maps_desc_mobile": "Åbn i Google Maps app",
|
|
13346
13347
|
"waze": "Waze",
|
|
13347
13348
|
"waze_desc": "Åbn i Waze app",
|
|
13349
|
+
"sorted by distance": "Sorteret efter Afstand",
|
|
13348
13350
|
},
|
|
13349
13351
|
"de-DE":{
|
|
13350
13352
|
"days_of_the_week": ["", "Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"],
|
|
@@ -13407,10 +13409,13 @@ function CroutonLocalization(language) {
|
|
|
13407
13409
|
"apple_maps": "Apple Maps",
|
|
13408
13410
|
"apple_maps_desc": "In Apple Maps App öffnen",
|
|
13409
13411
|
"google_maps": "Google Maps",
|
|
13412
|
+
"distance": "Entfernung",
|
|
13410
13413
|
"google_maps_desc_mobile": "In Google Maps App öffnen",
|
|
13411
13414
|
"waze": "Waze",
|
|
13412
13415
|
"waze_desc": "In Waze App öffnen",
|
|
13413
13416
|
"remember my choice": "Auswahl speichern",
|
|
13417
|
+
"zoomed-out-message": "Wir können nicht die ganze Fläche nach Meetings durchsuchen. Bitte reinzoomen oder eine neue Suche machen.",
|
|
13418
|
+
"sorted by distance": "Sortiert nach Entfernung",
|
|
13414
13419
|
},
|
|
13415
13420
|
"en-AU": {
|
|
13416
13421
|
"days_of_the_week" : ["", "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
|
|
@@ -13476,6 +13481,8 @@ function CroutonLocalization(language) {
|
|
|
13476
13481
|
"google_maps_desc_mobile": "Open in Google Maps app",
|
|
13477
13482
|
"waze": "Waze",
|
|
13478
13483
|
"waze_desc": "Open in Waze app",
|
|
13484
|
+
"zoomed-out-message": "We can't search the entire area for meetings. Please zoom in or do a new search.",
|
|
13485
|
+
"sorted by distance": "Sorted by Distance",
|
|
13479
13486
|
},
|
|
13480
13487
|
"en-CA": {
|
|
13481
13488
|
"days_of_the_week" : ["", "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
|
|
@@ -13542,6 +13549,8 @@ function CroutonLocalization(language) {
|
|
|
13542
13549
|
"google_maps_desc_mobile": "Open in Google Maps app",
|
|
13543
13550
|
"waze": "Waze",
|
|
13544
13551
|
"waze_desc": "Open in Waze app",
|
|
13552
|
+
"zoomed-out-message": "We can't search the entire area for meetings. Please zoom in or do a new search.",
|
|
13553
|
+
"sorted by distance": "Sorted by Distance",
|
|
13545
13554
|
},
|
|
13546
13555
|
"en-NZ": {
|
|
13547
13556
|
"days_of_the_week" : ["", "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
|
|
@@ -13608,6 +13617,8 @@ function CroutonLocalization(language) {
|
|
|
13608
13617
|
"google_maps_desc_mobile": "Open in Google Maps app",
|
|
13609
13618
|
"waze": "Waze",
|
|
13610
13619
|
"waze_desc": "Open in Waze app",
|
|
13620
|
+
"zoomed-out-message": "We can't search the entire area for meetings. Please zoom in or do a new search.",
|
|
13621
|
+
"sorted by distance": "Sorted by Distance",
|
|
13611
13622
|
},
|
|
13612
13623
|
"en-UK": {
|
|
13613
13624
|
"days_of_the_week" : ["", "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
|
|
@@ -13674,6 +13685,8 @@ function CroutonLocalization(language) {
|
|
|
13674
13685
|
"google_maps_desc_mobile": "Open in Google Maps app",
|
|
13675
13686
|
"waze": "Waze",
|
|
13676
13687
|
"waze_desc": "Open in Waze app",
|
|
13688
|
+
"zoomed-out-message": "We can't search the entire area for meetings. Please zoom in or do a new search.",
|
|
13689
|
+
"sorted by distance": "Sorted by Distance",
|
|
13677
13690
|
},
|
|
13678
13691
|
"en-US": {
|
|
13679
13692
|
"days_of_the_week" : ["", "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
|
|
@@ -13740,6 +13753,8 @@ function CroutonLocalization(language) {
|
|
|
13740
13753
|
"google_maps_desc_mobile": "Open in Google Maps app",
|
|
13741
13754
|
"waze": "Waze",
|
|
13742
13755
|
"waze_desc": "Open in Waze app",
|
|
13756
|
+
"zoomed-out-message": "We can't search the entire area for meetings. Please zoom in or do a new search.",
|
|
13757
|
+
"sorted by distance": "Sorted by Distance",
|
|
13743
13758
|
},
|
|
13744
13759
|
"es-US": {
|
|
13745
13760
|
"days_of_the_week" : ["", "Domingo", " Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado"],
|
|
@@ -13798,6 +13813,7 @@ function CroutonLocalization(language) {
|
|
|
13798
13813
|
'report update': "Actualización de informe",
|
|
13799
13814
|
'filter by visibility': "Listar solo estas reuniones",
|
|
13800
13815
|
'go': "¡Adelante!",
|
|
13816
|
+
"distance": "Distancia",
|
|
13801
13817
|
"get_directions": "Obtener Direcciones",
|
|
13802
13818
|
"select_map_app": "Seleccionar Aplicación de Mapas",
|
|
13803
13819
|
"apple_maps": "Apple Maps",
|
|
@@ -13806,6 +13822,8 @@ function CroutonLocalization(language) {
|
|
|
13806
13822
|
"google_maps_desc_mobile": "Abrir en la aplicación Google Maps",
|
|
13807
13823
|
"waze": "Waze",
|
|
13808
13824
|
"waze_desc": "Abrir en la aplicación Waze",
|
|
13825
|
+
"zoomed-out-message": "No podemos buscar reuniones en toda la zona. Por favor, acérquese o haga una nueva búsqueda.",
|
|
13826
|
+
"sorted by distance": "Ordenado por distancia",
|
|
13809
13827
|
},
|
|
13810
13828
|
"fa-IR": {
|
|
13811
13829
|
"days_of_the_week" : ["", 'یَکشَنب', 'دوشَنبه', 'سهشنبه', 'چهار شنبه', 'پَنج شَنبه', 'جُمعه', 'شَنبه'],
|
|
@@ -13862,6 +13880,7 @@ function CroutonLocalization(language) {
|
|
|
13862
13880
|
'report update': "Report an Update",
|
|
13863
13881
|
'filter by visibility': "List only these meetings",
|
|
13864
13882
|
'go': "Go!",
|
|
13883
|
+
"distance": "فاصله",
|
|
13865
13884
|
"get_directions": "دریافت مسیر",
|
|
13866
13885
|
"select_map_app": "انتخاب برنامه نقشه",
|
|
13867
13886
|
"apple_maps": "نقشه اپل",
|
|
@@ -13870,6 +13889,7 @@ function CroutonLocalization(language) {
|
|
|
13870
13889
|
"google_maps_desc_mobile": "باز کردن در برنامه گوگل مپس",
|
|
13871
13890
|
"waze": "ویز",
|
|
13872
13891
|
"waze_desc": "باز کردن در برنامه ویز",
|
|
13892
|
+
"sorted by distance": "مرتب شده بر اساس فاصله",
|
|
13873
13893
|
},
|
|
13874
13894
|
"fr-CA": {
|
|
13875
13895
|
"days_of_the_week" : ["", "Dimanche", "Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi"],
|
|
@@ -13927,6 +13947,7 @@ function CroutonLocalization(language) {
|
|
|
13927
13947
|
'report update': "Report an Update",
|
|
13928
13948
|
'filter by visibility': "List only these meetings",
|
|
13929
13949
|
'go': "Go!",
|
|
13950
|
+
"distance": "Distance",
|
|
13930
13951
|
"get_directions": "Obtenir l'itinéraire",
|
|
13931
13952
|
"select_map_app": "Sélectionner l'application de cartes",
|
|
13932
13953
|
"apple_maps": "Apple Maps",
|
|
@@ -13935,6 +13956,7 @@ function CroutonLocalization(language) {
|
|
|
13935
13956
|
"google_maps_desc_mobile": "Ouvrir dans l'application Google Maps",
|
|
13936
13957
|
"waze": "Waze",
|
|
13937
13958
|
"waze_desc": "Ouvrir dans l'application Waze",
|
|
13959
|
+
"sorted by distance": "Trié par distance",
|
|
13938
13960
|
},
|
|
13939
13961
|
"it-IT": {
|
|
13940
13962
|
"days_of_the_week" : ["", "Domenica", " Lunedì", "Martedì", "Mercoledì", "Giovedì", "Venerdì", "Sabato"],
|
|
@@ -13992,6 +14014,7 @@ function CroutonLocalization(language) {
|
|
|
13992
14014
|
'report update': "Report an Update",
|
|
13993
14015
|
'filter by visibility': "List only these meetings",
|
|
13994
14016
|
'go': "Go!",
|
|
14017
|
+
"distance": "Distanza",
|
|
13995
14018
|
"get_directions": "Ottieni Indicazioni",
|
|
13996
14019
|
"select_map_app": "Seleziona App Mappe",
|
|
13997
14020
|
"apple_maps": "Apple Maps",
|
|
@@ -14000,6 +14023,7 @@ function CroutonLocalization(language) {
|
|
|
14000
14023
|
"google_maps_desc_mobile": "Apri nell'app Google Maps",
|
|
14001
14024
|
"waze": "Waze",
|
|
14002
14025
|
"waze_desc": "Apri nell'app Waze",
|
|
14026
|
+
"sorted by distance": "Ordinati per distanza",
|
|
14003
14027
|
},
|
|
14004
14028
|
"nl-NL": {
|
|
14005
14029
|
"days_of_the_week" : ["", "Zondag", "Maandag", "Dinsdag", "Woensdag", "Donderdag", "Vrijdag", "Zaterdag"],
|
|
@@ -14065,6 +14089,7 @@ function CroutonLocalization(language) {
|
|
|
14065
14089
|
"google_maps_desc_mobile": "Openen in Google Maps app",
|
|
14066
14090
|
"waze": "Waze",
|
|
14067
14091
|
"waze_desc": "Openen in Waze app",
|
|
14092
|
+
"sorted by distance": "Gesorteerd op afstand",
|
|
14068
14093
|
},
|
|
14069
14094
|
"pl-PL": {
|
|
14070
14095
|
"days_of_the_week" : ["", "Niedziela", "Poniedziałek", "Wtorek", "Środa", "Czwartek", "Piątek", "Sobota"],
|
|
@@ -14122,6 +14147,7 @@ function CroutonLocalization(language) {
|
|
|
14122
14147
|
'report update': "Report an Update",
|
|
14123
14148
|
'filter by visibility': "List only these meetings",
|
|
14124
14149
|
'go': "Go!",
|
|
14150
|
+
"distance": "Odległość",
|
|
14125
14151
|
"get_directions": "Pobierz Wskazówki",
|
|
14126
14152
|
"select_map_app": "Wybierz Aplikację Map",
|
|
14127
14153
|
"apple_maps": "Apple Maps",
|
|
@@ -14130,6 +14156,7 @@ function CroutonLocalization(language) {
|
|
|
14130
14156
|
"google_maps_desc_mobile": "Otwórz w aplikacji Google Maps",
|
|
14131
14157
|
"waze": "Waze",
|
|
14132
14158
|
"waze_desc": "Otwórz w aplikacji Waze",
|
|
14159
|
+
"sorted by distance": "Posortowane według odległości",
|
|
14133
14160
|
},
|
|
14134
14161
|
"pt-BR": {
|
|
14135
14162
|
"days_of_the_week" : ["", "Domingo", "Segunda-feira", "Terça-feira", "Quarta-feira", "Quinta-feira", "Sexta-feira", "Sábado"],
|
|
@@ -14187,6 +14214,7 @@ function CroutonLocalization(language) {
|
|
|
14187
14214
|
'report update': "Report an Update",
|
|
14188
14215
|
'filter by visibility': "List only these meetings",
|
|
14189
14216
|
'go': "Go!",
|
|
14217
|
+
"distance": "Distância",
|
|
14190
14218
|
"get_directions": "Obter Direções",
|
|
14191
14219
|
"select_map_app": "Selecionar Aplicativo de Mapas",
|
|
14192
14220
|
"apple_maps": "Apple Maps",
|
|
@@ -14195,6 +14223,7 @@ function CroutonLocalization(language) {
|
|
|
14195
14223
|
"google_maps_desc_mobile": "Abrir no aplicativo Google Maps",
|
|
14196
14224
|
"waze": "Waze",
|
|
14197
14225
|
"waze_desc": "Abrir no aplicativo Waze",
|
|
14226
|
+
"sorted by distance": "Classificado por distância",
|
|
14198
14227
|
},
|
|
14199
14228
|
"ru-RU": {
|
|
14200
14229
|
"days_of_the_week" : ["", "Воскресенье", "Понедельник", "Вторник", "Среда", "Четверг", "Пятница", "Суббота"],
|
|
@@ -14252,6 +14281,7 @@ function CroutonLocalization(language) {
|
|
|
14252
14281
|
'report update': "Report an Update",
|
|
14253
14282
|
'filter by visibility': "List only these meetings",
|
|
14254
14283
|
'go': "Go!",
|
|
14284
|
+
"distance": "Расстояние",
|
|
14255
14285
|
"get_directions": "Проложить маршрут",
|
|
14256
14286
|
"select_map_app": "Выбрать приложение карт",
|
|
14257
14287
|
"apple_maps": "Apple Maps",
|
|
@@ -14260,6 +14290,7 @@ function CroutonLocalization(language) {
|
|
|
14260
14290
|
"google_maps_desc_mobile": "Открыть в приложении Google Maps",
|
|
14261
14291
|
"waze": "Waze",
|
|
14262
14292
|
"waze_desc": "Открыть в приложении Waze",
|
|
14293
|
+
"sorted by distance": "Сортировка по расстоянию",
|
|
14263
14294
|
},
|
|
14264
14295
|
"sv-SE": {
|
|
14265
14296
|
"days_of_the_week" : ["", "Söndag", "Måndag", "Tisdag", "Onsdag", "Torsdag", "Fredag", "Lördag"],
|
|
@@ -14325,6 +14356,7 @@ function CroutonLocalization(language) {
|
|
|
14325
14356
|
"google_maps_desc_mobile": "Öppna i Google Maps-appen",
|
|
14326
14357
|
"waze": "Waze",
|
|
14327
14358
|
"waze_desc": "Öppna i Waze-appen",
|
|
14359
|
+
"sorted by distance": "Sorterade efter avstånd",
|
|
14328
14360
|
}
|
|
14329
14361
|
};
|
|
14330
14362
|
}
|
|
@@ -14364,8 +14396,8 @@ this["hbs_Crouton"]["templates"]["byday"] = Handlebars.template({"1":function(co
|
|
|
14364
14396
|
+ ((stack1 = (lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias2).call(alias1,"css-textAlign",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":3,"column":39},"end":{"line":3,"column":68}}})) != null ? stack1 : "")
|
|
14365
14397
|
+ ">\n <div class=\"group-header\">"
|
|
14366
14398
|
+ alias4(alias3((depth0 != null ? lookupProperty(depth0,"day") : depth0), depth0))
|
|
14367
|
-
+ "</div>\n <div class=\"group-table-div\">\n <table class='bmlt-table table table-
|
|
14368
|
-
+ alias4((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias2).call(alias1,"css-direction",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":6,"column":
|
|
14399
|
+
+ "</div>\n <div class=\"group-table-div\">\n <table class='bmlt-table table table-hover table-bordered tablesaw tablesaw-stack "
|
|
14400
|
+
+ alias4((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias2).call(alias1,"css-direction",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":6,"column":102},"end":{"line":6,"column":129}}}))
|
|
14369
14401
|
+ "'>\n <tbody class=\"h-"
|
|
14370
14402
|
+ alias4(alias3((depth0 != null ? lookupProperty(depth0,"day") : depth0), depth0))
|
|
14371
14403
|
+ "\">\n"
|
|
@@ -14397,8 +14429,8 @@ this["hbs_Crouton"]["templates"]["byfield"] = Handlebars.template({"1":function(
|
|
|
14397
14429
|
+ ((stack1 = (lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias3).call(alias2,"css-textAlign",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":3,"column":63},"end":{"line":3,"column":92}}})) != null ? stack1 : "")
|
|
14398
14430
|
+ ">\n <div class=\"group-header\">"
|
|
14399
14431
|
+ alias1(((helper = (helper = lookupProperty(helpers,"key") || (data && lookupProperty(data,"key"))) != null ? helper : alias3),(typeof helper === "function" ? helper.call(alias2,{"name":"key","hash":{},"data":data,"loc":{"start":{"line":4,"column":42},"end":{"line":4,"column":50}}}) : helper)))
|
|
14400
|
-
+ "</div>\n <div class=\"group-table-div\">\n <table class='bmlt-table table table-
|
|
14401
|
-
+ alias1((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias3).call(alias2,"css-direction",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":6,"column":
|
|
14432
|
+
+ "</div>\n <div class=\"group-table-div\">\n <table class='bmlt-table table table-hover table-bordered tablesaw tablesaw-stack "
|
|
14433
|
+
+ alias1((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias3).call(alias2,"css-direction",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":6,"column":87},"end":{"line":6,"column":114}}}))
|
|
14402
14434
|
+ "'>\n <tbody class=\"byfield.hbs\">\n"
|
|
14403
14435
|
+ ((stack1 = container.invokePartial(lookupProperty(partials,"meetings"),(depth0 != null ? lookupProperty(depth0,"group") : depth0),{"name":"meetings","data":data,"indent":" \t","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "")
|
|
14404
14436
|
+ " </tbody>\n </table>\n </div>\n </div>\n";
|
|
@@ -14801,19 +14833,8 @@ this["hbs_Crouton"]["templates"]["mapMenu"] = Handlebars.template({"1":function(
|
|
|
14801
14833
|
+ alias1((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias3).call(alias2,"go",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":49,"column":59},"end":{"line":49,"column":75}}}))
|
|
14802
14834
|
+ "</button>\n </div>\n </div>\n</div>\n\n";
|
|
14803
14835
|
},"usePartial":true,"useData":true,"useDepths":true});
|
|
14804
|
-
this["hbs_Crouton"]["templates"]["mapSearch"] = Handlebars.template({"
|
|
14805
|
-
var lookupProperty = container.lookupProperty || function(parent, propertyName) {
|
|
14806
|
-
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
14807
|
-
return parent[propertyName];
|
|
14808
|
-
}
|
|
14809
|
-
return undefined
|
|
14810
|
-
};
|
|
14811
|
-
|
|
14812
|
-
return " <div class=\"modal-search\">\n <button id=\"bmltsearch-clicksearch\" class=\"filter-button\">"
|
|
14813
|
-
+ container.escapeExpression((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||container.hooks.helperMissing).call(depth0 != null ? depth0 : (container.nullContext || {}),"click_search",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":19,"column":86},"end":{"line":20,"column":48}}}))
|
|
14814
|
-
+ "</button>\n </div>\n";
|
|
14815
|
-
},"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) {
|
|
14816
|
-
var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) {
|
|
14836
|
+
this["hbs_Crouton"]["templates"]["mapSearch"] = Handlebars.template({"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) {
|
|
14837
|
+
var alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) {
|
|
14817
14838
|
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
14818
14839
|
return parent[propertyName];
|
|
14819
14840
|
}
|
|
@@ -14826,15 +14847,17 @@ this["hbs_Crouton"]["templates"]["mapSearch"] = Handlebars.template({"1":functio
|
|
|
14826
14847
|
+ alias3((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias2).call(alias1,"Search for meetings",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":2,"column":62},"end":{"line":2,"column":95}}}))
|
|
14827
14848
|
+ "</span>\n</button>\n<div id=\"bmltsearch_modal\" class=\"modal\" style=\"display: none;\">\n <div id=\"bmltsearch_content\" class=\"modal-content\">\n <span id=\"close_search\" class=\"modal-close\">x</span>\n <div id=\"modal-search-page\">\n <div class=\"modal-title\">"
|
|
14828
14849
|
+ alias3((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias2).call(alias1,"Search for meetings",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":8,"column":37},"end":{"line":8,"column":70}}}))
|
|
14829
|
-
+ "</div>\n
|
|
14830
|
-
+ alias3((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias2).call(alias1,"
|
|
14831
|
-
+ "\"
|
|
14832
|
-
+ alias3((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias2).call(alias1,"
|
|
14833
|
-
+ "
|
|
14834
|
-
+ alias3((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias2).call(alias1,"
|
|
14835
|
-
+ "</button>\n
|
|
14836
|
-
+ ((
|
|
14837
|
-
+ " <button id=\"
|
|
14850
|
+
+ "</div>\n <div id=\"zoomed-out-message\" class=\"hide\">\n <p>"
|
|
14851
|
+
+ alias3((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias2).call(alias1,"zoomed-out-message",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":10,"column":19},"end":{"line":10,"column":51}}}))
|
|
14852
|
+
+ "</p>\n </div>\n <div id=\"modal-search-box\" class=\"modal-search\">\n <input id=\"bmltsearch-goto-text\" type=\"text\"\n placeholder=\""
|
|
14853
|
+
+ alias3((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias2).call(alias1,"Enter a city or zip code",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":14,"column":33},"end":{"line":14,"column":71}}}))
|
|
14854
|
+
+ "\" style=\"margin-bottom:5px;\">\n <button id=\"bmltsearch-text-button\" class=\"filter-button\">"
|
|
14855
|
+
+ alias3((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias2).call(alias1,"text_search",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":15,"column":74},"end":{"line":15,"column":99}}}))
|
|
14856
|
+
+ "</button>\n </div>\n <div class=\"modal-search\">\n <button id=\"bmltsearch-nearbyMeetings\" class=\"filter-button\">"
|
|
14857
|
+
+ alias3((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias2).call(alias1,"near_me",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":18,"column":77},"end":{"line":18,"column":98}}}))
|
|
14858
|
+
+ "</button>\n </div>\n <div class=\"modal-search\">\n <button id=\"bmltsearch-clicksearch\" class=\"filter-button\">"
|
|
14859
|
+
+ alias3((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias2).call(alias1,"click_search",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":21,"column":74},"end":{"line":21,"column":100}}}))
|
|
14860
|
+
+ "</button>\n </div>\n <button id=\"show-search-parameters\" class=\"advanced-search-button\">"
|
|
14838
14861
|
+ alias3((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias2).call(alias1,"Adjust Search",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":23,"column":79},"end":{"line":23,"column":106}}}))
|
|
14839
14862
|
+ "</button>\n </div>\n <div id=\"modal-seach-parameters\">\n <div class=\"modal-title\">"
|
|
14840
14863
|
+ alias3((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias2).call(alias1,"Configure Search",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":26,"column":37},"end":{"line":26,"column":67}}}))
|
|
@@ -15097,8 +15120,8 @@ this["hbs_Crouton"]["templates"]["weekdays"] = Handlebars.template({"1":function
|
|
|
15097
15120
|
|
|
15098
15121
|
return " <div id='tab"
|
|
15099
15122
|
+ alias3(((helper = (helper = lookupProperty(helpers,"day") || (depth0 != null ? lookupProperty(depth0,"day") : depth0)) != null ? helper : alias2),(typeof helper === "function" ? helper.call(alias1,{"name":"day","hash":{},"data":data,"loc":{"start":{"line":3,"column":20},"end":{"line":3,"column":29}}}) : helper)))
|
|
15100
|
-
+ "' class='tab-pane'>\n <div id=\"bmlt-table-div\">\n <table class='bmlt-table table table-
|
|
15101
|
-
+ alias3((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias2).call(alias1,"css-direction",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":5,"column":
|
|
15123
|
+
+ "' class='tab-pane'>\n <div id=\"bmlt-table-div\">\n <table class='bmlt-table table table-hover table-bordered tablesaw tablesaw-stack "
|
|
15124
|
+
+ alias3((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias2).call(alias1,"css-direction",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":5,"column":98},"end":{"line":5,"column":125}}}))
|
|
15102
15125
|
+ "'>\n <tbody class=\"weekdays.hbs\">\n"
|
|
15103
15126
|
+ ((stack1 = (lookupProperty(helpers,"greaterThan")||(depth0 && lookupProperty(depth0,"greaterThan"))||alias2).call(alias1,((stack1 = (depth0 != null ? lookupProperty(depth0,"meetings") : depth0)) != null ? lookupProperty(stack1,"length") : stack1),0,{"name":"greaterThan","hash":{},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":7,"column":6},"end":{"line":9,"column":22}}})) != null ? stack1 : "")
|
|
15104
15127
|
+ ((stack1 = (lookupProperty(helpers,"lessThan")||(depth0 && lookupProperty(depth0,"lessThan"))||alias2).call(alias1,((stack1 = (depth0 != null ? lookupProperty(depth0,"meetings") : depth0)) != null ? lookupProperty(stack1,"length") : stack1),1,{"name":"lessThan","hash":{},"fn":container.program(4, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":10,"column":6},"end":{"line":16,"column":19}}})) != null ? stack1 : "")
|
|
@@ -15148,9 +15171,9 @@ var croutonDefaultTemplates = {
|
|
|
15148
15171
|
"{{#if this.virtual_meeting_additional_info}}",
|
|
15149
15172
|
" <div class='meeting-additional-info'>{{this.virtual_meeting_additional_info}}</div>",
|
|
15150
15173
|
"{{/if}}",
|
|
15151
|
-
"{{#
|
|
15152
|
-
"
|
|
15153
|
-
"
|
|
15174
|
+
"<div class='meeting-distance{{#unless this.distance}} hide{{/unless}}' data-id='{{this.id_bigint}}'>",
|
|
15175
|
+
"{{getWord 'Distance'}}: {{this.distance}}",
|
|
15176
|
+
"</div>",
|
|
15154
15177
|
].join('\n'),
|
|
15155
15178
|
|
|
15156
15179
|
metadata_template: [
|
|
@@ -16324,6 +16347,7 @@ function Crouton(config) {
|
|
|
16324
16347
|
self.filtering = false;
|
|
16325
16348
|
self.masterFormatCodes = [];
|
|
16326
16349
|
self.currentView = "weekday";
|
|
16350
|
+
self.distanceTabAllowed = false;
|
|
16327
16351
|
self.config = {
|
|
16328
16352
|
on_complete: null, // Javascript function to callback when data querying is completed.
|
|
16329
16353
|
root_server: null, // The root server to use.
|
|
@@ -16405,30 +16429,25 @@ function Crouton(config) {
|
|
|
16405
16429
|
minZoom: 6,
|
|
16406
16430
|
maxZoom: 17,
|
|
16407
16431
|
distance_units: 'miles',
|
|
16408
|
-
noMap: false
|
|
16432
|
+
noMap: false,
|
|
16433
|
+
maxTomatoWidth: 160,
|
|
16409
16434
|
};
|
|
16410
16435
|
|
|
16411
16436
|
self.setConfig(config);
|
|
16412
|
-
Crouton.prototype.searchByCoordinates = function(latitude, longitude, width) {
|
|
16413
|
-
|
|
16437
|
+
Crouton.prototype.searchByCoordinates = function(latitude, longitude, width, fitBounds=true) {
|
|
16438
|
+
const original_query = self.config['custom_query'];
|
|
16414
16439
|
self.config['custom_query'] = (self.config['custom_query'] !== null ? self.config['custom_query'] : "")
|
|
16415
16440
|
+ "&lat_val=" + latitude + "&long_val=" + longitude
|
|
16416
16441
|
+ (self.config['distance_units'] === "km" ? '&geo_width_km=' : '&geo_width=') + width;
|
|
16417
|
-
self.meetingSearch()
|
|
16418
|
-
.then(function() {
|
|
16442
|
+
self.meetingSearch(function() {
|
|
16419
16443
|
self.config.refresh_map=1;
|
|
16420
16444
|
self.config.show_map = 1;
|
|
16421
16445
|
self.reset();
|
|
16422
|
-
self.render();
|
|
16423
|
-
|
|
16424
|
-
|
|
16425
|
-
croutonMap.initMap(function() {
|
|
16426
|
-
croutonMap.addCurrentLocationPin(latitude, longitude);
|
|
16427
|
-
});
|
|
16428
|
-
*/
|
|
16429
|
-
});
|
|
16446
|
+
self.render(false, fitBounds);
|
|
16447
|
+
});
|
|
16448
|
+
self.config['custom_query'] = original_query;
|
|
16430
16449
|
};
|
|
16431
|
-
self.getMeetings = function(url) {
|
|
16450
|
+
self.getMeetings = function(url,cb=null) {
|
|
16432
16451
|
var promises = [fetchJsonp(this.config['root_server'] + url).then(function(response) { return response.json(); })];
|
|
16433
16452
|
|
|
16434
16453
|
if (self.config['extra_meetings'].length > 0) {
|
|
@@ -16453,16 +16472,19 @@ function Crouton(config) {
|
|
|
16453
16472
|
var fullUrl = self.config['root_server'] + url
|
|
16454
16473
|
console.log("Could not find any meetings for the criteria specified with the query <a href=\"" + fullUrl + "\" target=_blank>" + fullUrl + "</a>");
|
|
16455
16474
|
jQuery('#' + self.config['placeholder_id']).html("No meetings found.");
|
|
16475
|
+
self.meetingData = [];
|
|
16476
|
+
self.formatsData = [];
|
|
16456
16477
|
self.mutex = false;
|
|
16478
|
+
cb && cb();
|
|
16457
16479
|
return;
|
|
16458
16480
|
}
|
|
16459
16481
|
mainMeetings['meetings'].exclude(self.config['exclude_zip_codes'], "location_postal_code_1");
|
|
16460
16482
|
self.meetingData = mainMeetings['meetings'];
|
|
16461
16483
|
self.formatsData = mainMeetings['formats'];
|
|
16462
|
-
|
|
16463
16484
|
if (extraMeetings) {
|
|
16464
16485
|
self.meetingData = self.meetingData.concat(extraMeetings['meetings']);
|
|
16465
16486
|
}
|
|
16487
|
+
cb && cb();
|
|
16466
16488
|
self.mutex = false;
|
|
16467
16489
|
});
|
|
16468
16490
|
};
|
|
@@ -16551,7 +16573,7 @@ function Crouton(config) {
|
|
|
16551
16573
|
}
|
|
16552
16574
|
self.mutex = true;
|
|
16553
16575
|
|
|
16554
|
-
self.meetingSearch = function() {
|
|
16576
|
+
self.meetingSearch = function(cb=null) {
|
|
16555
16577
|
var url = '/client_interface/jsonp/?switcher=GetSearchResults&get_used_formats&lang_enum=' + self.config['short_language'] +
|
|
16556
16578
|
self.addDatafieldsToQuery();
|
|
16557
16579
|
|
|
@@ -16579,7 +16601,7 @@ function Crouton(config) {
|
|
|
16579
16601
|
|
|
16580
16602
|
if (self.config['custom_query'] != null) {
|
|
16581
16603
|
url += self.config['custom_query'] + '&sort_keys=' + self.config['sort_keys'];
|
|
16582
|
-
return self.getMeetings(url);
|
|
16604
|
+
return self.getMeetings(url,cb);
|
|
16583
16605
|
} else if (self.config['service_body'].length > 0) {
|
|
16584
16606
|
for (var i = 0; i < self.config['service_body'].length; i++) {
|
|
16585
16607
|
url += '&services[]=' + self.config['service_body'][i];
|
|
@@ -16591,7 +16613,7 @@ function Crouton(config) {
|
|
|
16591
16613
|
|
|
16592
16614
|
url += '&sort_keys=' + self.config['sort_keys'];
|
|
16593
16615
|
|
|
16594
|
-
return self.getMeetings(url);
|
|
16616
|
+
return self.getMeetings(url,cb);
|
|
16595
16617
|
} else {
|
|
16596
16618
|
return new Promise(function(resolve, reject) {
|
|
16597
16619
|
resolve();
|
|
@@ -16675,6 +16697,10 @@ function Crouton(config) {
|
|
|
16675
16697
|
};
|
|
16676
16698
|
|
|
16677
16699
|
self.groupedView = function (field) {
|
|
16700
|
+
if (field.includes('distance') && !self.distanceTabAllowed) {
|
|
16701
|
+
self.dayView();
|
|
16702
|
+
return;
|
|
16703
|
+
}
|
|
16678
16704
|
self.lowlightButton("#day");
|
|
16679
16705
|
self.lowlightButton(".groupingButton");
|
|
16680
16706
|
self.highlightButton("#groupingButton_" + field);
|
|
@@ -16710,11 +16736,22 @@ function Crouton(config) {
|
|
|
16710
16736
|
self.hideAllPages = function (id) {
|
|
16711
16737
|
jQuery("#tab-pane").removeClass("show").addClass("hide");
|
|
16712
16738
|
};
|
|
16713
|
-
|
|
16739
|
+
self.addStripes = function() {
|
|
16740
|
+
var showingNow = [];
|
|
16741
|
+
jQuery(".bmlt-data-row:not(.hide)").each(function (index, value) {
|
|
16742
|
+
jQuery(value).addClass((index % 2) ? 'oddRow' : 'evenRow');
|
|
16743
|
+
const rowId = value.id.split("-");
|
|
16744
|
+
showingNow.push(rowId[rowId.length-1]);
|
|
16745
|
+
});
|
|
16746
|
+
showingNow = [...new Set(showingNow)];
|
|
16747
|
+
return showingNow;
|
|
16748
|
+
}
|
|
16714
16749
|
self.filterMeetingsFromView = function () {
|
|
16715
16750
|
jQuery(".group-header").removeClass("hide");
|
|
16716
16751
|
jQuery(".meeting-group").removeClass("hide");
|
|
16717
16752
|
jQuery(".bmlt-data-row").removeClass("hide");
|
|
16753
|
+
jQuery(".bmlt-data-row").removeClass("evenRow");
|
|
16754
|
+
jQuery(".bmlt-data-row").removeClass("oddRow");
|
|
16718
16755
|
jQuery(".filter-dropdown").each(function(index, filter) {
|
|
16719
16756
|
const dataValue = filter.value.replace("a-", "");
|
|
16720
16757
|
if (dataValue === "") return;
|
|
@@ -16725,13 +16762,7 @@ function Crouton(config) {
|
|
|
16725
16762
|
jQuery(".bmlt-data-row").not("[data-" + dataType + "~='" + dataValue + "']").addClass("hide");
|
|
16726
16763
|
}
|
|
16727
16764
|
});
|
|
16728
|
-
var showingNow =
|
|
16729
|
-
jQuery(".bmlt-data-row").not(".hide").each(function (index, value) {
|
|
16730
|
-
jQuery(value).addClass((index % 2) ? 'oddRow' : 'evenRow');
|
|
16731
|
-
const rowId = value.id.split("-");
|
|
16732
|
-
showingNow.push(rowId[rowId.length-1]);
|
|
16733
|
-
});
|
|
16734
|
-
showingNow = [...new Set(showingNow)];
|
|
16765
|
+
var showingNow = this.addStripes();
|
|
16735
16766
|
self.updateMeetingCount(showingNow);
|
|
16736
16767
|
self.updateFilters();
|
|
16737
16768
|
if (croutonMap) croutonMap.fillMap(showingNow);
|
|
@@ -16751,6 +16782,7 @@ function Crouton(config) {
|
|
|
16751
16782
|
jQuery(".oddRow").removeClass("oddRow");
|
|
16752
16783
|
};
|
|
16753
16784
|
self.updateFilters = function() {
|
|
16785
|
+
if (!self.dropdownData) return;
|
|
16754
16786
|
const getId = function (row) {return row.id.replace("meeting-data-row-", "")};
|
|
16755
16787
|
// The options available for this filter have to take into account all other filters, but ignore the
|
|
16756
16788
|
// filter itself (otherwise there's only one option!)
|
|
@@ -17112,28 +17144,74 @@ function Crouton(config) {
|
|
|
17112
17144
|
+ (self.config.force_rootserver_in_querystring ? '&root_server=' + encodeURIComponent(self.config.root_server) : '')
|
|
17113
17145
|
);
|
|
17114
17146
|
}
|
|
17115
|
-
|
|
17116
|
-
meetingData[m]['distance'] = '';
|
|
17117
|
-
if (self.config['distance_units'] === "km") {
|
|
17118
|
-
if (meetingData[m]['distance_in_km']) {
|
|
17119
|
-
const d = meetingData[m]['distance_in_km'];
|
|
17120
|
-
if (d < 1) {
|
|
17121
|
-
meetingData[m]['distance'] = Math.round( d * 1000) + 'm';
|
|
17122
|
-
}
|
|
17123
|
-
else {
|
|
17124
|
-
meetingData[m]['distance'] = (Math.round(d * 10) / 10).toFixed(1) + 'km';
|
|
17125
|
-
}
|
|
17126
|
-
}
|
|
17127
|
-
} else if (meetingData[m]['distance_in_miles']) {
|
|
17128
|
-
const d = meetingData[m]['distance_in_miles'];
|
|
17129
|
-
meetingData[m]['distance'] = (Math.round(d * 100) / 100).toFixed(2) + ' miles';
|
|
17130
|
-
}
|
|
17131
|
-
|
|
17147
|
+
this.calculateDistance(meetingData[m]);
|
|
17132
17148
|
meetings.push(meetingData[m])
|
|
17133
17149
|
}
|
|
17134
17150
|
|
|
17135
17151
|
return meetings;
|
|
17136
17152
|
};
|
|
17153
|
+
Crouton.prototype.updateDistances = function() {
|
|
17154
|
+
const self = this;
|
|
17155
|
+
var knt = 0;
|
|
17156
|
+
jQuery('.meeting-distance').each(function(index) {
|
|
17157
|
+
const jThis = jQuery(this);
|
|
17158
|
+
const id = jQuery(this).data('id');
|
|
17159
|
+
if (!id) return;
|
|
17160
|
+
knt++;
|
|
17161
|
+
const m = self.meetingData.find((m) => m.id_bigint==id);
|
|
17162
|
+
self.calculateDistance(m);
|
|
17163
|
+
if (m['distance'] == '') {
|
|
17164
|
+
if (!jThis.hasClass('hide')) jThis.addClass('hide');
|
|
17165
|
+
} else {
|
|
17166
|
+
jThis.removeClass('hide');
|
|
17167
|
+
jQuery(this).html(self.localization.getWord('Distance')+': '+m['distance']);
|
|
17168
|
+
jQuery(this).closest('tr').data('distance', m['distance_in_km']);
|
|
17169
|
+
}
|
|
17170
|
+
});
|
|
17171
|
+
const parent = jQuery('#byfield_distance_in_km tbody');
|
|
17172
|
+
if (parent.length == 0) return;
|
|
17173
|
+
const sorted = parent.children().sort(function (a, b) {
|
|
17174
|
+
const distanceA =parseFloat( jQuery(a).data('distance'));
|
|
17175
|
+
const distanceB =parseFloat( jQuery(b).data('distance'));
|
|
17176
|
+
return (distanceA < distanceB) ? -1 : (distanceA > distanceB) ? 1 : 0;
|
|
17177
|
+
});
|
|
17178
|
+
parent.html(sorted);
|
|
17179
|
+
jQuery("#byfield_distance_in_km tbody .bmlt-data-row").css({cursor: "pointer"});
|
|
17180
|
+
jQuery("#byfield_distance_in_km tbody .bmlt-data-row").click(function (e) {
|
|
17181
|
+
if (e.target.tagName !== 'A')
|
|
17182
|
+
croutonMap.rowClick(parseInt(this.id.replace("meeting-data-row-", "")));
|
|
17183
|
+
});
|
|
17184
|
+
if (knt > 0) {
|
|
17185
|
+
jQuery('#groupingButton_distance_in_km').removeClass('hide');
|
|
17186
|
+
self.distanceTabAllowed = true;
|
|
17187
|
+
}
|
|
17188
|
+
}
|
|
17189
|
+
self.calculateDistance = function(meetingData) {
|
|
17190
|
+
meetingData['distance'] = '';
|
|
17191
|
+
if (meetingData['venue_type'] != 2) {
|
|
17192
|
+
const point = {"lat": meetingData['latitude'], "lng": meetingData['longitude']};
|
|
17193
|
+
const distances = croutonMap.getDistanceFromSearch(point);
|
|
17194
|
+
if (distances) {
|
|
17195
|
+
meetingData['distance_in_km'] = distances.km;
|
|
17196
|
+
meetingData['distance_in_miles'] = distances.miles;
|
|
17197
|
+
|
|
17198
|
+
if (self.config['distance_units'] === "km") {
|
|
17199
|
+
if (meetingData['distance_in_km']) {
|
|
17200
|
+
const d = meetingData['distance_in_km'];
|
|
17201
|
+
if (d < 1) {
|
|
17202
|
+
meetingData['distance'] = Math.round( d * 1000) + 'm';
|
|
17203
|
+
}
|
|
17204
|
+
else {
|
|
17205
|
+
meetingData['distance'] = (Math.round(d * 10) / 10).toFixed(1) + 'km';
|
|
17206
|
+
}
|
|
17207
|
+
}
|
|
17208
|
+
} else if (meetingData['distance_in_miles']) {
|
|
17209
|
+
const d = meetingData['distance_in_miles'];
|
|
17210
|
+
meetingData['distance'] = (Math.round(d * 100) / 100).toFixed(2) + ' miles';
|
|
17211
|
+
}
|
|
17212
|
+
}
|
|
17213
|
+
}
|
|
17214
|
+
}
|
|
17137
17215
|
self.showMessage = function(message) {
|
|
17138
17216
|
jQuery("#" + self.config['placeholder_id']).html("crouton: " + message);
|
|
17139
17217
|
jQuery("#" + self.config['placeholder_id']).removeClass("hide");
|
|
@@ -17347,6 +17425,7 @@ Crouton.prototype.meetingModal = function(meetingId) {
|
|
|
17347
17425
|
}
|
|
17348
17426
|
Crouton.prototype.searchMap = function() {
|
|
17349
17427
|
var self = this;
|
|
17428
|
+
self.distanceTabAllowed = true;
|
|
17350
17429
|
if (!self.config.map_search || typeof self.config.map_search !== 'object') {
|
|
17351
17430
|
self.config.map_search = {
|
|
17352
17431
|
width: -50,
|
|
@@ -17385,13 +17464,9 @@ Crouton.prototype.searchMap = function() {
|
|
|
17385
17464
|
"location": {'latitude':0,'longitude':0,'zoom':10} // TODO: Where is this used?
|
|
17386
17465
|
});
|
|
17387
17466
|
}
|
|
17388
|
-
Crouton.prototype.render = function(doMeetingMap = false) {
|
|
17467
|
+
Crouton.prototype.render = function(doMeetingMap = false, fitBounds=true) {
|
|
17389
17468
|
var self = this;
|
|
17390
17469
|
|
|
17391
|
-
if (!self.config.map_search) {
|
|
17392
|
-
self.config.grouping_buttons = self.config.grouping_buttons.filter((b) => !b.field.startsWith('distance'));
|
|
17393
|
-
if (self.config['view_by'] == 'distance') self.config['view_by'] = 'weekday';
|
|
17394
|
-
}
|
|
17395
17470
|
self.lock(function() {
|
|
17396
17471
|
var body = jQuery("body");
|
|
17397
17472
|
if (self.config['theme'] !== '') {
|
|
@@ -17402,6 +17477,9 @@ Crouton.prototype.render = function(doMeetingMap = false) {
|
|
|
17402
17477
|
|
|
17403
17478
|
if (self.isEmpty(self.meetingData)) {
|
|
17404
17479
|
self.showMessage("No meetings found for parameters specified.");
|
|
17480
|
+
if (self.config['refresh_map']) {
|
|
17481
|
+
croutonMap.refreshMeetings(self.meetingData, fitBounds, true);
|
|
17482
|
+
}
|
|
17405
17483
|
return;
|
|
17406
17484
|
}
|
|
17407
17485
|
|
|
@@ -17504,9 +17582,13 @@ Crouton.prototype.render = function(doMeetingMap = false) {
|
|
|
17504
17582
|
? self.config.grouping_buttons[b]['accordionState'] : '';
|
|
17505
17583
|
groupingButtonsDataSorted[groupByName] = {};
|
|
17506
17584
|
if (groupByName.startsWith('distance')) {
|
|
17507
|
-
groupingButtonsDataSorted[groupByName]['Sorted by Distance'] = {};
|
|
17508
|
-
|
|
17509
|
-
|
|
17585
|
+
groupingButtonsDataSorted[groupByName][self.localization.getWord('Sorted by Distance')] = {};
|
|
17586
|
+
if (self.config.map_search) {
|
|
17587
|
+
groupingButtonsDataSorted[groupByName][self.localization.getWord('Sorted by Distance')].group = [...self.meetingData].sort((a,b) => a['distance_in_km'] - b['distance_in_km']);
|
|
17588
|
+
} else { // when not crouton_map, sorting byy distance is triggered by an action in meeting_map.
|
|
17589
|
+
groupingButtonsDataSorted[groupByName][self.localization.getWord('Sorted by Distance')].group = [...self.meetingData].filter(m => m.venue_type != 2);
|
|
17590
|
+
}
|
|
17591
|
+
groupingButtonsDataSorted[groupByName][self.localization.getWord('Sorted by Distance')].accordionState = 'non-collapsable';
|
|
17510
17592
|
continue;
|
|
17511
17593
|
}
|
|
17512
17594
|
var sortKey = [];
|
|
@@ -17603,6 +17685,10 @@ Crouton.prototype.render = function(doMeetingMap = false) {
|
|
|
17603
17685
|
},
|
|
17604
17686
|
"dropdownData": self.dropdownData
|
|
17605
17687
|
}, function () {
|
|
17688
|
+
if (!self.config.map_search) {
|
|
17689
|
+
jQuery('#groupingButton_distance_in_km').addClass('hide');
|
|
17690
|
+
}
|
|
17691
|
+
self.addStripes();
|
|
17606
17692
|
self.updateMeetingCount();
|
|
17607
17693
|
if (self.config['map_search'] != null || self.config['show_map']) {
|
|
17608
17694
|
jQuery(".bmlt-data-row").css({cursor: "pointer"});
|
|
@@ -17711,7 +17797,7 @@ Crouton.prototype.render = function(doMeetingMap = false) {
|
|
|
17711
17797
|
else croutonMap.initialize('byfield_embeddedMapPage', self.meetingData);
|
|
17712
17798
|
}
|
|
17713
17799
|
if (self.config['refresh_map']) {
|
|
17714
|
-
croutonMap.refreshMeetings(self.meetingData,
|
|
17800
|
+
croutonMap.refreshMeetings(self.meetingData, fitBounds, true);
|
|
17715
17801
|
}
|
|
17716
17802
|
if (self.config['view_by'] == 'map' && !self.config['map_page'])
|
|
17717
17803
|
self.config['view_by'] = 'day';
|
|
@@ -18338,10 +18424,13 @@ function MeetingMap(inConfig) {
|
|
|
18338
18424
|
if (!config.maxZoom) config.maxZoom = 17;
|
|
18339
18425
|
if (!config.minZoom) config.minZoom = 6;
|
|
18340
18426
|
if (!config.marker_contents_template) config.marker_contents_template = croutonDefaultTemplates.marker_contents_template;
|
|
18341
|
-
var gAllMeetings =
|
|
18427
|
+
var gAllMeetings = [];
|
|
18342
18428
|
var gMeetingIdsFromCrouton = null;
|
|
18429
|
+
var gSearchPoint = false;
|
|
18343
18430
|
var loadedCallbackFunction = null;
|
|
18344
18431
|
var loadedCallbackArgs = [];
|
|
18432
|
+
var oldBounds = false;
|
|
18433
|
+
var isMouseDown = false;
|
|
18345
18434
|
function preloadApiLoadedCallback(f,a) {
|
|
18346
18435
|
loadedCallbackFunction = f;
|
|
18347
18436
|
loadedCallbackArgs = a;
|
|
@@ -18395,26 +18484,31 @@ function MeetingMap(inConfig) {
|
|
|
18395
18484
|
let loc = {latitude: config.lat, longitude: config.lng, zoom: config.zoom};
|
|
18396
18485
|
if (handlebarMapOptions) loc = {latitude: handlebarMapOptions.lat, longitude: handlebarMapOptions.lng};
|
|
18397
18486
|
if (gDelegate.createMap(inDiv, loc, hide)) {
|
|
18398
|
-
|
|
18399
|
-
|
|
18400
|
-
|
|
18401
|
-
|
|
18402
|
-
|
|
18403
|
-
|
|
18404
|
-
|
|
18405
|
-
|
|
18406
|
-
|
|
18407
|
-
|
|
18408
|
-
|
|
18409
|
-
|
|
18410
|
-
|
|
18411
|
-
menuContext.imageDir = config.BMLTPlugin_images;
|
|
18412
|
-
gDelegate.addControl(createNext24Toggle(), 'topleft');
|
|
18413
|
-
gDelegate.addControl(createMenuButton(menuContext), 'topright', cb);
|
|
18487
|
+
// crouton_map and filter_visible triggers a query, Otherwise, redraw markers
|
|
18488
|
+
if (config.map_search && config.filter_visible) {
|
|
18489
|
+
gDelegate.addListener('idle', triggerCroutonMapNewQuery, false);
|
|
18490
|
+
} else {
|
|
18491
|
+
gDelegate.addListener('zoomend', function (ev) {
|
|
18492
|
+
if (shouldRedrawMarkers() && gAllMeetings) {
|
|
18493
|
+
if (listOnlyVisible) {
|
|
18494
|
+
const oldValue = filterVisible(false);
|
|
18495
|
+
searchResponseCallback();
|
|
18496
|
+
filterVisible(oldValue);
|
|
18497
|
+
} else searchResponseCallback();
|
|
18498
|
+
}
|
|
18499
|
+
}, false);
|
|
18414
18500
|
}
|
|
18501
|
+
// set up control buttons in map
|
|
18502
|
+
if (config.map_search) gDelegate.addControl(createSearchButton(), 'topleft', cb);
|
|
18415
18503
|
else {
|
|
18416
|
-
menuContext
|
|
18417
|
-
|
|
18504
|
+
if (menuContext) {
|
|
18505
|
+
menuContext.imageDir = config.BMLTPlugin_images;
|
|
18506
|
+
gDelegate.addControl(createNext24Toggle(), 'topleft');
|
|
18507
|
+
gDelegate.addControl(createMenuButton(menuContext), 'topright', cb);
|
|
18508
|
+
} else {
|
|
18509
|
+
menuContext = {imageDir: config.BMLTPlugin_images, config: config, dropdownData:false};
|
|
18510
|
+
gDelegate.addControl(createMenuButton(menuContext), 'topright', cb);
|
|
18511
|
+
}
|
|
18418
18512
|
}
|
|
18419
18513
|
}
|
|
18420
18514
|
};
|
|
@@ -18423,7 +18517,7 @@ function MeetingMap(inConfig) {
|
|
|
18423
18517
|
function createSearchButton() {
|
|
18424
18518
|
const template = hbs_Crouton.templates['mapSearch'];
|
|
18425
18519
|
const controlDiv = document.createElement('div');
|
|
18426
|
-
const params = {
|
|
18520
|
+
const params = {};
|
|
18427
18521
|
controlDiv.innerHTML = template(params);
|
|
18428
18522
|
controlDiv.querySelector("#map-search-button").addEventListener('click', showBmltSearchDialog);
|
|
18429
18523
|
controlDiv.querySelector("#bmltsearch-nearbyMeetings").addEventListener('click', nearMeSearch);
|
|
@@ -18438,7 +18532,7 @@ function MeetingMap(inConfig) {
|
|
|
18438
18532
|
if (text === "") return;
|
|
18439
18533
|
showThrobber();
|
|
18440
18534
|
gDelegate.callGeocoder(text, null, mapSearchGeocode);
|
|
18441
|
-
|
|
18535
|
+
clearMessageAndClose(gSearchModal);
|
|
18442
18536
|
});
|
|
18443
18537
|
controlDiv.querySelector("#modal-seach-parameters").style.display = 'none';
|
|
18444
18538
|
controlDiv.querySelector("#show-search-parameters").addEventListener('click', function (e) {
|
|
@@ -18467,9 +18561,8 @@ function MeetingMap(inConfig) {
|
|
|
18467
18561
|
controlDiv.querySelector("#modal-search-page").style.display = 'block';
|
|
18468
18562
|
});
|
|
18469
18563
|
|
|
18470
|
-
|
|
18471
|
-
|
|
18472
|
-
[...controlDiv.getElementsByClassName('modal-close')].forEach((elem)=>elem.addEventListener('click', (e)=>closeModalWindow(e.target)));
|
|
18564
|
+
controlDiv.querySelector("#bmltsearch-clicksearch").addEventListener('click', clickSearch);
|
|
18565
|
+
[...controlDiv.getElementsByClassName('modal-close')].forEach((elem)=>elem.addEventListener('click', (e)=>clearMessageAndClose(e.target)));
|
|
18473
18566
|
gSearchModal = controlDiv.querySelector("#bmltsearch_modal");
|
|
18474
18567
|
gSearchModal.parentElement.removeChild(gSearchModal);
|
|
18475
18568
|
|
|
@@ -18521,8 +18614,11 @@ function MeetingMap(inConfig) {
|
|
|
18521
18614
|
retrieveGeolocation().then(position => {
|
|
18522
18615
|
filterVisible(false);
|
|
18523
18616
|
gDelegate.setViewToPosition(position, filterMeetingsAndBounds, filterVisible);
|
|
18617
|
+
gSearchPoint = {"lat": position.latitude, "lng": position.longitude};
|
|
18618
|
+
crouton.updateDistances();
|
|
18619
|
+
|
|
18524
18620
|
}).catch(error => {
|
|
18525
|
-
console.
|
|
18621
|
+
console.log(error.message);
|
|
18526
18622
|
jQuery('.geo').removeClass("hide").addClass("show").html(`<p>${error.message}</p>`);
|
|
18527
18623
|
});
|
|
18528
18624
|
dropdownContent = document.getElementById("map-menu-dropdown").style.display = "none";
|
|
@@ -18594,13 +18690,18 @@ function MeetingMap(inConfig) {
|
|
|
18594
18690
|
if (gAllMeetings)
|
|
18595
18691
|
searchResponseCallback(fitDuringFilter && !listOnlyVisible);
|
|
18596
18692
|
};
|
|
18693
|
+
function clearMessageAndClose(modal) {
|
|
18694
|
+
jQuery('#zoomed-out-message').not('.hide').addClass('hide');
|
|
18695
|
+
closeModalWindow(modal);
|
|
18696
|
+
}
|
|
18597
18697
|
function nearMeSearch() {
|
|
18598
18698
|
retrieveGeolocation().then(position => {
|
|
18599
18699
|
showThrobber();
|
|
18700
|
+
gSearchPoint = {"lat": position.latitude, "lng": position.longitude};
|
|
18600
18701
|
crouton.searchByCoordinates(position.latitude, position.longitude, config.map_search.width);
|
|
18601
|
-
if (activeModal == gSearchModal)
|
|
18702
|
+
if (activeModal == gSearchModal) clearMessageAndClose(gSearchModal);
|
|
18602
18703
|
}).catch(error => {
|
|
18603
|
-
console.
|
|
18704
|
+
console.log(error.message);
|
|
18604
18705
|
if (activeModal != gSearchModal) showBmltSearchDialog();
|
|
18605
18706
|
});
|
|
18606
18707
|
};
|
|
@@ -18608,9 +18709,10 @@ function MeetingMap(inConfig) {
|
|
|
18608
18709
|
croutonMap.showMap(false,false);
|
|
18609
18710
|
gDelegate.clickSearch(e, function(lat,lng) {
|
|
18610
18711
|
showThrobber();
|
|
18712
|
+
gSearchPoint = {"lat": lat, "lng": lng};
|
|
18611
18713
|
crouton.searchByCoordinates(lat, lng, config.map_search.width);
|
|
18612
18714
|
});
|
|
18613
|
-
|
|
18715
|
+
clearMessageAndClose(gSearchModal);
|
|
18614
18716
|
}
|
|
18615
18717
|
function createThrobber(inDiv) {
|
|
18616
18718
|
if (!inDiv.myThrobber) {
|
|
@@ -18623,7 +18725,7 @@ function MeetingMap(inConfig) {
|
|
|
18623
18725
|
var img = document.createElement("img");
|
|
18624
18726
|
|
|
18625
18727
|
if (img) {
|
|
18626
|
-
img.src = config.BMLTPlugin_throbber_img_src;
|
|
18728
|
+
img.src = crouton.config.BMLTPlugin_throbber_img_src;
|
|
18627
18729
|
img.className = 'bmlt_mapThrobber_img';
|
|
18628
18730
|
img.id = inDiv.id + 'Throbber_img';
|
|
18629
18731
|
img.alt = 'AJAX Throbber';
|
|
@@ -18653,6 +18755,7 @@ function MeetingMap(inConfig) {
|
|
|
18653
18755
|
hideThrobber();
|
|
18654
18756
|
return;
|
|
18655
18757
|
}
|
|
18758
|
+
gSearchPoint = {"lat": latlng.lat, "lng": latlng.lng};
|
|
18656
18759
|
crouton.searchByCoordinates(latlng.lat, latlng.lng, config.map_search.width);
|
|
18657
18760
|
}
|
|
18658
18761
|
function loadAllMeetings(meetings_responseObject, fitBounds=true, fitAll=false) {
|
|
@@ -18661,6 +18764,7 @@ function MeetingMap(inConfig) {
|
|
|
18661
18764
|
else if (config.map_search.coordinates_search) {
|
|
18662
18765
|
showThrobber();
|
|
18663
18766
|
config.map_search.coordinates_search = false;
|
|
18767
|
+
gSearchPoint = {"lat": config.map_search.latitude, "lng": config.map_search.longitude};
|
|
18664
18768
|
crouton.searchByCoordinates(config.map_search.latitude, config.map_search.longitude, config.map_search.width);
|
|
18665
18769
|
}
|
|
18666
18770
|
else if (config.map_search.location) gDelegate.callGeocoder(config.map_search.location, null, mapSearchGeocode);
|
|
@@ -18669,7 +18773,17 @@ function MeetingMap(inConfig) {
|
|
|
18669
18773
|
}
|
|
18670
18774
|
gAllMeetings = meetings_responseObject.filter(m => m.venue_type != 2);
|
|
18671
18775
|
if (fitBounds) {
|
|
18672
|
-
|
|
18776
|
+
let lat_lngs = gAllMeetings.reduce(function(a,m) {a.push([m.latitude, m.longitude]); return a;},[]);
|
|
18777
|
+
const maxRadius = config.maxTomatoWidth/2.0;
|
|
18778
|
+
if (gSearchPoint) lat_lngs.push([gSearchPoint.lat, gSearchPoint.lng]);
|
|
18779
|
+
if (config.map_search && config.filter_visible) {
|
|
18780
|
+
lat_lngs.sort((a,b) => getDistance({"lat":a[0],"lng":a[1]},gSearchPoint) - getDistance({"lat":b[0],"lng":b[1]},gSearchPoint));
|
|
18781
|
+
while (getLatLngRadius(lat_lngs) > maxRadius && lat_lngs.length > 3) {
|
|
18782
|
+
lat_lngs = lat_lngs.slice(0, lat_lngs.length/2);
|
|
18783
|
+
}
|
|
18784
|
+
if (getLatLngRadius(lat_lngs) > maxRadius)
|
|
18785
|
+
lat_lngs = lat_lngs.slice(1,1);
|
|
18786
|
+
}
|
|
18673
18787
|
gDelegate.fitBounds(lat_lngs);
|
|
18674
18788
|
}
|
|
18675
18789
|
searchResponseCallback();
|
|
@@ -18682,6 +18796,8 @@ function MeetingMap(inConfig) {
|
|
|
18682
18796
|
coords = {latitude: position.coords.latitude, longitude: position.coords.longitude};
|
|
18683
18797
|
filterVisible(false);
|
|
18684
18798
|
gDelegate.setViewToPosition(coords, filterMeetingsAndBounds, filterVisible);
|
|
18799
|
+
gSearchPoint = {"lat": position.coords.latitude, "lng": position.coords.longitude};
|
|
18800
|
+
crouton.updateDistances();
|
|
18685
18801
|
},
|
|
18686
18802
|
showGeocodingDialog
|
|
18687
18803
|
);
|
|
@@ -18689,7 +18805,9 @@ function MeetingMap(inConfig) {
|
|
|
18689
18805
|
showGeocodingDialog();
|
|
18690
18806
|
}
|
|
18691
18807
|
} else {
|
|
18692
|
-
if (!config.centerMe && !config.goto)
|
|
18808
|
+
if ((!config.centerMe && !config.goto) && !(config.map_search && config.filter_visible)) {
|
|
18809
|
+
gDelegate.afterInit(()=>filterVisible(config.filter_visible));
|
|
18810
|
+
}
|
|
18693
18811
|
if (config.goto) gDelegate.callGeocoder(config.goto, resetVisibleThenFilterMeetingsAndBounds);
|
|
18694
18812
|
}
|
|
18695
18813
|
}
|
|
@@ -18737,6 +18855,7 @@ function MeetingMap(inConfig) {
|
|
|
18737
18855
|
g_suspendedFullscreen = true;
|
|
18738
18856
|
toggleFullscreen();
|
|
18739
18857
|
}
|
|
18858
|
+
if (!modal) return;
|
|
18740
18859
|
modal.style.display = "block";
|
|
18741
18860
|
swipableModal = swipe;
|
|
18742
18861
|
modal.focus();
|
|
@@ -18759,10 +18878,10 @@ function MeetingMap(inConfig) {
|
|
|
18759
18878
|
}
|
|
18760
18879
|
function showBmltSearchDialog(e) {
|
|
18761
18880
|
if (!document.getElementById('bmltsearch_modal')) gInDiv.appendChild(gSearchModal);
|
|
18762
|
-
|
|
18763
|
-
|
|
18764
|
-
|
|
18765
|
-
|
|
18881
|
+
if (gDelegate.isMapDefined())
|
|
18882
|
+
jQuery('#bmltsearch-clicksearch').parent().show();
|
|
18883
|
+
else
|
|
18884
|
+
jQuery('#bmltsearch-clicksearch').parent().hide();
|
|
18766
18885
|
openModalWindow(gSearchModal);
|
|
18767
18886
|
}
|
|
18768
18887
|
function showGeocodingDialog(e=null) {
|
|
@@ -18782,10 +18901,14 @@ function MeetingMap(inConfig) {
|
|
|
18782
18901
|
jQuery("#table_page").addClass("hide");
|
|
18783
18902
|
jQuery("#bmlt-map").css("display", "block");
|
|
18784
18903
|
}
|
|
18785
|
-
function resetVisibleThenFilterMeetingsAndBounds(bounds) {
|
|
18904
|
+
function resetVisibleThenFilterMeetingsAndBounds(bounds, center=null) {
|
|
18786
18905
|
filterVisible(false);
|
|
18787
18906
|
const ret = filterMeetingsAndBounds(bounds);
|
|
18788
18907
|
filterVisible(true);
|
|
18908
|
+
if (gSearchPoint.lat != center.lat || gSearchPoint.lng != center.lng) {
|
|
18909
|
+
gSearchPoint = center;
|
|
18910
|
+
crouton.updateDistances();
|
|
18911
|
+
}
|
|
18789
18912
|
return ret;
|
|
18790
18913
|
}
|
|
18791
18914
|
function lookupLocation(fullscreen) {
|
|
@@ -18810,10 +18933,16 @@ function MeetingMap(inConfig) {
|
|
|
18810
18933
|
};
|
|
18811
18934
|
try {
|
|
18812
18935
|
drawMarkers(expand);
|
|
18936
|
+
if (gSearchPoint) {
|
|
18937
|
+
gDelegate.markSearchPoint([gSearchPoint.lat, gSearchPoint.lng]);
|
|
18938
|
+
}
|
|
18813
18939
|
} catch (e) {
|
|
18814
18940
|
console.log(e);
|
|
18815
18941
|
gDelegate.addListener('projection_changed', function (ev) {
|
|
18816
18942
|
drawMarkers(expand);
|
|
18943
|
+
if (gSearchPoint) {
|
|
18944
|
+
gDelegate.markSearchPoint([gSearchPoint.lat, gSearchPoint.lng]);
|
|
18945
|
+
}
|
|
18817
18946
|
}, true);
|
|
18818
18947
|
}
|
|
18819
18948
|
};
|
|
@@ -18838,12 +18967,12 @@ function MeetingMap(inConfig) {
|
|
|
18838
18967
|
return false;
|
|
18839
18968
|
}
|
|
18840
18969
|
function drawMarkers(expand = false) {
|
|
18841
|
-
if (!gDelegate.
|
|
18970
|
+
if (!gDelegate.isMapDefined()) return;
|
|
18971
|
+
const openMarker = gDelegate.getOpenMarker();
|
|
18842
18972
|
gDelegate.clearAllMarkers();
|
|
18843
18973
|
gDelegate.removeClusterLayer();
|
|
18844
18974
|
// This calculates which markers are the red "multi" markers.
|
|
18845
18975
|
const filtered = filterMeetings(gAllMeetings);
|
|
18846
|
-
|
|
18847
18976
|
var overlap_map = (useMarkerCluster() || filtered.length == 1)
|
|
18848
18977
|
? filtered.map((m)=>[m])
|
|
18849
18978
|
: mapOverlappingMarkersInCity(filtered);
|
|
@@ -18851,7 +18980,7 @@ function MeetingMap(inConfig) {
|
|
|
18851
18980
|
if (useMarkerCluster()) gDelegate.createClusterLayer();
|
|
18852
18981
|
// Draw the meeting markers.
|
|
18853
18982
|
overlap_map.forEach(function (marker) {
|
|
18854
|
-
createMapMarker(marker);
|
|
18983
|
+
createMapMarker(marker, openMarker);
|
|
18855
18984
|
});
|
|
18856
18985
|
gDelegate.addClusterLayer();
|
|
18857
18986
|
if (expand) {
|
|
@@ -18950,25 +19079,49 @@ function MeetingMap(inConfig) {
|
|
|
18950
19079
|
/************************************************************************************//**
|
|
18951
19080
|
* \brief This creates a single meeting's marker on the map. *
|
|
18952
19081
|
****************************************************************************************/
|
|
18953
|
-
function createMapMarker(meetings) {
|
|
19082
|
+
function createMapMarker(meetings, openMarker) {
|
|
18954
19083
|
var main_point = [meetings[0].latitude, meetings[0].longitude];
|
|
18955
19084
|
let markerTemplate = crouton_Handlebars.compile(markerTemplateSrc);
|
|
18956
19085
|
var marker_html = markerTemplate(meetings);
|
|
18957
19086
|
gDelegate.createMarker(main_point,
|
|
18958
19087
|
(meetings.length > 1),
|
|
18959
|
-
marker_html, null
|
|
19088
|
+
marker_html, null, meetings.map((m)=>parseInt(m.id_bigint)), openMarker);
|
|
18960
19089
|
};
|
|
18961
19090
|
var listOnlyVisible = false;
|
|
18962
19091
|
var listener = null;
|
|
18963
19092
|
function filterBounds(bounds) {
|
|
18964
19093
|
return gAllMeetings.filter((meeting) => gDelegate.contains(bounds, meeting.latitude, meeting.longitude));
|
|
18965
19094
|
}
|
|
18966
|
-
function
|
|
18967
|
-
|
|
18968
|
-
|
|
19095
|
+
function onDragStart() {
|
|
19096
|
+
isMouseDown = true;
|
|
19097
|
+
// if no [crouton_map], then show all meetings
|
|
19098
|
+
if (!config.map_search) filterVisible(false);
|
|
19099
|
+
gDelegate.addListener('dragend', onDragEnd, true);
|
|
19100
|
+
}
|
|
19101
|
+
function onDragEnd() {
|
|
19102
|
+
isMouseDown = false;
|
|
19103
|
+
// if no [crouton_map], then turn filter visible back on.
|
|
19104
|
+
if (config.map_search && config.filter_visible) triggerCroutonMapNewQuery(null);
|
|
19105
|
+
else filterVisible(true);
|
|
19106
|
+
}
|
|
19107
|
+
function triggerCroutonMapNewQuery(ev) {
|
|
19108
|
+
if (isMouseDown) return;
|
|
19109
|
+
gMeetingIdsFromCrouton = null;
|
|
19110
|
+
corners = gDelegate.getCorners();
|
|
19111
|
+
if (oldBounds && gDelegate.contains(oldBounds,corners.ne.lat,corners.ne.lng)
|
|
19112
|
+
&& gDelegate.contains(oldBounds,corners.sw.lat,corners.sw.lng)) {
|
|
19113
|
+
filterVisible();
|
|
19114
|
+
} else if (getScreenRadius('km') > config.maxTomatoWidth) {
|
|
19115
|
+
jQuery('#zoomed-out-message').removeClass('hide');
|
|
19116
|
+
showBmltSearchDialog(null);
|
|
19117
|
+
} else {
|
|
19118
|
+
oldBounds = gDelegate.getBounds();
|
|
19119
|
+
showThrobber();
|
|
19120
|
+
crouton.searchByCoordinates(gDelegate.getCenter().lat, gDelegate.getCenter().lng, getScreenRadius(), false);
|
|
19121
|
+
}
|
|
18969
19122
|
}
|
|
18970
19123
|
function filterVisible(on=true) {
|
|
18971
|
-
if (on==listOnlyVisible) return on;
|
|
19124
|
+
if (on==listOnlyVisible && !config.map_search) return on;
|
|
18972
19125
|
let mtgs = on ? filterBounds(gDelegate.getBounds()) : gAllMeetings;
|
|
18973
19126
|
let visible = mtgs.map((m)=>m.id_bigint);
|
|
18974
19127
|
jQuery(".bmlt-data-row").each(function(index,row) {
|
|
@@ -18981,7 +19134,7 @@ function MeetingMap(inConfig) {
|
|
|
18981
19134
|
fitDuringFilter = true;
|
|
18982
19135
|
jQuery("#filteringByVisibility").html(on?'✔':'');
|
|
18983
19136
|
listOnlyVisible = on;
|
|
18984
|
-
if (on) listener = gDelegate.addListener('dragstart',
|
|
19137
|
+
if (on) listener = gDelegate.addListener('dragstart', onDragStart, true);
|
|
18985
19138
|
else if (listener) {
|
|
18986
19139
|
gDelegate.removeListener(listener);
|
|
18987
19140
|
listener = null;
|
|
@@ -19080,6 +19233,36 @@ function MeetingMap(inConfig) {
|
|
|
19080
19233
|
.reduce(function(a,m) {a.push([m.latitude, m.longitude]); return a;},[])
|
|
19081
19234
|
);
|
|
19082
19235
|
}
|
|
19236
|
+
function rad(x) {
|
|
19237
|
+
return x * Math.PI / 180;
|
|
19238
|
+
}
|
|
19239
|
+
|
|
19240
|
+
function getDistance(p1, p2) {
|
|
19241
|
+
var R = 6378137; // Earth’s mean radius in meter
|
|
19242
|
+
var dLat = rad(p2.lat - p1.lat);
|
|
19243
|
+
var dLong = rad(p2.lng - p1.lng);
|
|
19244
|
+
var a = Math.sin(dLat / 2) * Math.sin(dLat / 2) +
|
|
19245
|
+
Math.cos(rad(p1.lat)) * Math.cos(rad(p2.lat)) *
|
|
19246
|
+
Math.sin(dLong / 2) * Math.sin(dLong / 2);
|
|
19247
|
+
var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
|
|
19248
|
+
var d = R * c;
|
|
19249
|
+
return d; // returns the distance in meter
|
|
19250
|
+
}
|
|
19251
|
+
function getDistanceFromSearch(p) {
|
|
19252
|
+
if (!gSearchPoint) return false;
|
|
19253
|
+
const d = getDistance(p, gSearchPoint);
|
|
19254
|
+
return {"km": d/1000.0, "miles": d*0.00062137119};
|
|
19255
|
+
}
|
|
19256
|
+
function getScreenRadius(units=false) {
|
|
19257
|
+
if (!units) units = crouton.config.distance_units;
|
|
19258
|
+
return getBoundsRadius(gDelegate.getCorners(), units);
|
|
19259
|
+
}
|
|
19260
|
+
function getBoundsRadius(corners, units = 'km') {
|
|
19261
|
+
return (getDistance(corners.ne, corners.sw)/2000.0) * ((units == 'km') ? 1.0 : 0.62137119);
|
|
19262
|
+
}
|
|
19263
|
+
function getLatLngRadius(lat_lngs) {
|
|
19264
|
+
return getBoundsRadius(gDelegate.getCorners(lat_lngs), 'km');
|
|
19265
|
+
}
|
|
19083
19266
|
/****************************************************************************************
|
|
19084
19267
|
* MAIN FUNCTIONAL INTERFACE *
|
|
19085
19268
|
****************************************************************************************/
|
|
@@ -19089,7 +19272,7 @@ function MeetingMap(inConfig) {
|
|
|
19089
19272
|
this.rowClick = focusOnMeeting;
|
|
19090
19273
|
this.apiLoadedCallback = apiLoadedCallback;
|
|
19091
19274
|
this.refreshMeetings = loadAllMeetings;
|
|
19092
|
-
|
|
19275
|
+
this.getDistanceFromSearch = getDistanceFromSearch;
|
|
19093
19276
|
this.openModalWindow = openModalWindow;
|
|
19094
19277
|
this.closeModalWindow = closeModalWindow;
|
|
19095
19278
|
this.loadPopupMap = loadPopupMap;
|
|
@@ -19102,6 +19285,7 @@ MeetingMap.prototype.fillMap = null;
|
|
|
19102
19285
|
MeetingMap.prototype.rowClick = null;
|
|
19103
19286
|
MeetingMap.prototype.apiLoadedCallback = null;
|
|
19104
19287
|
MeetingMap.prototype.refreshMeetings = null;
|
|
19288
|
+
MeetingMap.prototype.getDistanceFromSearch = null;
|
|
19105
19289
|
|
|
19106
19290
|
MeetingMap.prototype.openModalWindow = null;
|
|
19107
19291
|
MeetingMap.prototype.closeModalWindow = null;
|