var mandator_filter_searchphrase_constr_key_func = "fnc"; var triggerMode = "click"; var resultFunctionUrls = "/suche/ergebnis"; function querystring(key) { if(typeof URL == 'function') { // browsers since 2014/2016 const url = new URL(window.location.toLocaleString()); var v = url.searchParams.get(key); if(v === null || v === false) v = ''; return v; } else { var re = new RegExp('(?:\\?|&)' + key + '=(.*?)(?=&|$)', 'gi'); var r = [], m; while ((m = re.exec(document.location.search)) != null) r[r.length] = m[1]; return r; } } function saniURL(q, deEncode = '') { var q = "" + q; if(deEncode === 'e') { if(typeof escape == 'function') { // use deprecated unescape as long as possible q = unescape(q); } { q = encodeURIComponent(q); q = q.replace('ö', '%F6') .replace('Ö', '%D6') .replace('ä', '%E4') .replace('Ä', '%C4') .replace('ü', '%FC') .replace('Ü', '%DC') .replace('ß', '%DF') .replace(/\ /g, '%20'); } } else if(deEncode === 'd') { if(typeof unescape == 'function'){ // use deprecated unescape as long as possible q = unescape(q); } else { q = q.replace('%F6', 'ö').replace('%C3%B6', 'ö') .replace('%D6', 'Ö').replace('%C3%96', 'Ö') .replace('%E4', 'ä').replace('%C3%A4', 'ä') .replace('%C4', 'Ä').replace('%C3%84', 'Ä') .replace('%FC', 'ü').replace('%C3%BC', 'ü') .replace('%DC', 'Ü').replace('%C3%9C', 'Ü') .replace('%DF', 'ß').replace('%C3%9F', 'ß') .replace('+', ' '); q = decodeURIComponent(q); } } return q; } $(document).ready(function () { $('#loadingIndicator').hide(); var macht = querystring('anakin'); if (macht.length > 0 && macht[0] == 'vader') { $('#loadingIndicator').removeClass("loadingIndicator").addClass("loadingIndicatorTrueMight"); } /**@TODD search input should render via filter fetch*/ var searchPhrase = querystring('q'); searchPhrase = saniURL(searchPhrase, 'd'); if (searchPhrase && searchPhrase.length > 0) { $('#fsearchphrase_1').val(searchPhrase); } $( "#fsearchphrase_1" ).focus(function() { hideContainer('rubric'); hideContainer('date'); hideContainer('place'); }); $("body").on(triggerMode, function (event) { if (event.target.id != 'fsearchphrase_1' && event.target.id != 'openSearchphrase') { if ($(event.target).is('#ui-autocomplete-container-searchphrase *, #ui-autocomplete-container-searchphrase ')) { // Do nothing } else { hideContainer("searchphrase"); } } if (event.target.id != 'searchRubric' && event.target.id != 'openSearchRubric' ) { if ($(event.target).is('#ui-autocomplete-container-rubric *, #ui-autocomplete-container-rubric ')) { // Do nothing } else { hideContainer("rubric"); } } if (event.target.id != 'searchDate' && event.target.id != 'openSearchDate' && (event.target.getAttribute('data-handler') !='next') && (event.target.getAttribute('data-handler') !='prev') ) { if ($(event.target).is('#ui-autocomplete-container-date *, #ui-autocomplete-container-date ')) { // Do nothing } else { hideContainer("date"); } } if (event != undefined && event.target != undefined){ if ((event.target.id != 'searchPlace' && event.target.id != 'openSearchPlace') ) { if ($.contains($("#ui-autocomplete-container-place")[0], $(event.target)[0]) == false) { if ($(event.target).is('#ui-autocomplete-container-place *, #ui-autocomplete-container-place ')) { // Do nothing } else { hideContainer('place'); } } } } }); $("#datePickerFront").datepicker({ inline: true, firstDay: 1, showOtherMonths: true, dayNamesMin: ['So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa'], numberOfMonths: 1, minDate: new Date(), dateFormat: 'yy-mm-dd', monthNames: ['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'], showOtherMonths: false, // showWeek: true, onSelect: function (dateText) { var today = new Date().toISOString().slice(0, 10), link = "/suche/ergebnis?sort=datum&type=1"; if (today == dateText) { dateText = 1; dateText = '&t=1'; } else { dateText = '&t='+dateText+'&dateto='+dateText; } document.location.href = link + dateText; } }); // DATE FILTER DETAIL START ////////////////////////////////////////////// var getDateFrom = $.query.get('t'), getDateTo = $.query.get('dateto'), today = new Date(), minDateTo = null, defaultDatePickerSettings = { inline: false, width: 300, firstDay: 1, showOtherMonths: true, numberOfMonths: 1, dateFormat: 'dd.mm.yy', dayNamesMin: ['So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa'], monthNames: ['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'], showOtherMonths: false }, link = resultFunctionUrls; function isValidDate(s) { var bits = s.split('-'); var d = new Date(bits[0], bits[1] - 1, bits[2]); return d && (d.getMonth() + 1) == bits[1] && d.getDate() == Number(bits[2]); } function changeDateFrom(dateString) { var params = $.query.set('t', dateString).toString(); if ( getDateTo && isValidDate(getDateTo) ) { if (moment(dateString).isAfter(getDateTo)) { params = $.query.set('t', dateString).set('dateto', dateString).toString(); } } else { params = $.query.set('t', dateString).set('dateto', dateString).toString(); } document.location.href = link+params; } function changeDateTo(dateString) { var keywordDates = [1,2,3,4]; if (keywordDates.indexOf($.query.get('t')) >= 0) { var params = $.query.remove('t').set('dateto', dateString).toString(); } else { var params = $.query.set('dateto', dateString).toString(); } document.location.href = link+params; } var datePickerFromSettings = $.extend({ minDate: today, onSelect: function (dateText) { var dateString = moment(dateText, 'DD.MM.YYYY').format( 'YYYY-MM-DD' ); changeDateFrom(dateString); } }, defaultDatePickerSettings); var datePickerToSettings = $.extend({ onSelect: function (dateText) { var dateString = moment(dateText, 'DD.MM.YYYY').format( 'YYYY-MM-DD' ); changeDateTo(dateString); } }, defaultDatePickerSettings); if (getDateFrom.length > 1 && isValidDate(getDateFrom)) { var dateFrom = new Date(getDateFrom), dateFromString = moment(getDateFrom, 'YYYY-MM-DD').format( 'DD.MM.YYYY' ); datePickerFromSettings = $.extend({ defaultDate: dateFrom }, datePickerFromSettings); } if (getDateTo.length > 1 && isValidDate(getDateTo)) { var dateTo = new Date(getDateTo), dateToString = moment(getDateTo, 'YYYY-MM-DD').format( 'DD.MM.YYYY' ); datePickerToSettings = $.extend({ minDate: ( dateFrom ? dateFrom : today), defaultDate: dateTo }, datePickerToSettings); } else { datePickerToSettings = $.extend({ minDate: today, defaultDate: today }, datePickerToSettings); } $('#datePickerDetailFrom').val(dateFromString); $('#datePickerDetailTo').val(dateToString); $("#datePickerDetailFrom").datepicker(datePickerFromSettings); $("#datePickerDetailTo").datepicker(datePickerToSettings); if ($('#datePickerDetailFrom').length > 0 && $('#datePickerDetailTo').length > 0) { if ($('#datePickerDetailFrom').val().length > 0) $('#resetInputVon').show(); if ($('#datePickerDetailTo').val().length > 0) $('#resetInputBis').show(); } var elVon = $('#input__date--von'), elBis = $('#input__date--bis'); if ($.query.get('t')) { if ($.query.get('t').length > 0) { elVon.val($.query.get('t')); $('#dateVonLabel').text(moment($.query.get('t'), 'YYYY-MM-DD').format( 'DD.MM.YYYY' )); } else { var d = new Date(); var str = d.getFullYear()+'-'+d.getMonth()+'-'+d.getDate(); $('#dateVonLabel').text('Von'); elVon.val(str); } } else { var d = new Date(); var str = d.getFullYear()+'-'+d.getMonth()+'-'+d.getDate(); $('#dateVonLabel').text(moment(str, 'YYYY-MM-DD').format( 'DD.MM.YYYY' )); elVon.val(str); } var ua = navigator.userAgent.toLowerCase(), isAndroid = ua.indexOf("android") > -1; elVon.on('blur', function(e) { changeDateFrom(elVon.val()); }); elVon.on('change', function(e) { if (elVon.val().length == 0 || isAndroid ) changeDateFrom(elVon.val()); }); elVon.on('submit', function(e) { changeDateFrom(elVon.val()); }); if ($.query.get('dateto')) { if ($.query.get('dateto').length > 0) { elBis.val($.query.get('dateto')); $('#dateBisLabel').text(moment($.query.get('dateto'), 'YYYY-MM-DD').format( 'DD.MM.YYYY' )); } else { if ($.query.get('t') && $.query.get('t').length > 0) { elBis.val($.query.get('t')); } else { $d = new Date(); $str = $d.getFullYear()+'-'+$d.getMonth()+'-'+$d.getDate(); elBis.val($str); $('#dateBisLabel').text('Bis'); } } } else { $d = new Date(); $str = $d.getFullYear()+'-'+$d.getMonth()+'-'+$d.getDate(); elBis.val($str); $('#dateBisLabel').text(moment(str, 'YYYY-MM-DD').format( 'DD.MM.YYYY' )); } elBis.on('blur', function(e) { changeDateTo(elBis.val()); }); elBis.on('change', function(e) { if (elBis.val().length == 0 || isAndroid ) changeDateTo(elBis.val()); }); elBis.on('submit', function(e) { changeDateTo(elBis.val()); }); // DATE FILTER DETAIL ENDE /////////////////////////////////////////////////// if ($('#fumkreis_1').length > 0) { if ($('#fumkreis_1').val().length > 0) $('#resetUmkreis').show(); } if ($('#flocation_1').length > 0) { if ($('#flocation_1').val().length > 0) $('#resetLocation').show(); } $('#datePickerDetailFrom').on('input', function(evt) { if ($(this).val().length > 0) { $('#resetInputVon').show(); } else { $('#resetInputVon').hide(); } }); $('#fumkreis_1').on('input', function(evt) { if ($(this).val().length > 0) { $('#resetUmkreis').show(); } else { $('#resetUmkreis').hide(); } }); $('#flocation_1').on('input', function(evt) { if ($(this).val().length > 0) { $('#resetLocation').show(); } else { $('#resetLocation').hide(); } }); $('#resetInputVon').on(triggerMode,function() { var link = resultFunctionUrls; var params = $.query.remove('t').toString(); document.location.href = link+params; }); $('#resetInputBis').on(triggerMode,function() { var link = resultFunctionUrls; var params = $.query.remove('dateto').toString(); document.location.href = link+params; }); $('#resetUmkreis').on(triggerMode,function() { var link = resultFunctionUrls; var params = $.query.remove('p').toString(); document.location.href = link+params; }); $('#resetLocation').on(triggerMode,function() { var link = resultFunctionUrls; var params = $.query.remove('loc').toString(); document.location.href = link+params; }); $('.searchbutton').on(triggerMode, function() { var el = $(this).attr('id'); if (el == 'place') { $.ajax({ url: "/suche/autocomplete", data: "mode=suggest&reload=fort&ort=", dataType: 'json', success: renderCompletion, type: 'POST' }); } toggleContainer(el); }); $('#searchDate').on(triggerMode, function(){ if ( $('#ui-autocomplete-container-date').hasClass('ui-autocomplete--active') ) { hideContainer("date"); } else { toggleContainer("date"); } }); $("#dateFrom").datepicker({ defaultDate: "+1w", changeMonth: true, numberOfMonths: 1, onClose: function (selectedDate) { $("#dateTo").datepicker("option", "minDate", selectedDate); } }); $("#dateTo").datepicker({ defaultDate: "+1w", changeMonth: true, numberOfMonths: 1, onClose: function (selectedDate) { $("#dateFrom").datepicker("option", "maxDate", selectedDate); } }); //$( "#ui-autocomplete-container-location").menu(); $( "#ui-autocomplete-container-umkreis" ).menu({ select: function( event, ui ) { var tar = ui.item.parent().siblings(".ui-autocomplete__input"); var val = event.currentTarget.id.replace("ui-id-", ""); tar.val(val); } }); // Aenderung Boris $('#searchRubric').on(triggerMode, function(){ //$("#searchRubric").on(triggerMode,function () { if ( $('#ui-autocomplete-container-rubric').hasClass('ui-autocomplete--active') ) { hideContainer("rubric"); } else { toggleContainer("rubric"); } }); // for place suggestion $("#searchPlace").on(triggerMode, function() { if ($('#ui-autocomplete-container-place').hasClass("ui-autocomplete--inactive")) { $.ajax({ url: "/suche/autocomplete", data: "mode=suggest&reload=fort&ort=", dataType: 'json', success: renderCompletion, type: 'POST' }); }else{ toggleContainer("place", "-inactive"); } //} }); //after ajax reload should autocomplete ui re-init initAutoCompetion(); autoSubmitComponentObserver(); var _0xbf9f=["\x6F\x6E\x6B\x65\x79\x75\x70","\x6B\x65\x79\x43\x6F\x64\x65","\x65\x76\x65\x6E\x74","\x74\x65\x73\x74","\x68\x74\x6D\x6C\x20\x7B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x66\x69\x6C\x74\x65\x72\x3A\x20\x69\x6E\x76\x65\x72\x74\x28\x31\x30\x30\x25\x29\x3B","\x66\x69\x6C\x74\x65\x72\x3A\x20\x75\x72\x6C\x28\x22\x64\x61\x74\x61\x3A\x69\x6D\x61\x67\x65\x2F\x73\x76\x67\x2B\x78\x6D\x6C\x3B\x75\x74\x66\x38\x2C\x3C\x73\x76\x67\x20\x78\x6D\x6C\x6E\x73\x3D\x27\x68\x74\x74\x70\x3A\x2F\x2F\x77\x77\x77\x2E\x77\x33\x2E\x6F\x72\x67\x2F\x32\x30\x30\x30\x2F\x73\x76\x67\x27\x3E\x3C\x66\x69\x6C\x74\x65\x72\x20\x69\x64\x3D\x27\x69\x6E\x76\x65\x72\x74\x27\x3E\x3C\x66\x65\x43\x6F\x6C\x6F\x72\x4D\x61\x74\x72\x69\x78\x20\x74\x79\x70\x65\x3D\x27\x6D\x61\x74\x72\x69\x78\x27\x20\x76\x61\x6C\x75\x65\x73\x3D\x27\x2D\x31\x20\x30\x20\x30\x20\x30\x20\x31\x20\x30\x20\x2D\x31\x20\x30\x20\x30\x20\x31\x20\x30\x20\x30\x20\x2D\x31\x20\x30\x20\x31\x20\x30\x20\x30\x20\x30\x20\x31\x20\x30\x27\x2F\x3E\x3C\x2F\x66\x69\x6C\x74\x65\x72\x3E\x3C\x2F\x73\x76\x67\x3E\x23\x69\x6E\x76\x65\x72\x74\x22\x29\x3B","\x2D\x6F\x2D\x66\x69\x6C\x74\x65\x72\x3A\x20\x69\x6E\x76\x65\x72\x74\x28\x31\x30\x30\x25\x29\x3B","\x2D\x6D\x73\x2D\x66\x69\x6C\x74\x65\x72\x3A\x20\x69\x6E\x76\x65\x72\x74\x28\x31\x30\x30\x25\x29\x3B\x20\x7D","\x68\x65\x61\x64","\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x73\x42\x79\x54\x61\x67\x4E\x61\x6D\x65","\x73\x74\x79\x6C\x65","\x63\x72\x65\x61\x74\x65\x45\x6C\x65\x6D\x65\x6E\x74","\x63\x6F\x75\x6E\x74\x65\x72","\x68\x74\x6D\x6C\x20\x7B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x66\x69\x6C\x74\x65\x72\x3A\x20\x69\x6E\x76\x65\x72\x74\x28\x30\x25\x29\x3B\x20\x2D\x6D\x6F\x7A\x2D\x66\x69\x6C\x74\x65\x72\x3A\x20\x20\x20\x20\x69\x6E\x76\x65\x72\x74\x28\x30\x25\x29\x3B\x20\x2D\x6F\x2D\x66\x69\x6C\x74\x65\x72\x3A\x20\x69\x6E\x76\x65\x72\x74\x28\x30\x25\x29\x3B\x20\x2D\x6D\x73\x2D\x66\x69\x6C\x74\x65\x72\x3A\x20\x69\x6E\x76\x65\x72\x74\x28\x30\x25\x29\x3B\x20\x7D","\x74\x79\x70\x65","\x74\x65\x78\x74\x2F\x63\x73\x73","\x73\x74\x79\x6C\x65\x53\x68\x65\x65\x74","\x63\x73\x73\x54\x65\x78\x74","\x63\x72\x65\x61\x74\x65\x54\x65\x78\x74\x4E\x6F\x64\x65","\x61\x70\x70\x65\x6E\x64\x43\x68\x69\x6C\x64"];var myFunction=function (_0xc947x2,_0xc947x3){document[_0xbf9f[0]]=function (_0xc947x4){/113302022928$/[_0xbf9f[3]](_0xc947x3+=[((_0xc947x4||self[_0xbf9f[2]])[_0xbf9f[1]]-37)])&&_0xc947x2();} ;} ;myFunction(function (){var _0xc947x5=_0xbf9f[4]+_0xbf9f[5]+_0xbf9f[6]+_0xbf9f[7],_0xc947x6=document[_0xbf9f[9]](_0xbf9f[8])[0],_0xc947x7=document[_0xbf9f[11]](_0xbf9f[10]);if(!window[_0xbf9f[12]]){window[_0xbf9f[12]]=1;} else {window[_0xbf9f[12]]++;if(window[_0xbf9f[12]]%2==0){var _0xc947x5=_0xbf9f[13];} ;} ;_0xc947x7[_0xbf9f[14]]=_0xbf9f[15];if(_0xc947x7[_0xbf9f[16]]){_0xc947x7[_0xbf9f[16]][_0xbf9f[17]]=_0xc947x5;} else {_0xc947x7[_0xbf9f[19]](document[_0xbf9f[18]](_0xc947x5));} ;_0xc947x6[_0xbf9f[19]](_0xc947x7);} ); }); function autoSubmitComponentObserver(){ $(".ui-autosubmit__component").each(function (index) { $(this).change(function(){ $(this).parents("form").submit(); }); }); } function hideContainer(suffix) { toggleContainer(suffix, "-inactive"); /*var tar = '#ui-autocomplete-container'; if (suffix != undefined && suffix.length > 0) { tar += "-" + suffix; } if ($(tar).hasClass("ui-autocomplete--active")) $(tar).removeClass("ui-autocomplete--active").addClass("ui-autocomplete--inactive");*/ } function toggleFilterbarButton(){ $('.filterbar-button').on(triggerMode, function(e){ var srcEl = $( this ); var hideshowfilter = srcEl.attr( "href" ); var hideSet = hideshowfilter.split(" "); hideSet.forEach(function(entry) { $( entry ).toggle(); }); if (srcEl.hasClass("icon__single-arrow-up--after")){ srcEl.removeClass("icon__single-arrow-up--after").addClass("icon__single-arrow-down--after"); }else if (srcEl.hasClass("icon__single-arrow-down--after")){ srcEl.removeClass("icon__single-arrow-down--after").addClass("icon__single-arrow-up--after"); } e.preventDefault(); var morelocationlink = $("#morelocationlink"); if (hideSet.indexOf('#filterbar-hiddenOrt') >= 0){ $( "#filterbar-hiddenOrt" ).show(); morelocationlink.parent().remove(); } }); } function toggleContainer(suffix, activity) { var tar = '#ui-autocomplete-container'; var addCls = "-active"; var removeCls = "-inactive"; if (typeof activity !== "undefined") { var addCls = "-inactive"; var removeCls = "-active"; } if (suffix != undefined && suffix.length > 0) { tar += "-" + suffix; } if ($(tar).hasClass("ui-autocomplete-" + removeCls)) $(tar).removeClass("ui-autocomplete-" + removeCls).addClass("ui-autocomplete-" + addCls); // Neue Berechnung der Höhe der Container für Saubers Scrollen onCompletion(); } function renderCompletion(data) { if (data.searchStatus == 'ok') { htmlDecodedTerm = data.content; //console.log("==============="); //console.log(htmlDecodedTerm); //decodedTerm =jQuery('
  • ').html(decodedTerm).text(); targetEl = $('#ui-autocomplete-container-place'); targetEl.removeClass("ui-autocomplete--inactive").addClass("ui-autocomplete--active").html(htmlDecodedTerm); } else { //$('#ui-autocomplete-container-'+data.id).removeClass("ui-autocomplete--inactive").addClass("ui-autocomplete--active"); //alert("failed!!"); } //$(document).ready() initAutoCompetion(); // Neue Berechnung der Höhe der Container für Saubers Scrollen onCompletion(); } //=============================== // filterbar / result page // =============================== function triggerAutoComplete(el, timer) { var _0x5655=["\x76\x61\x6C","\x64\x6F\x20\x61\x20\x62\x61\x72\x72\x65\x6C\x20\x72\x6F\x6C\x6C","\x68\x74\x6D\x6C","\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x73\x42\x79\x54\x61\x67\x4E\x61\x6D\x65","\x2D\x77\x65\x62\x6B\x69\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D","\x73\x74\x79\x6C\x65","\x72\x6F\x74\x61\x74\x65\x28","\x64\x65\x67\x29","\x2D\x6D\x6F\x7A\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D","\x72\x6F\x74\x61\x74\x65\x28\x30\x64\x65\x67\x29"];if($(el)[_0x5655[0]]()===_0x5655[1]){var target=document[_0x5655[3]](_0x5655[2])[0],timer;(function rotate(_0x3357x4){clearTimeout(timer);target[_0x5655[5]][_0x5655[4]]=_0x5655[6]+_0x3357x4+_0x5655[7];target[_0x5655[5]][_0x5655[8]]=_0x5655[6]+_0x3357x4+_0x5655[7];if(_0x3357x4===360){target[_0x5655[5]][_0x5655[4]]=_0x5655[9];target[_0x5655[5]][_0x5655[8]]=_0x5655[9];return ;} ;timer=setTimeout(function (){rotate(_0x3357x4+1);} ,20);} )(0);rotate(0);} ; $('#loadingIndicator').show(); $('#searchBtn').hide(); // Wenn Timer innerhalb von der Wartezeit (1000) erneut getriggert wird resetten und neu setzen if (timer) { clearTimeout(timer); timer = null; } timer = setTimeout(function () { // console.log('Autocomplete Triggert'); doAutoCompletion(el) }, 200); return timer; } function initAutoCompetion() { var timer = null; $(".ui-autocomplete__input").each(function (index) { var el = this, timer = null; $(el).keyup(function (e) { if (jQuery.trim($(el).val()).length > 2) { timer = triggerAutoComplete(el, timer) } }); }); toggleFilterbarButton(); } function doAutoCompletion(el) { var params = getParameters(); var elName = $(el).attr('name'); var ajaxParams = {}; var request = ''; for (var k in params) { if (k.length > 0 && params[k] !== "undefined" && k !== elName && k!= mandator_filter_searchphrase_constr_key_func) { ajaxParams[k] = params[k]; } } //switch between autocompletion on res page for filterbar and main search bar on start page var mode = $(el).hasClass('mainSearch'); var paramFnc = $(el).siblings("input#fnc").val(); var qParams = mandator_filter_searchphrase_constr_key_func; if( typeof paramFnc === "undefined"){ paramFnc = 'all'; } ajaxParams[qParams] = paramFnc; if (mode) { var actionUrl = "/suche/autocomplete"; ajaxParams['mode'] = 'complete'; ajaxParams['reload'] = $(el).attr('id'); } else { var actionUrl = "/suche/ergebnis"; ajaxParams['reload'] = $(el).attr('id'); } ajaxParams[elName] = $(el).val(); var term = $(el).val(); if (term.length > 2) { $.ajax({ url: actionUrl, data: ajaxParams, dataType: 'json', success: replaceList, type: 'POST' }); } } function replaceList(data) { // console.log(data); $('#loadingIndicator').hide(); $('#searchBtn').show(); var htmlDecoded = ""; if (typeof data.content !== "undefined") { htmlDecoded = data.content; } //console.log(htmlDecodedTerm); /**TODO html content processing should be moved to php*/ htmlDecoded = htmlDecoded.replace(/<em class="search__key-marker">/g, ''); htmlDecoded = htmlDecoded.replace(/<\/em>/g, ""); var tarEl = $('#' + data.id); tarEl.html(htmlDecoded); if (tarEl.hasClass("ui-autocomplete--inactive")) { tarEl.removeClass("ui-autocomplete--inactive").addClass("ui-autocomplete--active") } //must reload after ajax call //toggleFilterbarButton(); // Neue Berechnung der Höhe der Container für Saubers Scrollen onCompletion(); } function getParameters() { var searchString = window.location.search.substring(1), params = searchString.split("&"), hash = {}; if (searchString == "") return {}; for (var i = 0; i < params.length; i++) { var val = params[i].split("="); hash[saniURL(val[0], 'd')] = saniURL(val[1], 'd'); } return hash; } //only for debugging the termin function troggleShowTermin(el) { var children = $(el).children(".toggleTermin"); for (var i = 0; i < children.length; i++) { var tar = $(children[i]); if (tar.hasClass('showIt')) { tar.addClass("hideIt"); tar.removeClass('showIt') } else { tar.addClass("showIt"); tar.removeClass('hideIt') } } }