* Update Suche (Suche wird nun auf aktive Kalender eingeschränkt)
This commit is contained in:
Daniel Spitzer
2024-11-11 07:33:23 +01:00
parent 9633d7e4ec
commit 8ab5f87109
2 changed files with 20 additions and 1 deletions
+15
View File
@@ -1328,6 +1328,21 @@ $(document).ready(function () {
language: "de",
ajax: {
url: requestEventSearchURL,
data: function (params) {
let checkbox = $(".calendar-check");
let visibleCalendars = [];
visibleCalendars.push(0);
checkbox.each(function () {
if ($(this).prop('checked')) {
visibleCalendars.push($(this).data('calendar_id'));
}
});
return {
q: params.term, // Der Suchbegriff
term: params.term, // Der Suchbegriff
calendars: visibleCalendars // Die dynamische Variable, die du hinzufügen möchtest
};
},
dataType: 'json',
delay: 250,
processResults: function (data) {