1/** 2 * Created by Estefan Huerta Barroso - Sign&Sinn on 31.03.16. 3 */ 4 5 6$(document).ready(function () { 7 8 $('.warnJS').remove(); 9 $('#da_new, #da_edit').css('display','block'); 10 11 $('#sidebar-wrapper-mobile li').click(function(event){ 12 13 event.stopPropagation(); 14 if(event.target.nodeName=='LI'){ 15 var $selektor=$(this).children('ul').first(); 16 17 if(!$selektor.is(':visible')){ 18 $selektor.slideDown("slow"); 19 $(this).removeClass('sisi-down').addClass('sisi-up'); 20 }else{ 21 22 $selektor.slideUp("slow"); 23 $(this).removeClass('sisi-up').addClass('sisi-down'); 24 } 25 } 26 }); 27 28 29 30 31 32 33 $("#sidebar-wrapper .sidebar-navi-sub-level2 .sisi-dropdown.sisi-up").each(function () { 34 35 $(this).children('ul').slideDown("slow"); 36 37 }); 38 39 $("#sidebar-wrapper .sidebar-navi-sub-level2 .sisi-dropdown").click(function (event) { 40 41 42 if(event.target.nodeName!='A') 43 chanceOpen($(this),$(this).children('ul')) 44 }); 45 $('.sisi-seminar-filter-mobile-str-link').click(function(){ 46 47 if($(this).hasClass('sisi-down')){ 48 $(this).closest('.sisi-seminar-filter').find('.sisi-seminar-form').slideDown("slow"); 49 $(this).removeClass('sisi-down').addClass('sisi-up'); 50 $(this).closest('.sisi-seminar-filter').next().removeClass('collapse').addClass('show'); 51 }else{ 52 $(this).closest('.sisi-seminar-filter').find('.sisi-seminar-form').slideUp("slow"); 53 $(this).removeClass('sisi-up').addClass('sisi-down'); 54 $(this).closest('.sisi-seminar-filter').next().addClass('collapse').removeClass('show'); 55 } 56 57 }); 58 59 $('.mobile-str-calender-link').click(function(){ 60 61 62 if($(this).hasClass('sisi-down')){ 63 $('.calender').slideDown("slow"); 64 $(this).removeClass('sisi-down').addClass('sisi-up'); 65 }else{ 66 $('.calender').slideUp("slow"); 67 $(this).removeClass('sisi-up').addClass('sisi-down'); 68 } 69 70 }); 71 72 73 74 $('.touchevents .sisi-navi-head').click(function () { 75 76 $(this).children('ul').show(); 77 }); 78 79 80 $('#navi-mobile').click(function () { 81 82 83 if ($(this).hasClass('navi-mobile-close')) { 84 85 $(this).removeClass('navi-mobile-close').addClass('navi-mobile-menue'); 86 } else 87 88 $(this).addClass('navi-mobile-close').removeClass('navi-mobile-menue'); 89 90 91 }); 92 93 $('#mobile-main-navi .mobile-navi-inner li').click(function (event) { 94 95 var $selektor = $(this).find('ul'); 96 $selektor.removeClass('sisi-str'); 97 98 $('.sisi-mobile-navi.sisi-str:visible').each(function(){ 99 $(this).slideUp("slow"); 100 $(this).parent().parent('li').addClass('sisi-down').removeClass('sisi-up'); 101 102 }); 103 104 105 106 if(event.target.nodeName=='LI'){ 107 108 if ($(this).hasClass('sisi-down')) { 109 110 $selektor.slideDown("slow").addClass('sisi-str');; 111 $(this).removeClass('sisi-down').addClass('sisi-up'); 112 } else if ($(this).hasClass('sisi-up')) { 113 114 $selektor.slideUp("slow").addClass('sisi-str'); 115 $(this).addClass('sisi-down').removeClass('sisi-up'); 116 117 118 119 } 120 } 121 122 }); 123 124 $('#navi-mobile').click(function () { 125 var $selektor = $('#mobile-main-navi'); 126 if ($selektor.hasClass('hidden')) { 127 $('#mobile-main-navi').removeClass('hidden'); 128 129 } else { 130 $('#mobile-main-navi').addClass('hidden'); 131 132 } 133 134 }); 135 136 137 var $sisiNewsCategories = $('.sisi-news-categorie'); 138 139 /** 140 * Hide options for Tag der Architektur 2017 Programm 141 */ 142 /*if($sisiNewsCategories.length && $('#page-213').length){ 143 var $categoryMenus = $('.nav-sidebar.category-menu-view'); 144 var $selectedOption = $categoryMenus.eq(0).find('option:selected'); 145 if($selectedOption.length && $selectedOption.index() != 2){ 146 $categoryMenus.eq(1).hide(); 147 } 148 }*/ 149 150 /** 151 * Select filters for category menus 152 */ 153 $sisiNewsCategories.change(function () { 154 // 157 Tag der Architektur Archiv 155 // 148 da! Archiv 156 // 263 Aktuelle Projekte da! 2018 157 // 726 Aktuelle Projekte da! 2024 158 // 817 Aktuelle Projekte da! 2026 159 if ($('#page-157').length || $('#page-148').length || $('#page-263').length || $('#page-726').length || $('#page-817').length) { 160 161 var value = $(this).val(); 162 var url = value.substring(0,value.indexOf('?')); 163 var categories = []; 164 $(this).closest('aside').find('select.sisi-news-categorie').each(function(){ 165 var value = $(this).val(); 166 if ($(this).prop('selectedIndex') == 0) { 167 return; 168 } 169 170 var query = value.substr(value.indexOf('?')+1); 171 var queryParams = query.split("&"); 172 for (var i = 0; i < queryParams.length; i++) { 173 var val = queryParams[i].split("="); 174 if (val[0].indexOf('categories')>0) { 175 categories.push(val[1]); 176 } 177 } 178 }); 179 window.location.href = url+'?no_cache=1&tx_news_pi1[overwriteDemand][categories]='+categories.join(','); 180 } 181 // Tag der Architektur 2017, 2018 Programm 182 else if($('#page-213').length || $('#page-271').length){ 183 var value = $(this).val(); 184 var url = value.substring(0,value.indexOf('?')); 185 var categories = []; 186 187 $(this).closest('aside').find('select.sisi-news-categorie').each(function(){ 188 189 var value = $(this).val(); 190 191 var $selected = $(this).find('option:selected'); 192 193 // skip first option - this is the category parent! 194 if($selected.index() != 0){ 195 var query = value.substr(value.indexOf('?')+1); 196 var queryParams = query.split("&"); 197 for (var i = 0; i < queryParams.length; i++) { 198 var val = queryParams[i].split("="); 199 if (val[0].indexOf('categories')>0) { 200 categories.push(val[1]); 201 } 202 } 203 } 204 205 }); 206 window.location.href = url+'?no_cache=1&tx_news_pi1[overwriteDemand][categories]='+categories.join(','); 207 } 208 else { 209 var value = $(this).val(); 210 window.location.href = value; 211 } 212 213 }); 214 215 $(window).bind("scroll resize", function (e) { 216 217 218 var position = $(window).scrollTop(); 219 220 if (position > 1) { 221 $('.sisi-navi-top-small').addClass('sisi-fixed'); 222 $('.sisi-nav-main').addClass('sisi-fixed'); 223 $('.logo-img').addClass('sisi-fixed'); 224 $('.sisi-header').addClass('sisi-fixed'); 225 226 } else { 227 if ($('.sisi-navi-top-small').hasClass('sisi-fixed')) { 228 $('.sisi-navi-top-small ').removeClass('sisi-fixed'); 229 } 230 231 if ($('.sisi-nav-main').hasClass('sisi-fixed')) { 232 $('.sisi-nav-main').removeClass('sisi-fixed'); 233 } 234 235 if ($('.logo-img').hasClass('sisi-fixed')) { 236 $('.logo-img').removeClass('sisi-fixed'); 237 } 238 239 if ($('.sisi-header').hasClass('sisi-fixed')) { 240 $('.sisi-header').removeClass('sisi-fixed'); 241 } 242 243 244 } 245 246 247 if (position > 168) { 248 $('#sisi-member-search-open').removeClass('hidden'); 249 } else { 250 $('#sisi-member-search-open').addClass('hidden'); 251 } 252 253 }); 254 255 256 257 258 259 $('.sisi-upload-trigger').click(function () { 260 261 $(this).parent().children('.sisi-upload').click(); 262 263 }); 264 265 266 $('.sisi-upload').change(function () { 267 268 var value = $(this).val(); 269 $(this).parent().children('.sisi-display').html(value); 270 271 }); 272 273 274 275 $('#membersearch').click(function () { 276 277 var $selektor = $('.sisi-member-form'); 278 279 if (!$selektor.hasClass('hidden')) { 280 if ($('.expert-search').length) { 281 $selektor.toggleClass('expert-search-preview'); 282 } 283 else { 284 $selektor.addClass('hidden'); 285 } 286 } else { 287 $selektor.removeClass('expert-search-preview'); 288 $selektor.removeClass('hidden'); 289 } 290 291 292 }); 293 294 295 $('#sisi-member-search-open').click(function () { 296 297 var $selektor = $('.sisi-member-form'); 298 $selektor.addClass('hidden'); 299 $('html,body').animate( 300 {scrollTop: 0}, 600, function () { 301 302 $selektor.removeClass('hidden'); 303 304 }); 305 }); 306 307
308 $searchWrapper = $('.sisi-members-search-wrapper'); 309 $areasWrapper = $searchWrapper.find('.form-group.areas'); 310 if($searchWrapper.length){ 311 312 $list = $($searchWrapper.find('select[name="tx_sisimembers_memberlist[member][liste]"]')); 313 314 //$areasWrapper.find('.area').wrap('<span>').hide(); 315 316 if($list.val() != 'K' && $list.val() != 'A' && $list.val() != '3'){ 317 318 var index = $(this).find('option:selected').data('area'); 319 $areasWrapper.find('span > .area').unwrap(); 320 $areasWrapper.find('.area').wrap('<span></span>').hide(); 321 $areasWrapper.find('.area-' + parseInt(index)).unwrap().show(); 322 $areasWrapper.show(); 323 324 } else { 325 $areasWrapper.hide(); 326 } 327 328 // URLSearchParams not supported in IE. 329 $.urlParam = function (name) { 330 var results = new RegExp('[\?&]' + encodeURI(name) + '=([^&#]*)') 331 .exec(window.location.search); 332 return (results !== null) ? results[1] || 0 : false; 333 } 334 335 $list.change(function () { 336 337 if($(this).val() != 'K' && $(this).val() != 'A' && $(this).val() != '3'){ 338 $areasWrapper.find('option[value="K"]').prop('selected', true); 339 340 var index = $(this).find('option:selected').data('area'); 341 $areasWrapper.find('span > .area').unwrap(); 342 $areasWrapper.find('.area').wrap('<span></span>').hide(); 343 $areasWrapper.find('.area-' + parseInt(index)).unwrap().show(); 344 345 //if ($.urlParam('tx_sisimembers_memberlist[member][liste]') && $.urlParam('tx_sisimembers_memberlist[member][liste]') != "") { 346 $areasWrapper.show(); 347 //} 348 349 350 // reset 351 $('.wrapper-fachrichtungen input').each(function () { 352 $(this).prop('checked', false); 353 }); 354 355 // reset 356 $('.wrapper-status input').each(function () { 357 $(this).prop('checked', false); 358 }); 359 360 if ($(this).val() == '1.') { 361 $(this).closest('form').find('#areas .sisi-headline-search').html('Bestellgebiete'); 362 } 363 else { 364 $(this).closest('form').find('#areas .sisi-headline-search').html('Fachgebiete'); 365 } 366 } else { 367 $areasWrapper.find('input').each(function(){ 368 $(this).prop('checked', false); 369 }); 370 371 if ($(this).val() != 'A') { 372 $areasWrapper.find('option[value="K"]').prop('selected', true); 373 } 374 else { 375 $areasWrapper.find('option:selected').prop('selected', false); 376 // reset 377 $('.wrapper-fachrichtungen input').each(function () { 378 $(this).prop('checked', false); 379 }); 380 381 // reset 382 $('.wrapper-status input').each(function () { 383 $(this).prop('checked', false); 384 }); 385 } 386 387 $areasWrapper.hide(); 388 } 389 }); 390 391 $areasWrapper.find('select').change(function () { 392 // reset 393 $('.wrapper-fachrichtungen input').each(function () { 394 $(this).prop('checked', false); 395 }); 396 397 // reset 398 $('.wrapper-status input').each(function () { 399 $(this).prop('checked', false); 400 }); 401 }); 402 403 } 404 405 406 407 $('.sisi-set').change(function () { 408 409 $('#sisi-S').prop('checked', false); 410 $('#sisi-A').prop('checked', false); 411 }); 412 413 414 $('.sisi-filter-entry').click(function () { 415 416 417 var uid = $(this).data('uid'); 418 var url = $('#sisi-ajax-url').data('url'); 419 420 421 $.ajax({ 422 url: url, 423 type: "POST", 424 data: {'tx_sisipinboard_pinboardfilter[uid]': uid}, 425 426 }).done(function (data) { 427 428 alert(data); 429 430 431 }).fail(function () { 432 //Irgendwas ist schief gelaufen, hier könnt ihr eine Meldung ausgeben 433 //Einfaches Beispiel: $('.irgendeineKlasse).html('Ein Fehler ist aufgetreten'); 434 435 }); 436 437 438 }); 439 440 jQuery('#logo-svg,#logo-svg2').each(function(){ 441 var $img = jQuery(this); 442 var imgID = $img.attr('id'); 443 var imgClass = $img.attr('class'); 444 var imgURL = $img.attr('src'); 445 446 jQuery.get(imgURL, function(data) { 447 // Get the SVG tag, ignore the rest 448 var $svg = jQuery(data).find('svg'); 449 450 // Add replaced image's ID to the new SVG 451 if(typeof imgID !== 'undefined') { 452 $svg = $svg.attr('id', imgID); 453 } 454 // Add replaced image's classes to the new SVG 455 if(typeof imgClass !== 'undefined') { 456 $svg = $svg.attr('class', imgClass+' replaced-svg'); 457 } 458
459 // Remove any invalid XML tags as per http://validator.w3.org 460 $svg = $svg.removeAttr('xmlns:a'); 461 462 // Replace image with new SVG 463 $img.replaceWith($svg); 464 465 }, 'xml'); 466 467 }); 468 469 $('.glyphicon-search').click(function () { 470 471 472 $('#footer-form').submit(); 473 }); 474 475 $('.sisi-search-icon,.sisi-search-icon-mobile').click(function () { 476 477 478 var position = $(".sisi-footer-wrapper").position().top; 479 480 scrollToNavigate((position)); 481 482 }); 483 484 /** 485 * Event Calandar 486 */ 487 488 var $calenderForm = $('#sisi-calender-form'); 489 if($calenderForm.length){ 490 491 $calenderForm.find('.pagination a').click(function () { 492 var time = parseInt($(this).data('time')); 493 var $timeField = $('input[name="tx_sisieventcalender_list[time]"]'); 494 $timeField.val(time); 495 496 var $useDateField = $('input[name="tx_sisieventcalender_list[useDate]"]'); 497 $useDateField.prop('checked', true); 498 499 // clear day 500 var $dateField = $('input[name="tx_sisieventcalender_list[date]"]'); 501 // console.log('clear [date]'); 502 $dateField.val(''); 503 504 $calenderForm.submit(); 505 return false; 506 }); 507 508 509 510 $calenderForm.find('.here-entry').click(function () { 511 var time = $(this).data('time'); 512 var $dateField = $('input[name="tx_sisieventcalender_list[date]"]'); 513 $dateField.val(1); 514 515 var $timeField = $('input[name="tx_sisieventcalender_list[time]"]'); 516 $timeField.val(time); 517 518 var $useDateField = $('input[name="tx_sisieventcalender_list[useDate]"]'); 519 $useDateField.prop('checked', true); 520 521 $calenderForm.submit(); 522 }); 523 524 525 $calenderForm.find('button[type="submit"]').click(function(){ 526 var $useDateField = $('input[name="tx_sisieventcalender_list[useDate]"]'); 527 var $timeField = $('input[name="tx_sisieventcalender_list[time]"]'); 528 if ($useDateField.prop('checked') == false || $timeField.val() == '') { 529 var now = $('.sisi-date-now').data('time'); 530 $timeField.val(now); 531 } 532 533 }); 534 535 536 $calenderForm.on('submit', function(){ 537 538 // delete date in submit when useDate ist false 539 if(!$('input[name="tx_sisieventcalender_list[useDate]"]').is(':checked')){ 540 $('input[name="tx_sisieventcalender_list[date]"]').val(''); 541 } 542 543 return true; 544 545 }); 546 547 $useDateField = $('#sisi-calender-form input[name="tx_sisieventcalender_list[useDate]"]'); 548 549 if($useDateField.attr('type') == 'hidden'){ 550 551 } 552 553 554 $useDateField.change(function(){ 555 if($(this).prop('checked') == true) { 556 $calenderForm.addClass('highlight'); 557 } else { 558 $calenderForm.removeClass('highlight'); 559 } 560 }); 561 562 $calenderForm.find('.date_text').on('click', function() { 563 $(this).next().toggleClass('hidden'); 564 $(this).toggleClass('hidden'); 565 }); 566 567 $calenderForm.find('.date_select_confirm').on('click', function(e) { 568 // e.preventDefault(); 569 $(this).parent().prev().toggleClass('hidden'); 570 $(this).parent().toggleClass('hidden'); 571 $calenderForm.find('#sisi-calender-form-use-date').prop('checked', true); 572 let $timeField = $('input[name="tx_sisieventcalender_list[time]"]'); 573 $timeField.val(new Date($(this).parent().find('.date_select_year').val(), $(this).parent().find('.date_select_month').val() - 1, 1,6,0,0).getTime()/1000); 574 }); 575 $calenderForm.find('.date_select select').on('change', function(e) { 576 let $pagination = $(this).closest('.pagination'); 577 let dateString = $pagination.find('.date_select_month option:selected').text() + ' ' + $pagination.find('.date_select_year option:selected').text(); 578 $pagination.find('.date_text').html(dateString); 579 $(this).parent().find('.date_select_confirm').removeClass('hidden'); 580 if ($('#sisi-calender-form-use-date').prop('checked') == true) { 581 let $timeField = $('input[name="tx_sisieventcalender_list[time]"]'); 582 $timeField.val(new Date($(this).parent().find('.date_select_year').val(), $(this).parent().find('.date_select_month').val() - 1, 1,6,0,0).getTime()/1000); 583 } 584 }); 585 586 $calenderForm.each(function() { 587 let $timeField = $(this).find('.sisi-date-now'); 588 let date = new Date($timeField.data('time') * 1000); 589 let month = date.getMonth() + 1; 590 let year = date.getFullYear(); 591 $(this).find('.date_select_month').val(month); 592 $(this).find('.date_select_year').val(year); 593 }); 594 595 } 596 597 598 /* ie11 fix NR '19 */ 599 /*if (typeof URL === 'function') {
600 let params = (new URL (document.location)).searchParams; 601 let paramFilter = params.get ('filter'); 602 if (paramFilter === '1') { 603 history.replaceState (null, null, document.location.pathname); 604 } 605 }*/ 606 function getUrlVars() { 607 var vars = {}; 608 var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) { 609 vars[key] = value; 610 }); 611 return vars; 612 } 613 614 function getUrlParam(parameter, defaultvalue){ 615 var urlparameter = defaultvalue; 616 if(window.location.href.indexOf(parameter) > -1) { 617 urlparameter = getUrlVars()[parameter]; 618 } 619 return urlparameter; 620 } 621 622 var paramFilter = getUrlParam('filter', ''); 623 if (paramFilter === '1') { 624 history.replaceState (null, null, document.location.pathname); 625 } 626 627 $('input[type="submit"]').click(function () { 628 629 var email = $('.sisi-email').val(); 630 631 var checkbox_str = is_checked($('.sisi-checkbox')); 632 var requires_str = requires($('.sisi-requires'), 'Hallo'); 633 var email_str = EMail($('.sisi-email')); 634 $('.sisi-warning-required').remove(); 635 636 if (checkbox_str && requires_str && email_str) { 637 638 return true; 639 640 } else { 641 $(this).before($('<div class="sisi-warning-required ci-cta-color">Bitte füllen Sie alle Pflichtfelder* aus.</div>').delay(5000).slideUp("slow")); 642 return false; 643 } 644 645 646 }); 647 648 649 650 function chanceOpen($selktorEvent,$selktorMove){ 651 652 if( $selktorEvent.hasClass('sisi-down')){ 653 654 655 $selktorEvent.removeClass('sisi-down').addClass('sisi-up'); 656 $selktorMove.slideDown("slow"); 657 }else{ 658 659 $selktorEvent.removeClass('sisi-up').addClass('sisi-down'); 660 $selktorMove.slideUp("slow"); 661 } 662 663 664 665 } 666 667 668 function scrollToNavigate(pos) { 669 670 $('html,body').animate( 671 {scrollTop: pos}, 600); 672 } 673 674 function is_checked($selektor) { 675 676 var re = true; 677 678 $selektor.each(function () { 679 680 if ((!$(this).is(":checked"))) { 681 $(this).parent().addClass('red'); 682 re = false; 683 } else { 684 $(this).parent().removeClass('red'); 685 686 } 687 688 }); 689 690 return re; 691 692 } 693 694 $('#registration-count-people').on('change', function() { 695 count = $(this).val(); 696 html = ''; 697 pcr = $('.people-count-row').length; 698 $('#people-count-more').remove(); 699 if (count > pcr) { 700 html = '<div class="form-group" id="people-count-more">Weitere Personen:</div>'; 701 $('#additional-people').prepend(html); 702 for (people = pcr + 1; people < count; people++) { 703 html = '<div class="people-count-row"><div class="form-group name-group">' + 704 '<label class="col-lg-3 col-md-3 col-sm-3 col-xs-12 control-label sisi-label-align-left">Vorname*</label>' + 705 '<div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">' + 706 '<input class="form-control sisi-requires" name="tx_sisiseminar_sisiseminarregistration[name_additional][]" type="text">' + 707 '</div>' + 708 '</div>' + 709 '<div class="form-group">'+ 710 '<label class="col-lg-3 col-md-3 col-sm-3 col-xs-12 control-label sisi-label-align-left">Nachname*</label>' + 711 '<div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">'+ 712 '<input class="form-control sisi-requires" name="tx_sisiseminar_sisiseminarregistration[lastname_additional][]" type="text">' + 713 '</div>' + 714 '</div>' + 715 // '<div class="form-group">'+ 716 // '<label class="col-lg-3 col-md-3 col-sm-3 col-xs-12 control-label sisi-label-align-left">E-Mail*</label>' + 717 // '<div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">'+ 718 // '<input class="form-control sisi-requires" name="tx_sisiseminar_sisiseminarregistration[email_additional][]" type="text">' + 719 // '</div>' + 720 '</div>'+ 721 '<div class="form-group">'+ 722 '<label class="col-lg-3 col-md-3 col-sm-3 col-xs-12 control-label sisi-label-align-left">Mitgliedsstatus*</label>' + 723 '<div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">'+ 724 '<select class="form-control" id="states" name="tx_sisiseminar_sisiseminarregistration[auswahl_additional][]"><option value="1">Mitglied</option><option value="2">Absolventen / Studenten</option><option value="3">Gast</option></select>' + 725 '</div>' + 726 '</div></div>'; 727 728 $('#additional-people').append(html); 729 730 } 731 } 732 else { 733 if (count > 1) { 734 html = '<div class="form-group" id="people-count-more">Weitere Personen:</div>'; 735 $('#additional-people').prepend(html); 736 } 737 738 for (people = pcr; people >= count; people--) { 739 $('.people-count-row').last().remove(); 740 } 741 } 742 743 }); 744 745 function requires($selektor, placeholder) { 746 747 var re = true; 748 749 750 $selektor.each(function () { 751 752 if (($(this).val() == "") || ($(this).val() == "0")) { 753 $(this).addClass('red'); 754 755 re = false;
756 } else { 757 $(this).removeClass('red'); 758 759 } 760 761 }); 762 763 return re; 764 } 765 766 function EMail($mailSelektor) { 767 768 var res = true; 769 770 $mailSelektor.each(function () { 771 772 773 var email = $(this).val(); 774 var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; 775 res = re.test(email); 776 if (res == false) { 777 $mailSelektor.addClass('red').attr('placeholder', 'Keine gültige E-Mail'); 778 res = false; 779 780 } else { 781 $mailSelektor.removeClass('red').attr('placeholder', 'E-Mail Adresse'); 782 783 } 784 785 }); 786 787 return res; 788 } 789 790 791 792 $('.sisi-navi-head .aktive').closest('.sisi-navi-head').addClass('aktive'); 793 794 $('#registration-people-count').on('change', function() { 795 count = $(this).val(); 796 html = ''; 797 pcr = $('.participants-count-row').length; 798 $('#participants-count-more').remove(); 799 // if (count > pcr) { 800 // html = '<div class="form-group" id="participants-count-more">Weitere Teilnehmer:</div>'; 801 // $('#participants').prepend(html); 802 // for (people = pcr; people < count; people++) { 803 // html = '<div class="participants-count-row people-row"><div class="form-group name-group">' + 804 // '<label class="col-lg-3 col-md-3 col-sm-3 col-xs-12 control-label sisi-label-align-left">Vorname*</label>' + 805 // '<div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">' + 806 // '<input class="form-control sisi-requires" name="tx_sisievents_show[newParticipants][name][]" type="text">' + 807 // '</div>' + 808 // '</div>' + 809 // '<div class="form-group">'+ 810 // '<label class="col-lg-3 col-md-3 col-sm-3 col-xs-12 control-label sisi-label-align-left">Nachname*</label>' + 811 // '<div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">'+ 812 // '<input class="form-control sisi-requires" name="tx_sisievents_show[newParticipants][lastname][]" type="text">' + 813 // '</div>' + 814 // '</div>' + 815 // // '<div class="form-group">'+ 816 // // '<label class="col-lg-3 col-md-3 col-sm-3 col-xs-12 control-label sisi-label-align-left">E-Mail*</label>' + 817 // // '<div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">'+ 818 // // '<input class="form-control sisi-requires" name="tx_sisievents_show[newParticipants][email][]" type="text">' + 819 // // '</div>' + 820 // ''; 821 // if (0 && $('input#phone').length > 0) { 822 // // Disable extended data for participants for now. 823 // html += 824 // '</div>' + 825 // '<div class="form-group">'+ 826 // '<label class="col-lg-3 col-md-3 col-sm-3 col-xs-12 control-label sisi-label-align-left">Telefonnummer*</label>' + 827 // '<div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">'+ 828 // '<input class="form-control sisi-requires" name="tx_sisievents_show[newParticipants][phone][]" type="text">' + 829 // '</div>' + 830 // '</div>' + 831 // '<div class="form-group">'+ 832 // '<label class="col-lg-3 col-md-3 col-sm-3 col-xs-12 control-label sisi-label-align-left">StraÃe und Hausnummer*</label>' + 833 // '<div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">'+ 834 // '<input class="form-control sisi-requires" name="tx_sisievents_show[newParticipants][street][]" type="text">' + 835 // '</div>' + 836 // '</div>' + 837 // '<div class="form-group">'+ 838 // '<label class="col-lg-3 col-md-3 col-sm-3 col-xs-12 control-label sisi-label-align-left">PLZ*</label>' + 839 // '<div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">'+ 840 // '<input class="form-control sisi-requires" name="tx_sisievents_show[newParticipants][zip][]" type="text">' + 841 // '</div>' + 842 // '</div>' + 843 // '<div class="form-group">'+ 844 // '<label class="col-lg-3 col-md-3 col-sm-3 col-xs-12 control-label sisi-label-align-left">Stadt*</label>' + 845 // '<div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">'+ 846 // '<input class="form-control sisi-requires" name="tx_sisievents_show[newParticipants][city][]" type="text">' + 847 // '</div>'; 848 // } 849 // html += 850 // '</div></div>'; 851 // $('#participants').append(html); 852 // } 853 // } 854 // else { 855 // if (count >= 1) { 856 // html = '<div class="form-group" id="participants-count-more"></div>'; 857 // $('#participants').prepend(html); 858 // } 859 860 // for (people = pcr; people > count; people--) { 861 // $('.participants-count-row').last().remove(); 862 // } 863 // } 864 }); 865 866 $('#registration-people-count-online').on('change', function() { 867 count = $(this).val(); 868 html = ''; 869 pcr = $('.participants-online-count-row').length; 870 $('#participants-online-count-more').remove(); 871 // if (count > pcr) { 872 // html = '<div class="form-group" id="participants-online-count-more">Weitere Teilnehmer:</div>'; 873 // $('#participants-online').prepend(html); 874 // for (people = pcr; people < count; people++) { 875 // html = '<div class="participants-online-count-row people-row"><div class="form-group name-group">' + 876 // '<label class="col-lg-3 col-md-3 col-sm-3 col-xs-12 control-label sisi-label-align-left">Vorname*</label>' + 877 // '<div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">' + 878 // '<input class="form-control sisi-requires" name="tx_sisievents_show[newParticipants][name_online][]" type="text">' + 879 // '</div>' + 880 // '</div>' + 881 // '<div class="form-group">'+ 882 // '<label class="col-lg-3 col-md-3 col-sm-3 col-xs-12 control-label sisi-label-align-left">Nachname*</label>' + 883 // '<div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">'+ 884 // '<input class="form-control sisi-requires" name="tx_sisievents_show[newParticipants][lastname_online][]" type="text">' + 885 // '</div>' + 886 // '</div>' + 887 // // '<div class="form-group">'+ 888 // // '<label class="col-lg-3 col-md-3 col-sm-3 col-xs-12 control-label sisi-label-align-left">E-Mail*</label>' + 889 // // '<div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">'+ 890 // // '<input class="form-control sisi-requires" name="tx_sisievents_show[newParticipants][email_online][]" type="text">' + 891 // // '</div>' + 892 // '</div></div>'; 893 // $('#participants-online').append(html); 894 // } 895 // } 896 // else { 897 // if (count >= 1) { 898 // html = '<div class="form-group" id="participants-online-count-more"></div>'; 899 // $('#participants-online').prepend(html); 900 // } 901 902 // for (people = pcr; people > count; people--) { 903 // $('.participants-online-count-row').last().remove(); 904 // } 905 // } 906 907 }); 908 $('#event-registrations #section').each(function() { 909 if ($(this).val() == 1) { 910 $('#group-registration-fallback').removeClass('hidden'); 911 $('#extended-personal-data').removeClass('hidden'); 912 $('#extended-personal-data input').removeAttr('disabled'); 913 $('#extended-personal-data input[data-required]').addClass('sisi-requires'); 914 } 915 else { 916 $('#extended-personal-data').addClass('hidden'); 917 $('#group-registration-fallback').addClass('hidden'); 918 $('#group-registration-fallback').val(0); 919 $('#extended-personal-data input').attr('disabled', 'disabled'); 920 $('#extended-personal-data input[data-required]').removeClass('sisi-requires'); 921 } 922 }); 923 $('#event-registrations #section').on('change', function() { 924 if ($(this).val() == 1) { 925 $('#group-registration-fallback').removeClass('hidden'); 926 $('#extended-personal-data').removeClass('hidden'); 927 $('#extended-personal-data input').removeAttr('disabled'); 928 $('#extended-personal-data input[data-required]').addClass('sisi-requires'); 929 } 930 else { 931 $('#extended-personal-data').addClass('hidden'); 932 $('#group-registration-fallback').addClass('hidden'); 933 $('#group-registration-fallback').val(0); 934 $('#extended-personal-data input').attr('disabled', 'disabled'); 935 $('#extended-personal-data input[data-required]').removeClass('sisi-requires'); 936 } 937 }); 938 $('.form-val').each(function() { 939 $(this).closest('form').on('submit', function() { 940 $('#formVal').val('2'); 941 }) 942 }); 943 944 let studentIndex = 1; 945 function addStudentRow() { 946 studentIndex++; 947 const newRows = document.querySelectorAll('.group-students-new'); 948 949 const newSet = document.querySelector('.group-students-new').cloneNode(true); 950 newSet.querySelector('.student-first-name').setAttribute('name', `tx_akeventregistrationsc_sc[groupStudents][new${studentIndex}][firstName]`); 951 newSet.querySelector('.student-last-name').setAttribute('name', `tx_akeventregistrationsc_sc[groupStudents][new${studentIndex}][lastName]`); 952 newSet.querySelector('.student-first-name').value = ''; 953 newSet.querySelector('.student-last-name').value = ''; 954 955 newRows[newRows.length - 1 ].after(newSet); 956 } 957 958 $('#students-add-new').on('click', function(e) { 959 e.preventDefault(); 960 addStudentRow(); 961 }); 962 963 // $('#akeventregistrationsc_sc_group_participants').on('change', function(e) { 964 // const studentsCount = $(this).val(); 965 // const missingRows = studentsCount - $('.group-students-row').length; 966 // if (missingRows > 0) { 967 // for (i=1; i <= Math.min(missingRows, 50); i++) { 968 // addStudentRow(); 969 // } 970 // } 971 // else if (missingRows < 0) { 972 // const newRows = document.querySelectorAll('.group-students-new'); 973 // const newRowsEmpty = Array.from(newRows).filter(function (newRow) { 974 // const isEmpty = Array.from(newRow.querySelectorAll('input')).filter(function (e) { 975 // return e.value == ""; 976 // }).length; 977 // return isEmpty == 2; 978 // }); 979 980 // for (i = newRowsEmpty.length; i > Math.max(newRowsEmpty.length - Math.abs(missingRows), 1); i--) { 981 // newRowsEmpty[i-1].remove(); 982 // } 983 // } 984 // }); 985 986 /** 987 * Copyright overlay for images and galleries 988 * @type {null} 989 */ 990 /*var $galleryCopyrightEl = null; 991 $('.gallery-item-copyright').hover( 992 function(){ 993 var $this = $(this); 994 $(this).siblings('div.figcaption, figcaption').css('visibility','hidden'); 995 996 var html = $this.data('copyright'); 997 998 var captionWrapperWidth = $this.closest('.caption-wrapper').outerWidth(); 999
1000 $galleryCopyrightEl = $('<div>') 1001 .html(html) 1002 .attr('id', 'gallery-copyright-text') 1003 .css('width', captionWrapperWidth) 1004 .appendTo('body'); 1005 1006 $galleryCopyrightEl.css({ 1007 left:$this.closest('.caption-wrapper').offset().left + captionWrapperWidth - $galleryCopyrightEl.width(), 1008 top: $this.offset().top 1009 }); 1010 1011 }, 1012 function(){ 1013 $galleryCopyrightEl.remove(); 1014 $(this).siblings('div.figcaption, figcaption').css('visibility','visible'); 1015 } 1016 );*/ 1017 1018 /** 1019 * Scroll to top if newsletter powermail messages are found 1020 */ 1021 var $powermailMessages = $('.newsletter-registration .powermail_message'); 1022 if($powermailMessages.length){ 1023 $(window).scrollTop(0); 1024 } 1025 1026 1027 $('.t3ddy-accordion-header').on('click', function(event){ 1028 // fix flexslider in accordion 1029 setTimeout(function() { 1030 $(window).trigger('resize'); 1031 }, 20); 1032 }); 1033 1034 if (location.hash) { 1035 let target = location.hash; 1036 window.scrollTo(0, 5); 1037 let $el = $(target); 1038 if ($el.length) { 1039 setTimeout(function() { 1040 scrollToAnchor($el); 1041 }, 405); 1042 } 1043 } 1044 1045 $(document).on('click', 'a[href*=\\#]:not([href=\\#])', function(e) { 1046 // Scroll to anchor. 1047 let href = '#' + $(this).attr('href').split('#')[1]; 1048 let $el = $(href); 1049 if ($el.length) { 1050 // Only if anchor/id is found. 1051 e.preventDefault(); 1052 window.scrollBy(0, 5); 1053 setTimeout(function() { 1054 scrollToAnchor($el); 1055 }, 405); 1056 } 1057 }); 1058 1059 function scrollToAnchor($el) { 1060 let pos = $el.offset().top - 85; 1061 1062 $('html,body').animate({ 1063 scrollTop: pos 1064 }, 500, 'easeOutSine'); 1065 } 1066 1067 //To top 1068 var btnAnimating = false; 1069 1070 $(window).bind("scroll", function (e) { 1071 if (btnAnimating) { 1072 return; 1073 } 1074 if (document.body.scrollTop > 100 || document.documentElement.scrollTop > 100) { 1075 btnAnimating = true; 1076 $('.cc-revoke.dp--revoke.cc-bottom-right').animate({ 1077 right: 50 1078 }, 50, function() { 1079 $('#btn-top').fadeIn(300); 1080 btnAnimating = false; 1081 }); 1082 } else { 1083 btnAnimating = true; 1084 $('#btn-top').fadeOut(300, function() { 1085 $('.cc-revoke.dp--revoke.cc-bottom-right').animate({ 1086 right: 0 1087 }, 50); 1088 btnAnimating = false; 1089 }); 1090 } 1091 }); 1092 1093 $('#btn-top').on('click', function (e) { 1094 $('body,html').animate({ 1095 scrollTop: 0 1096 }, 800); 1097 }); 1098}); 1099
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.