@bmlt-enabled/croutonjs 4.3.1 → 4.3.2
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 +28 -4
- package/crouton-core.min.css +1 -1
- package/crouton-gmaps.js +133 -25
- package/crouton-gmaps.min.js +7 -7
- package/crouton-gmaps.min.js.map +1 -1
- package/crouton-map.js +14 -13
- package/crouton-map.min.js +1 -1
- package/crouton-map.min.js.map +1 -1
- package/crouton.css +28 -4
- package/crouton.js +147 -38
- package/crouton.min.css +1 -1
- package/crouton.min.js +6 -6
- package/crouton.min.js.map +1 -1
- package/crouton.nojquery.js +133 -25
- 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
|
@@ -11210,6 +11210,7 @@ function CroutonLocalization(language) {
|
|
|
11210
11210
|
"waze_desc": "فتح في تطبيق وايز",
|
|
11211
11211
|
'address_lookup_fail': 'تعذر العثور على العنوان. يرجى المحاولة مرة أخرى.',
|
|
11212
11212
|
"favorites": "المفضلة",
|
|
11213
|
+
"choose one": "اختر واحدا",
|
|
11213
11214
|
"widen search": "البحث الواسع",
|
|
11214
11215
|
"cancel search": "إلغاء البحث"
|
|
11215
11216
|
},
|
|
@@ -11279,6 +11280,7 @@ function CroutonLocalization(language) {
|
|
|
11279
11280
|
"address_lookup_fail": "Adresu se nepodařilo najít. Zkuste to prosím znovu.",
|
|
11280
11281
|
"contact": "Kontakt",
|
|
11281
11282
|
"favorites": "Oblíbené",
|
|
11283
|
+
"choose one": "Vyberte si jedno:",
|
|
11282
11284
|
"widen search": "Rozšířit vyhledávání",
|
|
11283
11285
|
"cancel search": "Zrušit vyhledávání",
|
|
11284
11286
|
},
|
|
@@ -11350,6 +11352,7 @@ function CroutonLocalization(language) {
|
|
|
11350
11352
|
"address_lookup_fail": "Adressen kunne ikke findes. Prøv venligst igen.",
|
|
11351
11353
|
"contact": "Kontakt",
|
|
11352
11354
|
"favorites": "Favoritter",
|
|
11355
|
+
"choose one": "Vælg én:",
|
|
11353
11356
|
"widen search": "Udvid søgning",
|
|
11354
11357
|
"cancel search": "Annuller søgning",
|
|
11355
11358
|
},
|
|
@@ -11428,6 +11431,7 @@ function CroutonLocalization(language) {
|
|
|
11428
11431
|
"all meetings": "Alle Meetings",
|
|
11429
11432
|
'upcoming meetings': "Nächste 24 Stunden",
|
|
11430
11433
|
"favorites": "Favoriten",
|
|
11434
|
+
"choose one": "Auswählen:",
|
|
11431
11435
|
"widen search": "Suche ausweiten",
|
|
11432
11436
|
"cancel search": "Abbrechen",
|
|
11433
11437
|
},
|
|
@@ -11524,6 +11528,7 @@ function CroutonLocalization(language) {
|
|
|
11524
11528
|
"all meetings": "Όλες οι ομάδες",
|
|
11525
11529
|
"upcoming meetings": "Προσεχείς ομάδες",
|
|
11526
11530
|
"favorites": "Αγαπημένα",
|
|
11531
|
+
"choose one": "Επιλέξτε ένα:",
|
|
11527
11532
|
"widen search": "Διεύρυνση αναζήτησης",
|
|
11528
11533
|
"cancel search": "Ακύρωση αναζήτησης",
|
|
11529
11534
|
},
|
|
@@ -11597,6 +11602,7 @@ function CroutonLocalization(language) {
|
|
|
11597
11602
|
"sorted by distance": "Sorted by Distance",
|
|
11598
11603
|
"address_lookup_fail": "The address could not be found. Please try again.",
|
|
11599
11604
|
"favorites": "Favorites",
|
|
11605
|
+
"choose one": "Select one:",
|
|
11600
11606
|
"widen search": "Widen Search",
|
|
11601
11607
|
"cancel search": "Cancel Search",
|
|
11602
11608
|
},
|
|
@@ -11671,6 +11677,7 @@ function CroutonLocalization(language) {
|
|
|
11671
11677
|
"sorted by distance": "Sorted by Distance",
|
|
11672
11678
|
"address_lookup_fail": "The address could not be found. Please try again.",
|
|
11673
11679
|
"favorites": "Favorites",
|
|
11680
|
+
"choose one": "Select one:",
|
|
11674
11681
|
"widen search": "Widen Search",
|
|
11675
11682
|
"cancel search": "Cancel Search",
|
|
11676
11683
|
},
|
|
@@ -11745,6 +11752,7 @@ function CroutonLocalization(language) {
|
|
|
11745
11752
|
"sorted by distance": "Sorted by Distance",
|
|
11746
11753
|
"address_lookup_fail": "The address could not be found. Please try again.",
|
|
11747
11754
|
"favorites": "Favorites",
|
|
11755
|
+
"choose one": "Select one:",
|
|
11748
11756
|
"widen search": "Widen Search",
|
|
11749
11757
|
"cancel search": "Cancel Search",
|
|
11750
11758
|
},
|
|
@@ -11819,6 +11827,7 @@ function CroutonLocalization(language) {
|
|
|
11819
11827
|
"sorted by distance": "Sorted by Distance",
|
|
11820
11828
|
"address_lookup_fail": "The address could not be found. Please try again.",
|
|
11821
11829
|
"favorites": "Favorites",
|
|
11830
|
+
"choose one": "Select one:",
|
|
11822
11831
|
"widen search": "Widen Search",
|
|
11823
11832
|
"cancel search": "Cancel Search",
|
|
11824
11833
|
},
|
|
@@ -11917,7 +11926,7 @@ function CroutonLocalization(language) {
|
|
|
11917
11926
|
"all meetings": "All Meetings",
|
|
11918
11927
|
'upcoming meetings': "Upcoming Meetings",
|
|
11919
11928
|
"favorites": "Favorites",
|
|
11920
|
-
"choose one": "
|
|
11929
|
+
"choose one": "Select one:",
|
|
11921
11930
|
"widen search": "Widen Search",
|
|
11922
11931
|
"cancel search": "Cancel Search",
|
|
11923
11932
|
},
|
|
@@ -11993,6 +12002,7 @@ function CroutonLocalization(language) {
|
|
|
11993
12002
|
"sorted by distance": "Ordenado por distancia",
|
|
11994
12003
|
"address_lookup_fail": "The address could not be found. Please try again.",
|
|
11995
12004
|
"favorites": "Favoritos",
|
|
12005
|
+
"choose one": "Elige uno:",
|
|
11996
12006
|
"widen search": "Búsqueda amplia",
|
|
11997
12007
|
"cancel search": "Cancelar búsqueda",
|
|
11998
12008
|
},
|
|
@@ -12079,6 +12089,7 @@ function CroutonLocalization(language) {
|
|
|
12079
12089
|
'group details': 'نمایش گروه',
|
|
12080
12090
|
"address_lookup_fail": "آدرس پیدا نشد. لطفا دوباره تلاش کنید.",
|
|
12081
12091
|
"favorites": "مورد علاقه",
|
|
12092
|
+
"choose one": "یکی را انتخاب کنید",
|
|
12082
12093
|
"widen search": "جستجوی گسترده",
|
|
12083
12094
|
"cancel search": "لغو جستجو",
|
|
12084
12095
|
},
|
|
@@ -12152,6 +12163,7 @@ function CroutonLocalization(language) {
|
|
|
12152
12163
|
"sorted by distance": "Trié par distance",
|
|
12153
12164
|
"address_lookup_fail": "L'adresse est introuvable. Veuillez réessayer.",
|
|
12154
12165
|
"favorites": "Favoris",
|
|
12166
|
+
"choose one": "Choisis-en un",
|
|
12155
12167
|
"widen search": "Recherche élargie",
|
|
12156
12168
|
"cancel search": "Annuler la recherche",
|
|
12157
12169
|
},
|
|
@@ -12225,6 +12237,7 @@ function CroutonLocalization(language) {
|
|
|
12225
12237
|
"sorted by distance": "Ordinati per distanza",
|
|
12226
12238
|
"address_lookup_fail": "L'indirizzo non è stato trovato. Per favore riprova.",
|
|
12227
12239
|
"favorites": "Preferiti",
|
|
12240
|
+
"choose one": "Scegline uno",
|
|
12228
12241
|
"widen search": "Ricerca larga",
|
|
12229
12242
|
"cancel search": "Annulla ricerca",
|
|
12230
12243
|
},
|
|
@@ -12365,6 +12378,7 @@ function CroutonLocalization(language) {
|
|
|
12365
12378
|
"sorted by distance": "Posortowane według odległości",
|
|
12366
12379
|
"address_lookup_fail": "The address could not be found. Please try again.",
|
|
12367
12380
|
"favorites": "Ulubione",
|
|
12381
|
+
"choose one": "Wybierz jedną",
|
|
12368
12382
|
"widen search": "Widen Search",
|
|
12369
12383
|
"cancel search": "Cancel Search",
|
|
12370
12384
|
},
|
|
@@ -12509,6 +12523,7 @@ function CroutonLocalization(language) {
|
|
|
12509
12523
|
"sorted by distance": "Сортировка по расстоянию",
|
|
12510
12524
|
"address_lookup_fail": "Адрес не найден. Пожалуйста, попробуйте еще раз.",
|
|
12511
12525
|
"favorites": "Избранное",
|
|
12526
|
+
"choose one": "Выбери одну",
|
|
12512
12527
|
"widen search": "Расширить поиск",
|
|
12513
12528
|
"cancel search": "Отмена поиска",
|
|
12514
12529
|
},
|
|
@@ -12577,6 +12592,7 @@ function CroutonLocalization(language) {
|
|
|
12577
12592
|
"sorted by distance": "Zoradené podľa vzdialenosti",
|
|
12578
12593
|
"address_lookup_fail": "Adresa sa nenašla. Skúste to znova prosím.",
|
|
12579
12594
|
"favorites": "Obľúbené",
|
|
12595
|
+
"choose one": "Vyber si jeden",
|
|
12580
12596
|
"widen search": "Rozšíriť vyhľadávanie",
|
|
12581
12597
|
"cancel search": "Zrušiť vyhľadávanie",
|
|
12582
12598
|
},
|
|
@@ -13636,18 +13652,18 @@ this["hbs_Crouton"]["templates"]["locationSearch"] = Handlebars.template({"compi
|
|
|
13636
13652
|
+ alias3((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias2).call(alias1,"Search by location",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":3,"column":8},"end":{"line":3,"column":40}}}))
|
|
13637
13653
|
+ "\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" class=\"bi bi-crosshair\" viewBox=\"0 0 16 16\" style=\"vertical-align: sub;\">\n <path d=\"M8.5.5a.5.5 0 0 0-1 0v.518A7 7 0 0 0 1.018 7.5H.5a.5.5 0 0 0 0 1h.518A7 7 0 0 0 7.5 14.982v.518a.5.5 0 0 0 1 0v-.518A7 7 0 0 0 14.982 8.5h.518a.5.5 0 0 0 0-1h-.518A7 7 0 0 0 8.5 1.018zm-6.48 7A6 6 0 0 1 7.5 2.02v.48a.5.5 0 0 0 1 0v-.48a6 6 0 0 1 5.48 5.48h-.48a.5.5 0 0 0 0 1h.48a6 6 0 0 1-5.48 5.48v-.48a.5.5 0 0 0-1 0v.48A6 6 0 0 1 2.02 8.5h.48a.5.5 0 0 0 0-1zM8 10a2 2 0 1 0 0-4 2 2 0 0 0 0 4\"/>\n </svg>\n </span>\n</button>\n<div id=\"bmlt_location_search_modal\" class=\"modal\" style=\"display: none;\">\n <div id=\"bmlt_location_search_content\" class=\"modal-content\" style=\"border-color:unset;\">\n <span id=\"close_location_search\" class=\"modal-close\">x</span>\n <div class=\"modal-title\">"
|
|
13638
13654
|
+ alias3((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias2).call(alias1,"Search by location",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":12,"column":33},"end":{"line":12,"column":65}}}))
|
|
13639
|
-
+ "</div>\n <div class=\"crouton-modal-search-page\">\n <div id=\"modal-location-search-box\" class=\"modal-search\">\n <input id=\"bmlt-location-search-goto-text\" type=\"text\" class=\"crouton-goto-text\"\n placeholder=\""
|
|
13640
|
-
+ 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":
|
|
13641
|
-
+ "\">\n <button id=\"bmlt-location-search-text-button\" class=\"filter-button\">"
|
|
13642
|
-
+ alias3((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias2).call(alias1,"text_search",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":
|
|
13655
|
+
+ "</div>\n <div class=\"crouton-modal-search-page\">\n <div id=\"modal-location-search-box\" class=\"modal-search\">\n <div>\n <input id=\"bmlt-location-search-goto-text\" type=\"text\" class=\"crouton-goto-text\" autocomplete=\"off\"\n placeholder=\""
|
|
13656
|
+
+ 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":17,"column":33},"end":{"line":17,"column":71}}}))
|
|
13657
|
+
+ "\">\n </div>\n <button id=\"bmlt-location-search-text-button\" class=\"filter-button\">"
|
|
13658
|
+
+ alias3((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias2).call(alias1,"text_search",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":19,"column":84},"end":{"line":19,"column":109}}}))
|
|
13643
13659
|
+ "</button>\n </div>\n <div class=\"modal-search\">\n <button id=\"bmlt-location-search-nearbyMeetings\" class=\"filter-button\">"
|
|
13644
|
-
+ alias3((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias2).call(alias1,"near_me",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":
|
|
13660
|
+
+ alias3((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias2).call(alias1,"near_me",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":22,"column":87},"end":{"line":22,"column":108}}}))
|
|
13645
13661
|
+ "</button>\n </div>\n <div id=\"location-search-widen\" class=\"modal-search\">\n <button id=\"bmlt-location-search-widen\" class=\"filter-button\">"
|
|
13646
|
-
+ alias3((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias2).call(alias1,"Widen Search",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":
|
|
13662
|
+
+ alias3((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias2).call(alias1,"Widen Search",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":25,"column":78},"end":{"line":25,"column":104}}}))
|
|
13647
13663
|
+ "</button>\n </div>\n <div>\n <!--<button id=\"location-search-close\" class=\"advanced-search-button\" style=\"float:left\">"
|
|
13648
|
-
+ alias3((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias2).call(alias1,"Close",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":
|
|
13664
|
+
+ alias3((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias2).call(alias1,"Close",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":28,"column":96},"end":{"line":28,"column":115}}}))
|
|
13649
13665
|
+ "</a>-->\n <button id=\"bmlt-location_search-cancel\" class=\"advanced-search-button\">"
|
|
13650
|
-
+ alias3((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias2).call(alias1,"Cancel Search",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":
|
|
13666
|
+
+ alias3((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias2).call(alias1,"Cancel Search",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":29,"column":88},"end":{"line":29,"column":115}}}))
|
|
13651
13667
|
+ "</button>\n </div>\n </div>\n <div class=\"crouton-modal-search-choice\"></div>\n </div>\n</div>";
|
|
13652
13668
|
},"useData":true});
|
|
13653
13669
|
this["hbs_Crouton"]["templates"]["main"] = Handlebars.template({"0":function(container,depth0,helpers,partials,data) {
|
|
@@ -13848,8 +13864,8 @@ this["hbs_Crouton"]["templates"]["mapMenu"] = Handlebars.template({"0":function(
|
|
|
13848
13864
|
+ alias1((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias3).call(alias2,"Show meetings near...",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":44,"column":28},"end":{"line":44,"column":63}}}))
|
|
13849
13865
|
+ "</span><span id=\"close_search\" class=\"modal-close\">x</span>\n <p></p>\n <div class=\"crouton-modal-search-page\">\n <div class=\"modal-search\">\n "
|
|
13850
13866
|
+ alias1((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias3).call(alias2,"Enter a city or zip code",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":48,"column":16},"end":{"line":48,"column":54}}}))
|
|
13851
|
-
+ "\n <input id=\"goto-text\" class=\"crouton-goto-text\" type=\"text\">\n <button id=\"goto-button\" class=\"filter-button\">"
|
|
13852
|
-
+ alias1((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias3).call(alias2,"text_search",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":
|
|
13867
|
+
+ "\n <div>\n <input id=\"goto-text\" class=\"crouton-goto-text\" type=\"text\" autocomplete=\"off\">\n </div>\n <button id=\"goto-button\" class=\"filter-button\">"
|
|
13868
|
+
+ alias1((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias3).call(alias2,"text_search",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":52,"column":63},"end":{"line":52,"column":88}}}))
|
|
13853
13869
|
+ "</button>\n </div>\n </div>\n <div class=\"crouton-modal-search-choice\"></div>\n </div>\n</div>\n\n";
|
|
13854
13870
|
},"usePartial":true,"useData":true,"useDepths":true});
|
|
13855
13871
|
this["hbs_Crouton"]["templates"]["mapSearch"] = Handlebars.template({"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) {
|
|
@@ -15449,7 +15465,7 @@ function Crouton(config) {
|
|
|
15449
15465
|
self.distanceTabAllowed = false;
|
|
15450
15466
|
self.favoritesOn = false;
|
|
15451
15467
|
self.config = {
|
|
15452
|
-
version: '4.3.
|
|
15468
|
+
version: '4.3.2', // CroutonJS version for debugging
|
|
15453
15469
|
on_complete: null, // Javascript function to callback when data querying is completed.
|
|
15454
15470
|
root_server: null, // The root server to use.
|
|
15455
15471
|
placeholder_id: "bmlt-tabs", // The DOM id that will be used for rendering
|
|
@@ -17379,6 +17395,7 @@ function MeetingMap(inConfig) {
|
|
|
17379
17395
|
var gOldBounds = false;
|
|
17380
17396
|
var gCurrentlyDraggingMap = false;
|
|
17381
17397
|
var gLocationSearchResult = null;
|
|
17398
|
+
var gAllCities = [];
|
|
17382
17399
|
function preloadApiLoadedCallback(f,a) {
|
|
17383
17400
|
gLoadedCallbackFunction = f;
|
|
17384
17401
|
gLoadedCallbackArgs = a;
|
|
@@ -17527,6 +17544,96 @@ function MeetingMap(inConfig) {
|
|
|
17527
17544
|
function doGeolocationThenClose() {
|
|
17528
17545
|
doGeolocation().then(closeModalWindow(gLocationSearchModal));
|
|
17529
17546
|
}
|
|
17547
|
+
function addAutocompleteEvents(inp, button) {
|
|
17548
|
+
var currentFocus;
|
|
17549
|
+
inp.addEventListener("input",function(e) {
|
|
17550
|
+
var a, b, i, val = this.value;
|
|
17551
|
+
const inp = this;
|
|
17552
|
+
/*close any already open lists of autocompleted values*/
|
|
17553
|
+
closeAllLists();
|
|
17554
|
+
if (!val) { return false;}
|
|
17555
|
+
currentFocus = -1;
|
|
17556
|
+
/*create a DIV element that will contain the items (values):*/
|
|
17557
|
+
a = document.createElement("DIV");
|
|
17558
|
+
a.setAttribute("id", this.id + "autocomplete-list");
|
|
17559
|
+
a.setAttribute("class", "autocomplete-items");
|
|
17560
|
+
/*append the DIV element as a child of the autocomplete container:*/
|
|
17561
|
+
this.parentNode.appendChild(a);
|
|
17562
|
+
/*for each item in the array...*/
|
|
17563
|
+
for (i = 0; i < gAllCities.length; i++) {
|
|
17564
|
+
/*check if the item starts with the same letters as the text field value:*/
|
|
17565
|
+
if (gAllCities[i].substr(0, val.length).toUpperCase() == val.toUpperCase()) {
|
|
17566
|
+
/*create a DIV element for each matching element:*/
|
|
17567
|
+
b = document.createElement("DIV");
|
|
17568
|
+
/*make the matching letters bold:*/
|
|
17569
|
+
b.innerHTML = "<strong>" + gAllCities[i].substr(0, val.length) + "</strong>";
|
|
17570
|
+
b.innerHTML += gAllCities[i].substr(val.length);
|
|
17571
|
+
/*insert a input field that will hold the current array item's value:*/
|
|
17572
|
+
b.innerHTML += "<input type='hidden' value='" + gAllCities[i] + "'>";
|
|
17573
|
+
/*execute a function when someone clicks on the item value (DIV element):*/
|
|
17574
|
+
b.addEventListener("click", function(event) {
|
|
17575
|
+
/*insert the value for the autocomplete text field:*/
|
|
17576
|
+
inp.value = this.getElementsByTagName("input")[0].value;
|
|
17577
|
+
/*close the list of autocompleted values,
|
|
17578
|
+
(or any other open lists of autocompleted values:*/
|
|
17579
|
+
closeAllLists();
|
|
17580
|
+
button.click();
|
|
17581
|
+
});
|
|
17582
|
+
a.appendChild(b);
|
|
17583
|
+
}
|
|
17584
|
+
}
|
|
17585
|
+
});
|
|
17586
|
+
inp.addEventListener("keydown", function(e) {
|
|
17587
|
+
var x = document.getElementById(this.id + "autocomplete-list");
|
|
17588
|
+
if (x) x = x.getElementsByTagName("div");
|
|
17589
|
+
if (e.keyCode == 40) {
|
|
17590
|
+
/*If the arrow DOWN key is pressed,
|
|
17591
|
+
increase the currentFocus variable:*/
|
|
17592
|
+
currentFocus++;
|
|
17593
|
+
/*and and make the current item more visible:*/
|
|
17594
|
+
addActive(x);
|
|
17595
|
+
} else if (e.keyCode == 38) { //up
|
|
17596
|
+
/*If the arrow UP key is pressed,
|
|
17597
|
+
decrease the currentFocus variable:*/
|
|
17598
|
+
currentFocus--;
|
|
17599
|
+
/*and and make the current item more visible:*/
|
|
17600
|
+
addActive(x);
|
|
17601
|
+
} else if (e.keyCode == 13) {
|
|
17602
|
+
/*If the ENTER key is pressed, prevent the form from being submitted,*/
|
|
17603
|
+
e.preventDefault();
|
|
17604
|
+
if (currentFocus > -1) {
|
|
17605
|
+
/*and simulate a click on the "active" item:*/
|
|
17606
|
+
if (x) x[currentFocus].click();
|
|
17607
|
+
}
|
|
17608
|
+
}
|
|
17609
|
+
});
|
|
17610
|
+
function addActive(x) {
|
|
17611
|
+
/*a function to classify an item as "active":*/
|
|
17612
|
+
if (!x) return false;
|
|
17613
|
+
/*start by removing the "active" class on all items:*/
|
|
17614
|
+
removeActive(x);
|
|
17615
|
+
if (currentFocus >= x.length) currentFocus = 0;
|
|
17616
|
+
if (currentFocus < 0) currentFocus = (x.length - 1);
|
|
17617
|
+
/*add class "autocomplete-active":*/
|
|
17618
|
+
x[currentFocus].classList.add("autocomplete-active");
|
|
17619
|
+
}
|
|
17620
|
+
function removeActive(x) {
|
|
17621
|
+
/*a function to remove the "active" class from all autocomplete items:*/
|
|
17622
|
+
for (var i = 0; i < x.length; i++) {
|
|
17623
|
+
x[i].classList.remove("autocomplete-active");
|
|
17624
|
+
}
|
|
17625
|
+
}
|
|
17626
|
+
function closeAllLists() {
|
|
17627
|
+
var x = document.getElementsByClassName("autocomplete-items");
|
|
17628
|
+
for (var i = 0; i < x.length; i++) {
|
|
17629
|
+
x[i].parentNode.removeChild(x[i]);
|
|
17630
|
+
}
|
|
17631
|
+
}
|
|
17632
|
+
/*execute a function when someone clicks in the document:*/
|
|
17633
|
+
document.addEventListener("click", function (e) {
|
|
17634
|
+
closeAllLists(e.target);
|
|
17635
|
+
});
|
|
17636
|
+
}
|
|
17530
17637
|
function createLocationSearchButton() {
|
|
17531
17638
|
const template = hbs_Crouton.templates['locationSearch'];
|
|
17532
17639
|
const controlDiv = document.createElement('div');
|
|
@@ -17535,12 +17642,7 @@ function MeetingMap(inConfig) {
|
|
|
17535
17642
|
controlDiv.querySelector("#location-search-button").addEventListener('click', showLocationSearchDialog);
|
|
17536
17643
|
gDefaultLocationSearchButtonLabel = controlDiv.querySelector("#location-search-button :first-child").innerHTML;
|
|
17537
17644
|
controlDiv.querySelector("#bmlt-location-search-nearbyMeetings").addEventListener('click', doGeolocationThenClose);
|
|
17538
|
-
|
|
17539
|
-
if (event.key === "Enter") {
|
|
17540
|
-
event.preventDefault();
|
|
17541
|
-
document.getElementById("bmlt-location-search-text-button").click();
|
|
17542
|
-
}
|
|
17543
|
-
});
|
|
17645
|
+
addAutocompleteEvents(controlDiv.querySelector("#bmlt-location-search-goto-text"), controlDiv.querySelector("#bmlt-location-search-text-button"));
|
|
17544
17646
|
controlDiv.querySelector("#bmlt-location-search-text-button").addEventListener('click', function () {
|
|
17545
17647
|
let text = document.getElementById("bmlt-location-search-goto-text").value.trim();
|
|
17546
17648
|
if (text === "") return;
|
|
@@ -17673,11 +17775,7 @@ function MeetingMap(inConfig) {
|
|
|
17673
17775
|
});
|
|
17674
17776
|
[...controlDiv.getElementsByClassName('modal-close')].forEach((elem)=>elem.addEventListener('click', (e)=>closeModalWindow(e.target)));
|
|
17675
17777
|
controlDiv.querySelector("#close_table").addEventListener('click', hideListView);
|
|
17676
|
-
controlDiv.querySelector("#goto-text")
|
|
17677
|
-
if (event && event.key == "Enter") {
|
|
17678
|
-
lookupLocation(document.getElementById('goto-text').value,g_suspendedFullscreen, mapMenuGeocode);
|
|
17679
|
-
}
|
|
17680
|
-
});
|
|
17778
|
+
addAutocompleteEvents(controlDiv.querySelector("#goto-text"), controlDiv.querySelector("#goto-button"));
|
|
17681
17779
|
controlDiv.querySelector("#goto-button").addEventListener('click', function (event) {
|
|
17682
17780
|
lookupLocation(document.getElementById('goto-text').value, g_suspendedFullscreen, mapMenuGeocode);
|
|
17683
17781
|
});
|
|
@@ -17849,7 +17947,7 @@ function MeetingMap(inConfig) {
|
|
|
17849
17947
|
);
|
|
17850
17948
|
jQuery('#'+modalName+' .crouton-modal-search-page').addClass('hide');
|
|
17851
17949
|
jQuery('#'+modalName+' .crouton-modal-search-choice').removeClass('hide')
|
|
17852
|
-
.html('<div class="choose-location"><h4>'+crouton.localization.getWord('
|
|
17950
|
+
.html('<div class="choose-location"><h4>'+crouton.localization.getWord('Select one')+'</h4>'+html.join('')+'</div>')
|
|
17853
17951
|
jQuery('#'+modalName+' .location-choice').on('click', function() {
|
|
17854
17952
|
const index = parseInt(jQuery(this).data("choice"))
|
|
17855
17953
|
setLocationSearchButtonLabel(choices[index]);
|
|
@@ -17902,6 +18000,13 @@ function MeetingMap(inConfig) {
|
|
|
17902
18000
|
return;
|
|
17903
18001
|
}
|
|
17904
18002
|
gAllMeetings = meetings_responseObject.filter(m => m.venue_type != 2);
|
|
18003
|
+
gAllCities = meetings_responseObject.reduce(function (carry, m) {
|
|
18004
|
+
const fields = ['location_municipality', 'location_city_subsection', 'location_province', 'location_neighborhood'];
|
|
18005
|
+
fields.forEach(function (f) {
|
|
18006
|
+
if (m[f].length > 1 && !carry.includes(m[f])) carry.push(m[f]);
|
|
18007
|
+
});
|
|
18008
|
+
return carry;
|
|
18009
|
+
}, []);
|
|
17905
18010
|
if (fitBounds && !config.centerMe && !config.goto) {
|
|
17906
18011
|
let lat_lngs = gAllMeetings.reduce(function(a,m) {a.push([m.latitude, m.longitude]); return a;},[]);
|
|
17907
18012
|
const maxRadius = config.maxTomatoWidth/2.0;
|
|
@@ -18044,12 +18149,15 @@ function MeetingMap(inConfig) {
|
|
|
18044
18149
|
}
|
|
18045
18150
|
jQuery('#bmlt_location_search_modal .crouton-modal-search-page').removeClass('hide');
|
|
18046
18151
|
jQuery('#bmlt_location_search_modal .crouton-modal-search-choice').addClass('hide');
|
|
18047
|
-
jQuery('bmlt-location-search-goto-text').val('');
|
|
18152
|
+
jQuery('#bmlt-location-search-goto-text').val('');
|
|
18153
|
+
jQuery('#bmlt-location-search-goto-textautocomplete-list').remove();
|
|
18048
18154
|
}
|
|
18049
18155
|
function showGeocodingDialog(e=null) {
|
|
18050
18156
|
openModalWindow(document.getElementById('geocoding_modal'));
|
|
18051
18157
|
jQuery('#geocoding_modal .crouton-modal-search-page').removeClass('hide');
|
|
18052
18158
|
jQuery('#geocoding_modal .crouton-modal-search-choice').addClass('hide');
|
|
18159
|
+
jQuery('#goto-text').val('');
|
|
18160
|
+
jQuery('#goto-textautocomplete-list').remove();
|
|
18053
18161
|
}
|
|
18054
18162
|
function showListView(e=null) {
|
|
18055
18163
|
filterVisible();
|