Fix widget-URL for subevents

This commit is contained in:
Martin Gross
2019-08-30 10:41:08 +02:00
parent f4b81aa032
commit be1a1f7995

View File

@@ -4,7 +4,7 @@ $(function () {
if ($("div[data-lazy-id]").length == 0) {
return;
}
$.getJSON("widgets.json", function (data) {
$.getJSON("widgets.json" + ($("select[name='subevent']").val() ? "?subevent=" + $("select[name='subevent']").val() : ""), function (data) {
$.each(data.widgets, function (k, v) {
$("[data-lazy-id=" + v.lazy + "]").removeClass("widget-lazy-loading");
$("[data-lazy-id=" + v.lazy + "] .widget").html(v.content);