PageSourceSearch

https://jens-nacke.de/js/niedersachsen2022/custom.js

js jens-nacke.de collected 2026-10-02 20:47:59 UTC 16,762 bytes, 402 lines download raw bytes

1$(window).on('resize', function(){
2    var highestBox = 0;
3    var highestAll = 0;
4    $('.section--team-member-vita').each(function(){
5        if($(this).height() > highestBox) {
6          highestBox = $(this).height(); 
7        }
8    });  
9    $('.section--team-member-vita').height(highestBox);
10    highestAll = $('.section--team-member-image').width()+25;
11    $('.section--team-member-vita').height(highestBox);
12    var boxheight = highestAll+highestBox;
13    $('.element-item').height(boxheight);
14});
15
16$( document ).ready(function() {
17    var highestBox = 0;
18    var highestAll = 0;
19    $('.section--team-member-vita').each(function(){
20        if($(this).height() > highestBox) {
21          highestBox = $(this).height(); 
22        }
23    });
24    highestAll = $('.section--team-member-image').width()+25;
25    $('.section--team-member-vita').height(highestBox);
26    var boxheight = highestAll+highestBox;
27    $('.element-item').height(boxheight);
28    
29    var $grid = jQuery('.grid').isotope({
30      itemSelector: '.element-item',
31      percentPosition: true,
32      masonry: {
33        columnWidth: '.section--team-member'
34        }
35    });
36    var filterFns = {
37      numberGreaterThan50: function() {
38        var number = $(this).find('.number').text();
39        return parseInt( number, 10 ) > 50;
40      },
41      ium: function() {
42        var name = $(this).find('.name').text();
43        return name.match( /ium$/ );
44      }
45    };
46    $('.filters-button-group').on( 'click', 'button', function() {
47      var filterValue = $( this ).attr('data-filter');
48      filterValue = filterFns[ filterValue ] || filterValue;
49      $grid.isotope({ filter: filterValue });
50    });
51    $('.button-group').each( function( i, buttonGroup ) {
52      var $buttonGroup = $( buttonGroup );
53      $buttonGroup.on( 'click', 'button', function() {
54        $buttonGroup.find('.is-checked').removeClass('is-checked');
55        $( this ).addClass('is-checked');
56      });
57    });
58    
59    // init Isotope
60    var $terminegrid = $('.termine_grid').isotope({
61      // options
62    });
63    // filter items on button click
64    $('.filter-button-termine').on( 'click', 'button', function() {
65      var filterValue = $(this).attr('data-filter');
66      $terminegrid.isotope({ filter: filterValue });
67    });
68});
69
70$(document).ready(function(){
71    var highestBox = 0;
72    var highestvideo = 0;
73    $('.section--team-member-vita').each(function(){
74        if($(this).height() > highestBox) {
75          highestBox = $(this).height(); 
76        }
77    });
78    $('.mediathek_video_titel').each(function(){
79        if($(this).height() > highestvideo) {
80          highestvideo = $(this).height(); 
81        }
82    });
83    $('.section--team-member-vita').height(highestBox);
84    $('.mediathek_video_titel').height(highestvideo);
85});
86
87$(document).ready(function() {  
88    $(".uniform").on("submit", function(e){
89        e.preventDefault();
90        var $form = $(this);
91        
92        var ismr   = $form.attr('ismr');
93        var fcheck = $('#fcheck'+ismr).val();
94        var fc     = $form.find("input[name='frc-captcha-solution']").val();
95        var dsgvo  = $form.find("input[name='dsgvo" + ismr + "']:checked").val();
96        
97        var zp     = '0';
98        var zp1    = '';
99        var zp2    = '';
100        var zp3    = '';
101        var zp4    = '';
102        var zp5    = '';
103        if ($('#zp_'+ismr).length) {
104            zp     = $('#zp_'+ismr).val();
105            if (zp > 0) { zp1 = $form.find("input[name='zusatz-" + ismr + "-0']").val(); }
106            if (zp > 1) { zp2 = $form.find("input[name='zusatz-" + ismr + "-1']").val(); }
107            if (zp > 2) { zp3 = $form.find("input[name='zusatz-" + ismr + "-2']").val(); }
108            if (zp > 3) { zp4 = $form.find("input[name='zusatz-" + ismr + "-3']").val(); }
109            if (zp > 4) { zp5 = $form.find("input[name='zusatz-" + ismr + "-4']").val(); }
110        }
111        /*
112        if (grecaptcha.getResponse() == '') {
113            alert('Bitte aktivieren Sie das reCAPTCHA. Danke!');
114            return true;
115        } else {
116        */
117            if (dsgvo=='1') {
118                /* LESE DATEN */
119                var sendstring = '';
120                var fie = fcheck.split('|fs|');
121                var fie2;
122                //var gr  = grecaptcha.getResponse();
123                fie.forEach(function(item, index, array) {
124                    if (item!='') {
125                        fie2 = item.split(':');
126                        if (index==fie2[0]) {
127                            switch (fie2[1]) {
128                                case "i" : sendstring += $form.find('#showform_input'+fie2[0]).val() + '~||~'; break;  
129                                case "c" : sendstring += $form.find('input[name="checkbox-' + fie2[0] + '"]:checked').val() + '~||~'; break; 
130                                case "r" : sendstring += $form.find('input[name="radio-' 
130+ fie2[0] + '"]:checked').val() + '~||~'; break;
131                                case "t" : sendstring += $form.find('#textarea-'+fie2[0]).val() + '~||~'; break;
132                                case "s" : sendstring += $form.find('#select-'+fie2[0]+' option:selected').val() + '~||~'; break;
133                                case "o" : sendstring = sendstring + '~||~'; break;
134                                case "p" : sendstring = sendstring + '~||~'; break;
135                            }
136                        }
137                    }
138                });
139                sendstring = fcheck + '~|||~' + sendstring; 
140                var data = new FormData();
141                data.append("ismr", ismr);
142                data.append("fcheck", fcheck);
143                data.append("fc", fc);
144                data.append("data", sendstring);
145                data.append("dsgvo", dsgvo);
146                
147                data.append("zp", zp);
148                data.append("zp1", zp1);
149                data.append("zp2", zp2);
150                data.append("zp3", zp3);
151                data.append("zp4", zp4);
152                data.append("zp5", zp5);
153            
154                $.ajax({
155                    type: 'POST',
156                    url: "/functions/z_formular.php",
157                    data: data,
158                    cache: false,
159                    contentType: false,
160                    processData: false					
161                }).done(function(msg) {
162                    if (msg=="1") {
163                        $("#uniform-"+ismr).html('<h1>Ihre Eingabe wurde <strong>erfolgreich</strong> &uuml;bermittelt!<br>Vielen Dank!</h1>');
164                    } else {
165                        switch (msg) {
166                            case "0"    : $("#uniform-"+ismr).html('<h1>Ups, bei Ihrer Eingabe ist ein Fehler aufgetreten.</h1><h2>Derzeit k&ouml;nnen Ihre Daten nicht verarbeitet werden. Bitte warten Sie einen Moment und probieren Sie es zu einem sp&auml;teren Zeitpunkt erneut.<br><br>Gerne k&ouml;nnen Sie auch direkt mit uns <a href="/kontakt">Kontakt</a> aufnehmen. (Fehlercode:0)'); break;
167                            case "2"    : $("#uniform-"+ismr).html('<h1>Ups, bei Ihrer Eingabe ist ein Fehler aufgetreten.</h1><h2>Derzeit k&ouml;nnen Ihre Daten nicht verarbeitet werden. Bitte warten Sie einen Moment und probieren Sie es zu einem sp&auml;teren Zeitpunkt erneut.<br><br>Gerne k&ouml;nnen Sie auch direkt mit uns <a href="/kontakt">Kontakt</a> aufnehmen. (Fehlercode:2)'); break;
168                        }
169                    }
170                });
171            } else {
172                $("#showform_titel_dsgvo").html('<span color="#ff0000">Bitte bestätigen Sie die Einwilligungserklärung!</span>');
173            }
174        /*
175            return false;
176        }
177        */
178    });
179    
180    $(".pksuche").on("click", function(e){
181        e.preventDefault();
182        var pk        = $(this).attr('pk');
183        var bezirk    = $('#pbez'+pk).children( 'option:selected' ).val();
184        var wahlkreis = $('#pwk'+pk).children( 'option:selected' ).val();
185        
186        if ((bezirk=='0')&&(wahlkreis=='0')) {
187            $("#pbez"+pk).css("border", "4px dotted red");
188            $("#pwk"+pk).css("border", "4px dotted red");
189            return true;
190        } else {
191            $("#pbez"+pk).css("border", "none");
192            $("#pwk"+pk).css("border", "none");
193            var highestBox = 0;
194            var highestAll = 0;
195            var data = new FormData();
196            data.append("pk", pk);
197            data.append("bezirk", bezirk);
198            data.append("wahlkreis", wahlkreis);
199            
200            $.ajax({
201                type: 'POST',
202                url: "/functions/z_personenkreis.php",
203                data: data,
204                cache: false,
205                contentType: false,
206                processData: false					
207            }).done(function(msg) {
208                if (msg=="0") {
209                    $("#pk"+pk).html('<h1 style="width:100%">Ups, bei Ihrer Suche ist ein Fehler aufgetreten.</h1><br><br><h2>Derzeit k&ouml;nnen Ihre Daten nicht verarbeitet werden. Bitte warten Sie einen Moment und probieren Sie es zu einem sp&auml;teren Zeitpunkt erneut.<br><br>Gerne k&ouml;nnen Sie auch direkt mit uns <a href="/kontakt">Kontakt</a> aufnehmen.');
210                } else {
211                    if (msg=="1") {
212                        $("#pk"+pk).html('<h1 style="width:100%">Kein Ergebnis</h1><br><br><h2>Leider konnten zu Ihrer Suchabfrage kein Ergebnis gefunden werden. Bitte passen Sie Ihre Suche an.</h2>');
213                    } else {
214                        $("#pk"+pk).html(msg);
215                        $('.section--team-member-vita').each(function(){
216                            if($(this).height() > highestBox) {
217                              highestBox = $(this).height(); 
218                            }
219                        });  
220                        $('.section--team-member-vita').height(highestBox);
221                        highestAll = $('.section--team-member-image').width()+25;
222                        $('.section--team-member-vita').height(highestBox);
223                        var boxheight = highestAll+highestBox;
224                        $('.element-item').height(boxheight);
225                    }
226                }
227            });
228            return false;
229        }
230    });
231    
232    $(".pksucheall").on("click", function(e){
233        e.preventDefault();
234        var pk        = $(this).attr('pk');
235        var highestBox = 0;
236        var highestAll = 0;
237        var data = new FormData();
238        
239        $("#pbez"+pk).css("border", "none");
240        $("#pwk"+pk).css("border", "none");
241        data.append("pk", pk);
242        data.append("all", 1);
243            
244        $.ajax({
245            type: 'POST',
246            url: "/functions/z_personenkreis.php",
247            data: data,
248            cache: false,
249            contentType: false,
250            processData: false					
251        }).done(function(msg) {
252            if (msg=="0") {
253                $("#pk"+pk).html('<h1 style="width:100%">Ups, bei Ihrer Suche ist ein Fehler aufgetreten.</h1><br><br><h2>Derzeit k&ouml;nnen Ihre Daten nicht verarbeitet werden. Bitte warten Sie einen Moment und probieren Sie es zu einem sp&auml;teren Zeitpunkt erneut.<br><br>Gerne k&ouml;nnen Sie auch direkt mit uns <a href="/kontakt">Kontakt</a> aufnehmen.');
254            } else {
255                if (msg=="1") {
256                    $("#pk"+pk).html('<h1 style="width:100%">Kein Ergebnis</h1><br><br><h2>Leider konnten zu Ihrer Suchabfrage kein Ergebnis gefunden werden. Bitte passen Sie Ihre Suche an.</h2>');
257                } else {
258                    $("#pk"+pk).html(msg);
259                    $('.section--team-member-vita').each(function(){
260                        if($(this).height() > highestBox) {
261                          highestBox = $(this).height(); 
262                        }
263                    });  
264                    $('.section--team-member-vita').height(highestBox);
265                    highestAll = $('.section--team-member-image').width()+25;
266                    $('.section--team-member-vita').height(highestBox);
267                    var boxheight = highestAll+highestBox;
268                    $('.element-item').height(boxheight);
269                }
270            }
271        });
272        return false;
273    });
274});
275
276$( document ).ready(function() {
277    $(window).on('resize', function(){
278        $('.pro10box1').height($('.pro10box1').width()*1);
279        $('.pro10boxen_33 .pro10box1').height($('.pro10boxen_33 .pro10box1').width());
280        $('.pro10boxen_50 .pro10box1').height($('.pro10boxen_50 .pro10box1').width());
281        $('.pro10box2').height($('.pro10box2').width()*0.48);
282        $('.pro10box3').height($('.pro10box3').width());
283        $('.pro10box4').height($('.pro10box4').width());
284    });
285    
286    $('.pro10box1').height($('.pro10box1').width()*1);
287    $('.pro10boxen_33 .pro10box1').height($('.pro10boxen_33 .pro10box1').width());
288    $('.pro10boxen_50 .pro10box1').height($('.pro10boxen_50 .pro10box1').width());
289    $('.pro10box2').height($('.pro10box2').width()*0.48);
290    $('.pro10box3').height($('.pro10box3').width());
291    $('.pro10box4').height($('.pro10box4').width());
292});
293
294$( document ).ready(function() {
295    var videoLightbox = GLightbox({
296        selector: '.video-lightbox',
297        width: '1280px',
298        height: '720px',
299        closeOnOutsideClick: true,
300        type:'video',
301        autoplayVideos: false,
302        plyr: {
303            css: '/js/glightbox/dist/plyr/plyr.css',
304            js: '/js/glightbox/dist/plyr/plyr.js',
305            config: {
306                ratio: '16:9', // or '4:3'
307                muted: false,
308                hideControls: false,
309                autoplay: true,
310                autopause: true,
311                volume: 0.5,
312                controls: ['play-large', 'play','progress','volume','mute','fullscreen']        
313            }
314        }
315    });
316    
317    var audioLightbox = GLightbox({
318        selector: '.audio-lightbox',
319        width: '800px',
320        height: '60px',
321        closeOnOutsideClick: true,
322        type:'video',
323        closeButton: true,
324        touchNavigation: false,
325        plyr: {
326            css: '/js/glightbox/dist/plyr/plyr.css',
327            js: '/js/glightbox/dist/plyr/plyr.js',
328            config: {
329                ratio: '16:2', // or '4:3'
330                hideControls: false,
331                autoplay: true,
332                controls: ['play-large', 'play','progress','volume','mute']        
333            }
334        }
335    });
336});
337
338$( document ).ready(function() {
339    var $grid = $('.socialwall2').isotope();
340    $grid.imagesLoaded().progress( function() { $grid.isotope(); });
341    
342    $('.filter-button-group').on( 'click', 'button', function() {
343      var filterValue = $(this).attr('data-filter');
344      $grid.isotope({ filter: filterValue });
345    });
346    
347    var filters = [];
348    $('.sm-filters').on( 'click', '.button-all', function( event ) {
349      var $this = $(this);
350      var $buttonGroup = $this.parents('.button-group-all');
351      var filterGroup = $buttonGroup.attr('data-filter-group');
352      filters[ filterGroup ] = $this.attr('data-filter');
353      var filterValue = concatValues( filters );
354      $grid.isotope({ filter: filterValue });
355    });
356    
357    $('.button-group-all').each( function( i, buttonGroup ) {
358        var $buttonGroup = $( buttonGroup );
359        $buttonGroup.on( 'click', 'button', function( event ) {
360            $buttonGroup.find('.is-checked').removeClass('is-checked');
361            var $button = $( event.currentTarget );
362            $button.addClass('is-checked');
363        });
364    });
365    
366    function concatValues( obj ) {
367      var value = '';
368      for ( var prop in obj ) { value += obj[ prop ]; }
369      return value;
370    }
371    setTimeout(function(){ $('.socialwall2').isotope(); }, 3000);
372});
373
374document.addEventListener("DOMContentLoaded", function() {
375    var textContainers = document.querySelectorAll('.sm-post_message');
376
377    textContainers.forEach(function(container) {
378        var text = container.querySelector('.smtext');
379        var link = container.querySelector('.smweiter');
380
381        var fullHeight = text.scrollHeight;
382        fullHeight = 84;
383        text.style.display = '-webkit-box';
384        text.style.webkitBoxOrient = 'vertical';
385        text.style.webkitLineClamp = '5';
386
387        var clippedHeight = text.scrollHeight;
388        
389        if (fullHeight < clippedHeight) {
390            link.style.display = 'block';
391        }
392
393        link.addEventListener('click', function() {
394            text.style.display = 'block';
395            text.style.webkitBoxOrient = 'initial';
396            text.style.webkitLineClamp = 'initial';
397            text.style.maxHeight = 'none';
398            link.style.display = 'none';
399            $('.socialwall2').isotope();
400        });
401    });
402});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.