@bmlt-enabled/croutonjs 3.21.1 → 3.22.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 +563 -10
- package/crouton-core.min.css +1 -1
- package/crouton-gmaps.js +161 -188
- package/crouton-gmaps.min.js +122 -1
- package/crouton-gmaps.min.js.map +1 -0
- package/crouton-leaflet.min.css +1 -0
- package/crouton-map.js +0 -783
- package/crouton-map.min.js +2 -1
- package/crouton-map.min.js.map +1 -0
- package/crouton.css +898 -891
- package/crouton.js +161 -188
- package/crouton.min.css +1 -1
- package/crouton.min.js +117 -1
- package/crouton.min.js.map +1 -0
- package/crouton.nojquery.js +161 -674
- package/crouton.nojquery.min.js +117 -1
- package/crouton.nojquery.min.js.map +1 -0
- package/package.json +1 -1
- package/crouton-core.js +0 -18007
- package/crouton-core.min.js +0 -1
- package/crouton-nocore.js +0 -16125
- package/crouton-nocore.min.js +0 -1
package/crouton.js
CHANGED
|
@@ -14202,83 +14202,66 @@ CroutonLocalization.prototype.getServiceBodyType = function(type) {
|
|
|
14202
14202
|
this["hbs_Crouton"] = this["hbs_Crouton"] || {};
|
|
14203
14203
|
this["hbs_Crouton"]["templates"] = this["hbs_Crouton"]["templates"] || {};
|
|
14204
14204
|
this["hbs_Crouton"]["templates"]["byday"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) {
|
|
14205
|
-
var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) {
|
|
14205
|
+
var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=container.lambda, alias4=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) {
|
|
14206
14206
|
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
14207
14207
|
return parent[propertyName];
|
|
14208
14208
|
}
|
|
14209
14209
|
return undefined
|
|
14210
14210
|
};
|
|
14211
14211
|
|
|
14212
|
-
return " <
|
|
14213
|
-
+
|
|
14212
|
+
return " <div class=\"meeting-group\" "
|
|
14213
|
+
+ ((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 : "")
|
|
14214
|
+
+ ">\n <div class=\"group-header\">"
|
|
14215
|
+
+ alias4(alias3((depth0 != null ? lookupProperty(depth0,"day") : depth0), depth0))
|
|
14216
|
+
+ "</div>\n <div class=\"group-table-div\">\n <table class='bmlt-table table table-striped table-hover table-bordered tablesaw tablesaw-stack "
|
|
14217
|
+
+ alias4((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias2).call(alias1,"css-direction",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":6,"column":116},"end":{"line":6,"column":143}}}))
|
|
14218
|
+
+ "'>\n <tbody class=\"h-"
|
|
14219
|
+
+ alias4(alias3((depth0 != null ? lookupProperty(depth0,"day") : depth0), depth0))
|
|
14214
14220
|
+ "\">\n"
|
|
14215
|
-
+ ((stack1 = lookupProperty(
|
|
14216
|
-
+ "
|
|
14217
|
-
+ ((stack1 = container.invokePartial(lookupProperty(partials,"meetings"),(depth0 != null ? lookupProperty(depth0,"meetings") : depth0),{"name":"meetings","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "")
|
|
14218
|
-
+ " </tbody>\n";
|
|
14219
|
-
},"2":function(container,depth0,helpers,partials,data) {
|
|
14220
|
-
var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) {
|
|
14221
|
-
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
14222
|
-
return parent[propertyName];
|
|
14223
|
-
}
|
|
14224
|
-
return undefined
|
|
14225
|
-
};
|
|
14226
|
-
|
|
14227
|
-
return ((stack1 = (lookupProperty(helpers,"greaterThan")||(depth0 && lookupProperty(depth0,"greaterThan"))||container.hooks.helperMissing).call(depth0 != null ? depth0 : (container.nullContext || {}),((stack1 = (depth0 != null ? lookupProperty(depth0,"meetings") : depth0)) != null ? lookupProperty(stack1,"length") : stack1),0,{"name":"greaterThan","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":6,"column":4},"end":{"line":10,"column":20}}})) != null ? stack1 : "");
|
|
14228
|
-
},"3":function(container,depth0,helpers,partials,data) {
|
|
14229
|
-
var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) {
|
|
14230
|
-
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
14231
|
-
return parent[propertyName];
|
|
14232
|
-
}
|
|
14233
|
-
return undefined
|
|
14234
|
-
};
|
|
14235
|
-
|
|
14236
|
-
return " <tr class=\"meeting-header\">\n <td colspan=\"3\" "
|
|
14237
|
-
+ ((stack1 = (lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||container.hooks.helperMissing).call(depth0 != null ? depth0 : (container.nullContext || {}),"css-textAlign",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":8,"column":22},"end":{"line":8,"column":51}}})) != null ? stack1 : "")
|
|
14238
|
-
+ ">"
|
|
14239
|
-
+ container.escapeExpression(container.lambda((depth0 != null ? lookupProperty(depth0,"day") : depth0), depth0))
|
|
14240
|
-
+ "</td>\n </tr>\n";
|
|
14221
|
+
+ ((stack1 = container.invokePartial(lookupProperty(partials,"meetings"),(depth0 != null ? lookupProperty(depth0,"meetings") : depth0),{"name":"meetings","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "")
|
|
14222
|
+
+ " </tbody>\n </table>\n </div>\n </div>\n";
|
|
14241
14223
|
},"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) {
|
|
14242
|
-
var stack1,
|
|
14224
|
+
var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) {
|
|
14243
14225
|
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
14244
14226
|
return parent[propertyName];
|
|
14245
14227
|
}
|
|
14246
14228
|
return undefined
|
|
14247
14229
|
};
|
|
14248
14230
|
|
|
14249
|
-
return "<div id=\"bmlt-table-div\">\n
|
|
14250
|
-
+
|
|
14251
|
-
+ "
|
|
14252
|
-
+ ((stack1 = lookupProperty(helpers,"each").call(alias1,depth0,{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":3,"column":8},"end":{"line":15,"column":17}}})) != null ? stack1 : "")
|
|
14253
|
-
+ " </table>\n</div>\n";
|
|
14231
|
+
return "<div id=\"bmlt-table-div\">\n"
|
|
14232
|
+
+ ((stack1 = lookupProperty(helpers,"each").call(depth0 != null ? depth0 : (container.nullContext || {}),depth0,{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":2,"column":8},"end":{"line":13,"column":17}}})) != null ? stack1 : "")
|
|
14233
|
+
+ "</div>\n";
|
|
14254
14234
|
},"usePartial":true,"useData":true});
|
|
14255
14235
|
this["hbs_Crouton"]["templates"]["byfield"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) {
|
|
14256
|
-
var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}),
|
|
14236
|
+
var stack1, helper, alias1=container.escapeExpression, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, lookupProperty = container.lookupProperty || function(parent, propertyName) {
|
|
14257
14237
|
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
14258
14238
|
return parent[propertyName];
|
|
14259
14239
|
}
|
|
14260
14240
|
return undefined
|
|
14261
14241
|
};
|
|
14262
14242
|
|
|
14263
|
-
return "
|
|
14264
|
-
+ ((
|
|
14265
|
-
+ "
|
|
14266
|
-
+
|
|
14267
|
-
+ "
|
|
14268
|
-
+ ((
|
|
14243
|
+
return " <div class=\"meeting-group "
|
|
14244
|
+
+ alias1(container.lambda((depth0 != null ? lookupProperty(depth0,"accordionState") : depth0), depth0))
|
|
14245
|
+
+ "\" "
|
|
14246
|
+
+ ((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 : "")
|
|
14247
|
+
+ ">\n <div class=\"group-header\">"
|
|
14248
|
+
+ 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)))
|
|
14249
|
+
+ "</div>\n <div class=\"group-table-div\">\n <table class='bmlt-table table table-striped table-hover table-bordered tablesaw tablesaw-stack "
|
|
14250
|
+
+ alias1((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias3).call(alias2,"css-direction",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":6,"column":101},"end":{"line":6,"column":128}}}))
|
|
14251
|
+
+ "'>\n <tbody class=\"byfield.hbs\">\n"
|
|
14252
|
+
+ ((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 : "")
|
|
14253
|
+
+ " </tbody>\n </table>\n </div>\n </div>\n";
|
|
14269
14254
|
},"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) {
|
|
14270
|
-
var stack1,
|
|
14255
|
+
var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) {
|
|
14271
14256
|
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
14272
14257
|
return parent[propertyName];
|
|
14273
14258
|
}
|
|
14274
14259
|
return undefined
|
|
14275
14260
|
};
|
|
14276
14261
|
|
|
14277
|
-
return "<div id=\"bmlt-table-div\">\n
|
|
14278
|
-
+
|
|
14279
|
-
+ "
|
|
14280
|
-
+ ((stack1 = lookupProperty(helpers,"each").call(alias1,depth0,{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":4,"column":2},"end":{"line":9,"column":11}}})) != null ? stack1 : "")
|
|
14281
|
-
+ " </tbody>\n </table>\n</div>\n";
|
|
14262
|
+
return "<div id=\"bmlt-table-div\">\n"
|
|
14263
|
+
+ ((stack1 = lookupProperty(helpers,"each").call(depth0 != null ? depth0 : (container.nullContext || {}),depth0,{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":2,"column":8},"end":{"line":13,"column":17}}})) != null ? stack1 : "")
|
|
14264
|
+
+ " </table>\n</div>";
|
|
14282
14265
|
},"usePartial":true,"useData":true});
|
|
14283
14266
|
this["hbs_Crouton"]["templates"]["formatPopup"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) {
|
|
14284
14267
|
var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3="function", alias4=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) {
|
|
@@ -14318,8 +14301,8 @@ this["hbs_Crouton"]["templates"]["header"] = Handlebars.template({"1":function(c
|
|
|
14318
14301
|
};
|
|
14319
14302
|
|
|
14320
14303
|
return ((stack1 = lookupProperty(helpers,"if").call(alias1,((stack1 = (depth0 != null ? lookupProperty(depth0,"config") : depth0)) != null ? lookupProperty(stack1,"include_weekday_button") : stack1),{"name":"if","hash":{},"fn":container.program(2, data, 0, blockParams, depths),"inverse":container.noop,"data":data,"loc":{"start":{"line":3,"column":4},"end":{"line":5,"column":11}}})) != null ? stack1 : "")
|
|
14321
|
-
+ ((stack1 = lookupProperty(helpers,"each").call(alias1,((stack1 = (depth0 != null ? lookupProperty(depth0,"config") : depth0)) != null ? lookupProperty(stack1,"
|
|
14322
|
-
+ ((stack1 = lookupProperty(helpers,"each").call(alias1,((stack1 = (depth0 != null ? lookupProperty(depth0,"config") : depth0)) != null ? lookupProperty(stack1,"
|
|
14304
|
+
+ ((stack1 = lookupProperty(helpers,"each").call(alias1,((stack1 = (depth0 != null ? lookupProperty(depth0,"config") : depth0)) != null ? lookupProperty(stack1,"grouping_buttons") : stack1),{"name":"each","hash":{},"fn":container.program(4, data, 0, blockParams, depths),"inverse":container.noop,"data":data,"loc":{"start":{"line":6,"column":4},"end":{"line":8,"column":13}}})) != null ? stack1 : "")
|
|
14305
|
+
+ ((stack1 = lookupProperty(helpers,"each").call(alias1,((stack1 = (depth0 != null ? lookupProperty(depth0,"config") : depth0)) != null ? lookupProperty(stack1,"formattype_grouping_buttons") : stack1),{"name":"each","hash":{},"fn":container.program(6, data, 0, blockParams, depths),"inverse":container.noop,"data":data,"loc":{"start":{"line":9,"column":4},"end":{"line":11,"column":13}}})) != null ? stack1 : "")
|
|
14323
14306
|
+ ((stack1 = lookupProperty(helpers,"if").call(alias1,((stack1 = (depth0 != null ? lookupProperty(depth0,"config") : depth0)) != null ? lookupProperty(stack1,"map_page") : stack1),{"name":"if","hash":{},"fn":container.program(8, data, 0, blockParams, depths),"inverse":container.noop,"data":data,"loc":{"start":{"line":12,"column":4},"end":{"line":14,"column":11}}})) != null ? stack1 : "")
|
|
14324
14307
|
+ "\n"
|
|
14325
14308
|
+ ((stack1 = lookupProperty(helpers,"each").call(alias1,(depth0 != null ? lookupProperty(depth0,"dropdownData") : depth0),{"name":"each","hash":{},"fn":container.program(10, data, 0, blockParams, depths),"inverse":container.noop,"data":data,"loc":{"start":{"line":16,"column":4},"end":{"line":25,"column":13}}})) != null ? stack1 : "")
|
|
@@ -14343,12 +14326,12 @@ this["hbs_Crouton"]["templates"]["header"] = Handlebars.template({"1":function(c
|
|
|
14343
14326
|
return undefined
|
|
14344
14327
|
};
|
|
14345
14328
|
|
|
14346
|
-
return " <div class=\"bmlt-button-container\"><a id=\"
|
|
14329
|
+
return " <div class=\"bmlt-button-container\"><a id=\"groupingButton_"
|
|
14347
14330
|
+ alias2(alias1((depth0 != null ? lookupProperty(depth0,"field") : depth0), depth0))
|
|
14348
14331
|
+ "\" tabindex=0 data-field=\""
|
|
14349
14332
|
+ alias2(alias1((depth0 != null ? lookupProperty(depth0,"title") : depth0), depth0))
|
|
14350
|
-
+ "\" class=\"
|
|
14351
|
-
+ alias2((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||container.hooks.helperMissing).call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? lookupProperty(depth0,"title") : depth0),{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":7,"column":
|
|
14333
|
+
+ "\" class=\"groupingButton groupingButtonLogic btn btn-primary btn-sm\">"
|
|
14334
|
+
+ alias2((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||container.hooks.helperMissing).call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? lookupProperty(depth0,"title") : depth0),{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":7,"column":186},"end":{"line":7,"column":208}}}))
|
|
14352
14335
|
+ "</a></div>\n";
|
|
14353
14336
|
},"6":function(container,depth0,helpers,partials,data) {
|
|
14354
14337
|
var alias1=container.lambda, alias2=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) {
|
|
@@ -14358,11 +14341,11 @@ this["hbs_Crouton"]["templates"]["header"] = Handlebars.template({"1":function(c
|
|
|
14358
14341
|
return undefined
|
|
14359
14342
|
};
|
|
14360
14343
|
|
|
14361
|
-
return " <div class=\"bmlt-button-container\"><a id=\"
|
|
14344
|
+
return " <div class=\"bmlt-button-container\"><a id=\"groupingButton_"
|
|
14362
14345
|
+ alias2(alias1((depth0 != null ? lookupProperty(depth0,"field") : depth0), depth0))
|
|
14363
14346
|
+ "\"tabindex=0 data-field=\""
|
|
14364
14347
|
+ alias2(alias1((depth0 != null ? lookupProperty(depth0,"field") : depth0), depth0))
|
|
14365
|
-
+ "\" class=\"
|
|
14348
|
+
+ "\" class=\"groupingButton groupingButtonLogic btn btn-primary btn-sm\">"
|
|
14366
14349
|
+ alias2(alias1((depth0 != null ? lookupProperty(depth0,"title") : depth0), depth0))
|
|
14367
14350
|
+ "</a></div>\n";
|
|
14368
14351
|
},"8":function(container,depth0,helpers,partials,data) {
|
|
@@ -14373,8 +14356,8 @@ this["hbs_Crouton"]["templates"]["header"] = Handlebars.template({"1":function(c
|
|
|
14373
14356
|
return undefined
|
|
14374
14357
|
};
|
|
14375
14358
|
|
|
14376
|
-
return " <div class=\"bmlt-button-container\"><a id=\"
|
|
14377
|
-
+ container.escapeExpression((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||container.hooks.helperMissing).call(depth0 != null ? depth0 : (container.nullContext || {}),"map",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":13,"column":
|
|
14359
|
+
return " <div class=\"bmlt-button-container\"><a id=\"groupingButton_embeddedMapPage\" tabindex=0 data-field=\"embeddedMapPage\" class=\"groupingButton btn btn-primary btn-sm\">"
|
|
14360
|
+
+ container.escapeExpression((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||container.hooks.helperMissing).call(depth0 != null ? depth0 : (container.nullContext || {}),"map",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":13,"column":168},"end":{"line":13,"column":185}}}))
|
|
14378
14361
|
+ "</a></div>\n";
|
|
14379
14362
|
},"10":function(container,depth0,helpers,partials,data,blockParams,depths) {
|
|
14380
14363
|
var stack1, helper, alias1=container.escapeExpression, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4="function", lookupProperty = container.lookupProperty || function(parent, propertyName) {
|
|
@@ -14527,8 +14510,8 @@ this["hbs_Crouton"]["templates"]["main"] = Handlebars.template({"1":function(con
|
|
|
14527
14510
|
+ " hide\">\n"
|
|
14528
14511
|
+ ((stack1 = container.invokePartial(lookupProperty(partials,"header"),depth0,{"name":"header","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "")
|
|
14529
14512
|
+ " </div>\n"
|
|
14530
|
-
+ ((stack1 = lookupProperty(helpers,"each").call(alias1,((stack1 = (depth0 != null ? lookupProperty(depth0,"meetings") : depth0)) != null ? lookupProperty(stack1,"
|
|
14531
|
-
+ ((stack1 = lookupProperty(helpers,"each").call(alias1,((stack1 = (depth0 != null ? lookupProperty(depth0,"meetings") : depth0)) != null ? lookupProperty(stack1,"
|
|
14513
|
+
+ ((stack1 = lookupProperty(helpers,"each").call(alias1,((stack1 = (depth0 != null ? lookupProperty(depth0,"meetings") : depth0)) != null ? lookupProperty(stack1,"groupingButtons") : stack1),{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":5,"column":1},"end":{"line":9,"column":10}}})) != null ? stack1 : "")
|
|
14514
|
+
+ ((stack1 = lookupProperty(helpers,"each").call(alias1,((stack1 = (depth0 != null ? lookupProperty(depth0,"meetings") : depth0)) != null ? lookupProperty(stack1,"formattypeGroupingButtons") : stack1),{"name":"each","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":10,"column":4},"end":{"line":14,"column":10}}})) != null ? stack1 : "")
|
|
14532
14515
|
+ ((stack1 = lookupProperty(helpers,"if").call(alias1,((stack1 = (depth0 != null ? lookupProperty(depth0,"config") : depth0)) != null ? lookupProperty(stack1,"map_page") : stack1),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":15,"column":4},"end":{"line":18,"column":11}}})) != null ? stack1 : "")
|
|
14533
14516
|
+ " <div id=\"byday\" class=\"bmlt-page "
|
|
14534
14517
|
+ alias3((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias2).call(alias1,"css-direction",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":19,"column":37},"end":{"line":19,"column":64}}}))
|
|
@@ -15021,7 +15004,7 @@ var croutonDefaultTemplates = {
|
|
|
15021
15004
|
meetingpage_frame_template: `
|
|
15022
15005
|
<div id="meeting_modal" class="modal bootstrap-bmlt" style="display: none;" tabindex="-1" >
|
|
15023
15006
|
<div class="modal-content">
|
|
15024
|
-
<span class="modal-title">{{getWord "Meeting Details"}}</span><span id="close_meeting_details" class="modal-close" style="position: absolute;right: 5px;top:10px;"
|
|
15007
|
+
<span class="modal-title">{{getWord "Meeting Details"}}</span><span id="close_meeting_details" class="modal-close" style="position: absolute;right: 5px;top:10px;">x</span>
|
|
15025
15008
|
<table id="meeting-details-table" class="bmlt-table {{getWord 'css-direction'}} table table-striped table-hover table-bordered tablesaw tablesaw-stack meeting-details">
|
|
15026
15009
|
<thead>
|
|
15027
15010
|
<th id="meeting-details-title" colspan="2">
|
|
@@ -16134,33 +16117,12 @@ crouton_Handlebars.registerHelper("enrich", () => '');
|
|
|
16134
16117
|
crouton_Handlebars.registerHelper('selectFormatPopup', () => "formatPopup");
|
|
16135
16118
|
crouton_Handlebars.registerHelper('selectObserver', () => "observerTemplate");
|
|
16136
16119
|
|
|
16137
|
-
const retrieveGeolocation = () => {
|
|
16138
|
-
return new Promise((resolve, reject) => {
|
|
16139
|
-
if (window.storedGeolocation) {
|
|
16140
|
-
resolve(window.storedGeolocation);
|
|
16141
|
-
} else if (navigator.geolocation) {
|
|
16142
|
-
navigator.geolocation.getCurrentPosition((position) => {
|
|
16143
|
-
window.storedGeolocation = {
|
|
16144
|
-
latitude: position.coords.latitude,
|
|
16145
|
-
longitude: position.coords.longitude
|
|
16146
|
-
};
|
|
16147
|
-
resolve(window.storedGeolocation);
|
|
16148
|
-
}, (error) => {
|
|
16149
|
-
reject(new Error('Error getting geolocation: ' + error.message));
|
|
16150
|
-
});
|
|
16151
|
-
} else {
|
|
16152
|
-
reject(new Error('Geolocation is not supported by this browser.'));
|
|
16153
|
-
}
|
|
16154
|
-
});
|
|
16155
|
-
};
|
|
16156
|
-
|
|
16157
16120
|
function Crouton(config) {
|
|
16158
16121
|
var self = this;
|
|
16159
16122
|
self.mutex = false;
|
|
16160
16123
|
self.filtering = false;
|
|
16161
16124
|
self.masterFormatCodes = [];
|
|
16162
16125
|
self.currentView = "weekday";
|
|
16163
|
-
self.max_filters = 10; // TODO: needs to be refactored so that dropdowns are treated dynamically
|
|
16164
16126
|
self.config = {
|
|
16165
16127
|
on_complete: null, // Javascript function to callback when data querying is completed.
|
|
16166
16128
|
root_server: null, // The root server to use.
|
|
@@ -16169,16 +16131,16 @@ function Crouton(config) {
|
|
|
16169
16131
|
time_format: "h:mm a", // The format for time
|
|
16170
16132
|
language: "en-US", // Default language translation, available translations listed here: https://github.com/bmlt-enabled/crouton/blob/master/croutonjs/src/js/crouton-localization.js
|
|
16171
16133
|
has_tabs: true, // Shows the day tabs
|
|
16172
|
-
filter_tabs:
|
|
16134
|
+
filter_tabs: 20, // Whether to show weekday tabs on filtering.
|
|
16173
16135
|
filter_visible: 0, // whether entries in table should be limited to those visible in map
|
|
16174
16136
|
header: true, // Shows the dropdowns and buttons
|
|
16175
16137
|
include_weekday_button: true, // Shows the weekday button
|
|
16176
16138
|
int_include_unpublished: 0, // Includes unpublished meeting
|
|
16177
|
-
|
|
16139
|
+
grouping_buttons: [
|
|
16178
16140
|
{'title': 'City', 'field': 'location_municipality'},
|
|
16179
16141
|
{'title': 'Distance', 'field': 'distance_in_km'},
|
|
16180
16142
|
],
|
|
16181
|
-
|
|
16143
|
+
formattype_grouping_buttons: [],
|
|
16182
16144
|
default_filter_dropdown: "", // Sets the default format for the dropdowns, the names will match the `has_` fields dropdowns without `has_. Example: `formats=closed`.
|
|
16183
16145
|
show_map: "embed", // Shows the map with pins
|
|
16184
16146
|
map_search: null, // Start search with map click (ex {"latitude":x,"longitude":y,"width":-10,"zoom":10}
|
|
@@ -16200,7 +16162,7 @@ function Crouton(config) {
|
|
|
16200
16162
|
recurse_service_bodies: false,// Recurses service bodies when making service bodies request
|
|
16201
16163
|
service_body: [], // Array of service bodies to return data for.
|
|
16202
16164
|
formats: '', // Return only meetings with these formats (format shared-id, not key-string)
|
|
16203
|
-
venue_types:
|
|
16165
|
+
venue_types: [], // Return only meetings with this venue type (1, 2 or 3)
|
|
16204
16166
|
strict_datafields: true, // Only get the datafields that are mentioned in the templates
|
|
16205
16167
|
meeting_details_href: '', // Link to the meeting details page
|
|
16206
16168
|
virtual_meeting_details_href: '', // Link to the virtual meeting details page
|
|
@@ -16213,7 +16175,7 @@ function Crouton(config) {
|
|
|
16213
16175
|
custom_query: null, // Enables overriding the services related queries for a custom one
|
|
16214
16176
|
sort_keys: "start_time", // Controls sort keys on the query
|
|
16215
16177
|
int_start_day_id: 1, // Controls the first day of the week sequence. Sunday is 1.
|
|
16216
|
-
view_by: "weekday", // TODO: replace with using the first choice in
|
|
16178
|
+
view_by: "weekday", // TODO: replace with using the first choice in grouping_buttons as the default view_by.
|
|
16217
16179
|
show_qrcode: false, // Determines whether or not to show the QR code for virtual / phone meetings if they exist.
|
|
16218
16180
|
force_rootserver_in_querystring: true, // Set to false to shorten generated meeting detail query strings
|
|
16219
16181
|
force_timeformat_in_querystring: true, // Set to false to shorten generated meeting detail query strings
|
|
@@ -16397,6 +16359,9 @@ function Crouton(config) {
|
|
|
16397
16359
|
return prev +'&formats[]='+id;
|
|
16398
16360
|
}, '');
|
|
16399
16361
|
}
|
|
16362
|
+
if (self.config.map_search && !Array.isArray(self.config['venue_types'])) {
|
|
16363
|
+
self.config['venue_types'] = [];
|
|
16364
|
+
}
|
|
16400
16365
|
if (self.config.map_search && self.config['venue_types'].length === 0) {
|
|
16401
16366
|
self.config['venue_types'].push('-2');
|
|
16402
16367
|
}
|
|
@@ -16466,23 +16431,25 @@ function Crouton(config) {
|
|
|
16466
16431
|
if (!self.config['has_tabs'] || (self.config['filter_tabs'] && self.config['filter_tabs'] >= showingNow)) {
|
|
16467
16432
|
self.byDayView();
|
|
16468
16433
|
|
|
16469
|
-
jQuery(".
|
|
16470
|
-
if (jQuery(
|
|
16471
|
-
jQuery(
|
|
16472
|
-
|
|
16434
|
+
jQuery("#byday").find('.meeting-group').each(function(index) {
|
|
16435
|
+
if (jQuery(this).find(".bmlt-data-row.hide").length === jQuery(this).find(".bmlt-data-row").length)
|
|
16436
|
+
jQuery(this).addClass("hide");
|
|
16437
|
+
else jQuery(this).removeClass('hide');
|
|
16473
16438
|
});
|
|
16474
16439
|
} else {
|
|
16475
16440
|
self.dayView();
|
|
16476
16441
|
}
|
|
16477
16442
|
} else if (viewName=='map') {
|
|
16478
16443
|
self.mapView();
|
|
16444
|
+
} else if (jQuery('#groupingButton_'+viewName.toUpperCase()).length == 0) {
|
|
16445
|
+
self.groupedView(self.config.grouping_buttons.find((bf) => bf.title.toLowerCase() === viewName).field);
|
|
16479
16446
|
} else {
|
|
16480
|
-
self.
|
|
16447
|
+
self.groupedView(viewName.toUpperCase());
|
|
16481
16448
|
}
|
|
16482
16449
|
};
|
|
16483
16450
|
|
|
16484
16451
|
self.byDayView = function () {
|
|
16485
|
-
self.lowlightButton(".
|
|
16452
|
+
self.lowlightButton(".groupingButton");
|
|
16486
16453
|
self.highlightButton("#day");
|
|
16487
16454
|
jQuery('.bmlt-page').each(function (index) {
|
|
16488
16455
|
self.hidePage("#" + this.id);
|
|
@@ -16495,7 +16462,7 @@ function Crouton(config) {
|
|
|
16495
16462
|
};
|
|
16496
16463
|
|
|
16497
16464
|
self.dayView = function () {
|
|
16498
|
-
self.lowlightButton(".
|
|
16465
|
+
self.lowlightButton(".groupingButton");
|
|
16499
16466
|
self.highlightButton("#day");
|
|
16500
16467
|
jQuery('.bmlt-page').each(function (index) {
|
|
16501
16468
|
self.hidePage("#" + this.id);
|
|
@@ -16506,37 +16473,25 @@ function Crouton(config) {
|
|
|
16506
16473
|
});
|
|
16507
16474
|
};
|
|
16508
16475
|
|
|
16509
|
-
self.
|
|
16476
|
+
self.groupedView = function (field) {
|
|
16510
16477
|
self.lowlightButton("#day");
|
|
16511
|
-
self.lowlightButton(".
|
|
16512
|
-
self.highlightButton("#
|
|
16478
|
+
self.lowlightButton(".groupingButton");
|
|
16479
|
+
self.highlightButton("#groupingButton_" + field);
|
|
16513
16480
|
jQuery('.bmlt-page').each(function (index) {
|
|
16514
16481
|
self.hidePage("#" + this.id);
|
|
16515
16482
|
self.showPage("#byfield_" + field);
|
|
16516
|
-
jQuery("#byfield_" + field).find('.meeting-
|
|
16517
|
-
|
|
16518
|
-
|
|
16519
|
-
|
|
16520
|
-
|
|
16521
|
-
const main = item;
|
|
16522
|
-
while(item = item.next()) {
|
|
16523
|
-
if (item.length === 0) break;
|
|
16524
|
-
if (item.hasClass('meeting-header')) break;
|
|
16525
|
-
if (!item.hasClass('hide')) {
|
|
16526
|
-
flag = true;
|
|
16527
|
-
break;
|
|
16528
|
-
}
|
|
16529
|
-
}
|
|
16530
|
-
if (!flag) main.addClass('hide');
|
|
16531
|
-
})
|
|
16532
|
-
return;
|
|
16483
|
+
jQuery("#byfield_" + field).find('.meeting-group').each(function(index) {
|
|
16484
|
+
if (jQuery(this).find(".bmlt-data-row.hide").length === jQuery(this).find(".bmlt-data-row").length)
|
|
16485
|
+
jQuery(this).addClass("hide");
|
|
16486
|
+
else jQuery(this).removeClass('hide');
|
|
16487
|
+
});
|
|
16533
16488
|
});
|
|
16534
|
-
}
|
|
16489
|
+
}
|
|
16535
16490
|
self.mapView = function() {
|
|
16536
16491
|
self.lowlightButton("#day");
|
|
16537
|
-
self.lowlightButton(".
|
|
16538
|
-
self.highlightButton("#
|
|
16539
|
-
self.
|
|
16492
|
+
self.lowlightButton(".groupingButton");
|
|
16493
|
+
self.highlightButton("#groupingButton_embeddedMapPage");
|
|
16494
|
+
self.groupedView("embeddedMapPage", false);
|
|
16540
16495
|
croutonMap.showMap(false,false);
|
|
16541
16496
|
}
|
|
16542
16497
|
self.lowlightButton = function (id) {
|
|
@@ -16555,14 +16510,13 @@ function Crouton(config) {
|
|
|
16555
16510
|
jQuery("#tab-pane").removeClass("show").addClass("hide");
|
|
16556
16511
|
};
|
|
16557
16512
|
|
|
16558
|
-
self.
|
|
16559
|
-
jQuery(".
|
|
16513
|
+
self.filterMeetingsFromView = function () {
|
|
16514
|
+
jQuery(".group-header").removeClass("hide");
|
|
16515
|
+
jQuery(".meeting-group").removeClass("hide");
|
|
16560
16516
|
jQuery(".bmlt-data-row").removeClass("hide");
|
|
16561
|
-
var filteringDropdown = false;
|
|
16562
16517
|
jQuery(".filter-dropdown").each(function(index, filter) {
|
|
16563
16518
|
const dataValue = filter.value.replace("a-", "");
|
|
16564
16519
|
if (dataValue === "") return;
|
|
16565
|
-
filteringDropdown = true;
|
|
16566
16520
|
const dataType = filter.getAttribute("data-pointer").toLowerCase();
|
|
16567
16521
|
if (dataType !== "formats" && dataType !== "languages" && dataType !== "venues" && dataType !== "common_needs") {
|
|
16568
16522
|
jQuery(".bmlt-data-row").not("[data-" + dataType + "='" + dataValue + "']").addClass("hide");
|
|
@@ -16589,7 +16543,8 @@ function Crouton(config) {
|
|
|
16589
16543
|
self.updateFilters();
|
|
16590
16544
|
self.updateMeetingCount();
|
|
16591
16545
|
jQuery(".filter-dropdown").val(null).trigger("change");
|
|
16592
|
-
jQuery(".
|
|
16546
|
+
jQuery(".group-header").removeClass("hide");
|
|
16547
|
+
jQuery(".meeting-group").removeClass("hide");
|
|
16593
16548
|
jQuery(".bmlt-data-row").removeClass("hide");
|
|
16594
16549
|
jQuery(".evenRow").removeClass("evenRow");
|
|
16595
16550
|
jQuery(".oddRow").removeClass("oddRow");
|
|
@@ -16619,15 +16574,33 @@ function Crouton(config) {
|
|
|
16619
16574
|
}
|
|
16620
16575
|
self.renderStandaloneMap = function (selector, context, callback=null, fitBounds=true) {
|
|
16621
16576
|
hbs_Crouton['localization'] = self.localization;
|
|
16622
|
-
self.config["hide_byday_headers"] = true;
|
|
16623
16577
|
crouton_Handlebars.registerPartial('meetings', hbs_Crouton.templates['meetings']);
|
|
16624
16578
|
crouton_Handlebars.registerPartial('bydays', hbs_Crouton.templates['byday']);
|
|
16625
16579
|
crouton_Handlebars.registerPartial('formatPopup', hbs_Crouton.templates['formatPopup']);
|
|
16626
16580
|
window.crouton = self;
|
|
16627
16581
|
croutonMap.initialize(self.createBmltMapElement(),self.meetingData,context,null,fitBounds,callback,self.config['noMap']);
|
|
16628
16582
|
}
|
|
16583
|
+
self.retrieveGeolocation = function() {
|
|
16584
|
+
return new Promise((resolve, reject) => {
|
|
16585
|
+
if (window.storedGeolocation) {
|
|
16586
|
+
resolve(window.storedGeolocation);
|
|
16587
|
+
} else if (navigator.geolocation) {
|
|
16588
|
+
navigator.geolocation.getCurrentPosition((position) => {
|
|
16589
|
+
window.storedGeolocation = {
|
|
16590
|
+
latitude: position.coords.latitude,
|
|
16591
|
+
longitude: position.coords.longitude
|
|
16592
|
+
};
|
|
16593
|
+
resolve(window.storedGeolocation);
|
|
16594
|
+
}, (error) => {
|
|
16595
|
+
reject(new Error('Error getting geolocation: ' + error.message));
|
|
16596
|
+
});
|
|
16597
|
+
} else {
|
|
16598
|
+
reject(new Error('Geolocation is not supported by this browser.'));
|
|
16599
|
+
}
|
|
16600
|
+
});
|
|
16601
|
+
};
|
|
16629
16602
|
self.getCurrentLocation = function(callback) {
|
|
16630
|
-
|
|
16603
|
+
self.gretrieveGeolocation().then(position => {
|
|
16631
16604
|
callback(position);
|
|
16632
16605
|
}).catch(error => {
|
|
16633
16606
|
jQuery('.geo').removeClass("hide").addClass("show").html(`<p>${error.message}</p>`);
|
|
@@ -16782,7 +16755,7 @@ function Crouton(config) {
|
|
|
16782
16755
|
Crouton.prototype.filterNext24 = function(filterNow = true) {
|
|
16783
16756
|
if (!filterNow) {
|
|
16784
16757
|
jQuery("#filter-dropdown-next24").val('a-');
|
|
16785
|
-
self.
|
|
16758
|
+
self.filterMeetingsFromView();
|
|
16786
16759
|
return;
|
|
16787
16760
|
}
|
|
16788
16761
|
const date = new Date();
|
|
@@ -16811,33 +16784,9 @@ function Crouton(config) {
|
|
|
16811
16784
|
row.dataset.next24 = (next24.includes(row.id.split('-').pop())) ? '1' : '0';
|
|
16812
16785
|
});
|
|
16813
16786
|
jQuery("#filter-dropdown-next24").val('a-1');
|
|
16814
|
-
self.
|
|
16787
|
+
self.filterMeetingsFromView();
|
|
16815
16788
|
}
|
|
16816
16789
|
|
|
16817
|
-
self.distance = function(lat1, lon1, lat2, lon2, unit) {
|
|
16818
|
-
if ((lat1 === lat2) && (lon1 === lon2)) {
|
|
16819
|
-
return 0;
|
|
16820
|
-
} else {
|
|
16821
|
-
var radlat1 = Math.PI * lat1/180;
|
|
16822
|
-
var radlat2 = Math.PI * lat2/180;
|
|
16823
|
-
var theta = lon1-lon2;
|
|
16824
|
-
var radtheta = Math.PI * theta/180;
|
|
16825
|
-
var dist = Math.sin(radlat1) * Math.sin(radlat2) + Math.cos(radlat1) * Math.cos(radlat2) * Math.cos(radtheta);
|
|
16826
|
-
if (dist > 1) {
|
|
16827
|
-
dist = 1;
|
|
16828
|
-
}
|
|
16829
|
-
dist = Math.acos(dist);
|
|
16830
|
-
dist = dist * 180/Math.PI;
|
|
16831
|
-
dist = dist * 60 * 1.1515;
|
|
16832
|
-
if (unit === "K") {
|
|
16833
|
-
return dist * 1.609344;
|
|
16834
|
-
} else if (unit === "N") {
|
|
16835
|
-
return dist * 0.8684;
|
|
16836
|
-
} else {
|
|
16837
|
-
return dist;
|
|
16838
|
-
}
|
|
16839
|
-
}
|
|
16840
|
-
};
|
|
16841
16790
|
self.toFarsinNumber = function( n ) {
|
|
16842
16791
|
const farsiDigits = ['۰', '۱', '۲', '۳', '۴', '۵', '۶', '۷', '۸', '۹'];
|
|
16843
16792
|
|
|
@@ -17024,6 +16973,16 @@ function Crouton(config) {
|
|
|
17024
16973
|
|
|
17025
16974
|
Crouton.prototype.setConfig = function(config) {
|
|
17026
16975
|
var self = this;
|
|
16976
|
+
const deprecatedNames = {
|
|
16977
|
+
button_filters: 'grouping_buttons',
|
|
16978
|
+
button_format_filters: 'formattype_grouping_buttons',
|
|
16979
|
+
}
|
|
16980
|
+
for (var propertyName in deprecatedNames) {
|
|
16981
|
+
if (config.hasOwnProperty(propertyName)) {
|
|
16982
|
+
config[deprecatedNames[propertyName]] = config[propertyName];
|
|
16983
|
+
delete config[deprecatedNames[propertyName]];
|
|
16984
|
+
}
|
|
16985
|
+
}
|
|
17027
16986
|
for (var propertyName in config) {
|
|
17028
16987
|
if (propertyName.indexOf("_template") > 0 && config[propertyName].trim() === "") {
|
|
17029
16988
|
continue;
|
|
@@ -17081,7 +17040,7 @@ Crouton.prototype.reset = function() {
|
|
|
17081
17040
|
};
|
|
17082
17041
|
|
|
17083
17042
|
Crouton.prototype.doFilters = function() {
|
|
17084
|
-
return this.
|
|
17043
|
+
return this.filterMeetingsFromView();
|
|
17085
17044
|
}
|
|
17086
17045
|
Crouton.prototype.getServiceBodyDetails = function(serviceBodyId) {
|
|
17087
17046
|
var self = this;
|
|
@@ -17215,8 +17174,8 @@ Crouton.prototype.searchMap = function() {
|
|
|
17215
17174
|
"config": self.config,
|
|
17216
17175
|
"meetings": {
|
|
17217
17176
|
"weekdays": [],
|
|
17218
|
-
"
|
|
17219
|
-
"
|
|
17177
|
+
"groupingButtons": [],
|
|
17178
|
+
"formattypeGroupingButtons": [],
|
|
17220
17179
|
"bydays": [],
|
|
17221
17180
|
"meetingCount": 0,
|
|
17222
17181
|
"meetingData": []
|
|
@@ -17229,7 +17188,7 @@ Crouton.prototype.render = function(doMeetingMap = false) {
|
|
|
17229
17188
|
var self = this;
|
|
17230
17189
|
|
|
17231
17190
|
if (!self.config.map_search) {
|
|
17232
|
-
self.config.
|
|
17191
|
+
self.config.grouping_buttons = self.config.grouping_buttons.filter((b) => !b.field.startsWith('distance'));
|
|
17233
17192
|
if (self.config['view_by'] == 'distance') self.config['view_by'] = 'weekday';
|
|
17234
17193
|
}
|
|
17235
17194
|
self.lock(function() {
|
|
@@ -17276,8 +17235,8 @@ Crouton.prototype.render = function(doMeetingMap = false) {
|
|
|
17276
17235
|
|
|
17277
17236
|
var day_counter = 0;
|
|
17278
17237
|
var byDayData = [];
|
|
17279
|
-
var
|
|
17280
|
-
var
|
|
17238
|
+
var groupingButtonsData = {};
|
|
17239
|
+
var formattypeGroupingButtonsData = {};
|
|
17281
17240
|
var weekdaysData = [];
|
|
17282
17241
|
while (day_counter < 7) {
|
|
17283
17242
|
var day = self.config.day_sequence[day_counter];
|
|
@@ -17288,68 +17247,79 @@ Crouton.prototype.render = function(doMeetingMap = false) {
|
|
|
17288
17247
|
});
|
|
17289
17248
|
|
|
17290
17249
|
byDayData.push({
|
|
17291
|
-
"hide": self.config["hide_byday_headers"],
|
|
17292
17250
|
"day": self.localization.getDayOfTheWeekWord(day),
|
|
17293
17251
|
"meetings": daysOfTheWeekMeetings
|
|
17294
17252
|
});
|
|
17295
17253
|
|
|
17296
|
-
for (var f = 0; f < self.config.
|
|
17297
|
-
var groupByName = self.config.
|
|
17254
|
+
for (var f = 0; f < self.config.grouping_buttons.length; f++) {
|
|
17255
|
+
var groupByName = self.config.grouping_buttons[f]['field'];
|
|
17298
17256
|
if (groupByName.startsWith('distance')) continue;
|
|
17299
17257
|
var groupByData = getUniqueValuesOfKey(daysOfTheWeekMeetings, groupByName).sort();
|
|
17300
17258
|
for (var i = 0; i < groupByData.length; i++) {
|
|
17301
17259
|
var groupByMeetings = daysOfTheWeekMeetings.filterByObjectKeyValue(groupByName, groupByData[i]);
|
|
17302
|
-
if (
|
|
17303
|
-
|
|
17304
|
-
} else if (
|
|
17305
|
-
|
|
17260
|
+
if (groupingButtonsData.hasOwnProperty(groupByName) && groupingButtonsData[groupByName].hasOwnProperty(groupByData[i])) {
|
|
17261
|
+
groupingButtonsData[groupByName][groupByData[i]] = groupingButtonsData[groupByName][groupByData[i]].concat(groupByMeetings);
|
|
17262
|
+
} else if (groupingButtonsData.hasOwnProperty(groupByName)) {
|
|
17263
|
+
groupingButtonsData[groupByName][groupByData[i]] = groupByMeetings;
|
|
17306
17264
|
} else {
|
|
17307
|
-
|
|
17308
|
-
|
|
17265
|
+
groupingButtonsData[groupByName] = {};
|
|
17266
|
+
groupingButtonsData[groupByName][groupByData[i]] = groupByMeetings;
|
|
17309
17267
|
}
|
|
17310
17268
|
|
|
17311
17269
|
}
|
|
17312
17270
|
}
|
|
17313
17271
|
|
|
17314
|
-
for (var f = 0; f < self.config.
|
|
17315
|
-
|
|
17272
|
+
for (var f = 0; f < self.config.formattype_grouping_buttons.length; f++) {
|
|
17273
|
+
const groupByName = self.config.formattype_grouping_buttons[f]['field'];
|
|
17274
|
+
const accordionState = self.config.formattype_grouping_buttons[f].hasOwnProperty('accordionState')
|
|
17275
|
+
? self.config.grouping_buttons[b]['accordionState'] : '';
|
|
17316
17276
|
var groupByData = getUniqueFormatsOfType(daysOfTheWeekMeetings, groupByName);
|
|
17317
17277
|
if (groupByName=='LANG' && self.config.native_lang && self.config.native_lang.length > 0) {
|
|
17318
17278
|
groupByData = groupByData.filter((f) => f.key != self.config.native_lang);
|
|
17319
17279
|
}
|
|
17320
17280
|
for (var i = 0; i < groupByData.length; i++) {
|
|
17321
17281
|
var groupByMeetings = daysOfTheWeekMeetings.filter((item) => item.formats_expanded.map(f => f.key).indexOf(groupByData[i].key) >= 0);
|
|
17322
|
-
if (
|
|
17323
|
-
|
|
17324
|
-
} else if (
|
|
17325
|
-
|
|
17282
|
+
if (formattypeGroupingButtonsData.hasOwnProperty(groupByName) && formattypeGroupingButtonsData[groupByName].hasOwnProperty(groupByData[i].description)) {
|
|
17283
|
+
formattypeGroupingButtonsData[groupByName][groupByData[i].description].group = formattypeGroupingButtonsData[groupByName][groupByData[i].description].group.concat(groupByMeetings);
|
|
17284
|
+
} else if (formattypeGroupingButtonsData.hasOwnProperty(groupByName)) {
|
|
17285
|
+
formattypeGroupingButtonsData[groupByName][groupByData[i].description] = {};
|
|
17286
|
+
formattypeGroupingButtonsData[groupByName][groupByData[i].description].accordionState = accordionState;
|
|
17287
|
+
formattypeGroupingButtonsData[groupByName][groupByData[i].description].group = groupByMeetings;
|
|
17326
17288
|
} else {
|
|
17327
|
-
|
|
17328
|
-
|
|
17289
|
+
formattypeGroupingButtonsData[groupByName] = {};
|
|
17290
|
+
formattypeGroupingButtonsData[groupByName][groupByData[i].description] = {};
|
|
17291
|
+
formattypeGroupingButtonsData[groupByName][groupByData[i].description].accordionState = accordionState;
|
|
17292
|
+
formattypeGroupingButtonsData[groupByName][groupByData[i].description].group = groupByMeetings;
|
|
17329
17293
|
}
|
|
17330
17294
|
}
|
|
17331
17295
|
}
|
|
17332
17296
|
day_counter++;
|
|
17333
17297
|
}
|
|
17334
17298
|
|
|
17335
|
-
var
|
|
17336
|
-
for (var b = 0; b < self.config.
|
|
17337
|
-
|
|
17338
|
-
|
|
17299
|
+
var groupingButtonsDataSorted = {};
|
|
17300
|
+
for (var b = 0; b < self.config.grouping_buttons.length; b++) {
|
|
17301
|
+
const groupByName = self.config.grouping_buttons[b]['field'];
|
|
17302
|
+
const accordionState = self.config.grouping_buttons[b].hasOwnProperty('accordionState')
|
|
17303
|
+
? self.config.grouping_buttons[b]['accordionState'] : '';
|
|
17304
|
+
groupingButtonsDataSorted[groupByName] = {};
|
|
17339
17305
|
if (groupByName.startsWith('distance')) {
|
|
17340
|
-
|
|
17306
|
+
groupingButtonsDataSorted[groupByName]['Sorted by Distance'] = {};
|
|
17307
|
+
groupingButtonsDataSorted[groupByName]['Sorted by Distance'].group = [...self.meetingData].sort((a,b) => a['distance_in_km'] - b['distance_in_km']);
|
|
17308
|
+
groupingButtonsDataSorted[groupByName]['Sorted by Distance'].accordionState = 'non-collapsable';
|
|
17341
17309
|
continue;
|
|
17342
17310
|
}
|
|
17343
17311
|
var sortKey = [];
|
|
17344
17312
|
|
|
17345
|
-
for (var
|
|
17346
|
-
sortKey.push(
|
|
17313
|
+
for (var groupingButtonsDataItem in groupingButtonsData[groupByName]) {
|
|
17314
|
+
sortKey.push(groupingButtonsDataItem);
|
|
17347
17315
|
}
|
|
17348
17316
|
|
|
17349
17317
|
sortKey.sort();
|
|
17350
17318
|
|
|
17351
17319
|
for (var s = 0; s < sortKey.length; s++) {
|
|
17352
|
-
|
|
17320
|
+
groupingButtonsDataSorted[groupByName][sortKey[s]] = {};
|
|
17321
|
+
groupingButtonsDataSorted[groupByName][sortKey[s]].group = groupingButtonsData[groupByName][sortKey[s]];
|
|
17322
|
+
groupingButtonsDataSorted[groupByName][sortKey[s]].accordionState = accordionState;
|
|
17353
17323
|
}
|
|
17354
17324
|
}
|
|
17355
17325
|
|
|
@@ -17424,8 +17394,8 @@ Crouton.prototype.render = function(doMeetingMap = false) {
|
|
|
17424
17394
|
"config": self.config,
|
|
17425
17395
|
"meetings": {
|
|
17426
17396
|
"weekdays": weekdaysData,
|
|
17427
|
-
"
|
|
17428
|
-
"
|
|
17397
|
+
"groupingButtons": groupingButtonsDataSorted,
|
|
17398
|
+
"formattypeGroupingButtons": formattypeGroupingButtonsData,
|
|
17429
17399
|
"bydays": byDayData,
|
|
17430
17400
|
"meetingCount": self.meetingData.length,
|
|
17431
17401
|
"meetingData": self.meetingData
|
|
@@ -17478,19 +17448,22 @@ Crouton.prototype.render = function(doMeetingMap = false) {
|
|
|
17478
17448
|
});
|
|
17479
17449
|
|
|
17480
17450
|
jQuery('.filter-dropdown').on('select2:select', function (e) {
|
|
17481
|
-
self.
|
|
17451
|
+
self.filterMeetingsFromView();
|
|
17482
17452
|
});
|
|
17483
17453
|
|
|
17484
17454
|
jQuery("#day").on('click', function () {
|
|
17485
17455
|
self.showView('day');
|
|
17486
17456
|
});
|
|
17487
17457
|
|
|
17488
|
-
jQuery(".
|
|
17458
|
+
jQuery(".groupingButtonLogic").on('click', function (e) {
|
|
17489
17459
|
self.showView(e.target.attributes['data-field'].value.toLowerCase());
|
|
17490
17460
|
});
|
|
17491
|
-
jQuery('#
|
|
17461
|
+
jQuery('#groupingButton_embeddedMapPage').on('click', function (e) {
|
|
17492
17462
|
self.showView('map')
|
|
17493
17463
|
});
|
|
17464
|
+
jQuery('.meeting-group:not(.non-collapsable) .group-header').on('click', function(e) {
|
|
17465
|
+
jQuery(e.target.parentElement).toggleClass('closed');
|
|
17466
|
+
})
|
|
17494
17467
|
/****
|
|
17495
17468
|
jQuery('.custom-ul').on('click', 'a', function (event) {
|
|
17496
17469
|
jQuery('.bmlt-page').each(function (index) {
|
|
@@ -17527,7 +17500,7 @@ Crouton.prototype.render = function(doMeetingMap = false) {
|
|
|
17527
17500
|
}
|
|
17528
17501
|
if (self.config['map_page'] && !doMeetingMap) {
|
|
17529
17502
|
if (self.meetingData.filter(m => m.venue_type != 2).length==0) {
|
|
17530
|
-
jQuery('#
|
|
17503
|
+
jQuery('#groupingButton_embeddedMapPage').addClass('hide');
|
|
17531
17504
|
}
|
|
17532
17505
|
else croutonMap.initialize('byfield_embeddedMapPage', self.meetingData);
|
|
17533
17506
|
}
|
|
@@ -17850,7 +17823,7 @@ Crouton.prototype.simulateFilterDropdown = function() {
|
|
|
17850
17823
|
jQuery('.bmlt-page:not(#byfield_embeddedMapPage)').each(function () {
|
|
17851
17824
|
self.hidePage(this);
|
|
17852
17825
|
});
|
|
17853
|
-
self.
|
|
17826
|
+
self.filterMeetingsFromView();
|
|
17854
17827
|
}
|
|
17855
17828
|
Crouton.prototype.getAdjustedDateTime = function(meeting_day, meeting_time, meeting_time_zone) {
|
|
17856
17829
|
var timeZoneAware = this.config['auto_tz_adjust'] === true || this.config['auto_tz_adjust'] === "true";
|