1$(function () { 2 // get random banner ad for header if available 3 GetRandomBannerAd(); 4 IsMobileDeviceJS(); 5 //Execute home splash countdown 6 SetCountDown("splash-countdown"); 7 //Menu Appearing when clicking on burger 8 SetMobileMenuSlide(); 9 //Adjust splash size 10 //AdjustScreenSizeOnMobile() 11 //Make Explore button scroll down 12 ScrollDownOnExplore(); 13 14 //Make Menu In mobile drodowneable 15 ConfigureMobileMenu(); 16 //Set up ajax for article category section 17 DynamicArticlesByCategorySetup(); 18 //Setting up the news archive filter 19 ConfigureArticleFiltering(); 20 //Hide fixed buttons on mobile keyboard open 21 HideOnKeyboardOpening(); 22 23 FactsAnimation(); 24 // YL: Pagination on speakers and exhibitors list pages 25 AddListPagination(); 26 var speakerPageDisplayAmount = parseInt($('.speakers-grid').attr('data-speaker-filter-amount')); 27 AddSpeakerListPagination(speakerPageDisplayAmount); 28 AddExhibitorListPagination(16); 29 // YL: Show first page items 30 ShowFirstPage(); 31 ShowFirstPageSpeakers(speakerPageDisplayAmount); 32 ShowFirstPageExhibitors(16); 33 // YL: Bind page link event listner 34 BindListPageSwitching(); 35 BindSpeakerListPageSwitching(speakerPageDisplayAmount); 36 BindExhibitorListPageSwitching(16); 37 38 EventsAgendaFilter(); 39 ExhibitorTabInitialise(); 40 ShowExhibitorProducts(); 41 EnhancedTabInitialise(); 42 ShowEnhancedPresentations(); 43 // YL: Popover initialize 44 PopoverInitialize(); 45 // YL: Speakers in sessions 46 CollapseSpeakers(); 47 // YL: Business programme page scrolling to session or opening event if there is param in link 48 BPOpenEvent(); 49 BPOpenSession(); 50 //resize the menu if it's too long 51 TweakMenu(); 52 //Make header sticky on scroll 53 SetStickyHeader(); 54 //Make portfolio top navigation sticky on scroll 55 //SetStickyTopNav(); 56 // update the cta home splash carousel cta with the active slide details 57 BusinessProgrammeNavSticky(); 58 ExhibitorListNavSticky(); 59 //Keep ticker tape scroll speed constant regardless of text length 60 InitTickerTape(); 61}); 62 63// Sets ticker animation-duration based on each ticker's actual width so the 64// scroll speed (px/sec) stays constant regardless of how much text is in it. 65// Speed precedence (px/sec): data-ticker-speed attr > --ticker-rate CSS var > 80. 66function InitTickerTape() { 67 var DEFAULT_PX_PER_SEC = 80; 68 var $tapes = $('.ticker-tape, .cwaTickerTape'); 69 if (!$tapes.length) return; 70 71 function resolveRate(el) { 72 var attr = parseFloat(el.getAttribute('data-ticker-speed')); 73 if (attr > 0) return attr; 74 var cssVar = parseFloat(getComputedStyle(el).getPropertyValue('--ticker-rate')); 75 if (cssVar > 0) return cssVar; 76 return DEFAULT_PX_PER_SEC; 77 } 78 79 function applySpeed() { 80 $tapes.each(function () { 81 var rate = resolveRate(this); 82 $(this).find('.ticker, .cwTicker').each(function () { 83 var width = this.scrollWidth; 84 if (width > 0) { 85 this.style.animationDuration = (width / rate) + 's'; 86 } 87 }); 88 }); 89 } 90 91 applySpeed(); 92 93 var resizeTimer; 94 $(window).on('resize.tickerTape', function () { 95 clearTimeout(resizeTimer); 96 resizeTimer = setTimeout(applySpeed, 150); 97 }); 98} 99 100$(window).on("load", function () { 101 //ConfigureRecommendedCarousel(); 102 //Configure Sponsors Carousel 103 SetSponsorsCarousel(); 104 //Make news carousel work 105 ConfigureNewsCarousel(); 106 //Make Configure Agenda Speaker Carousel work 107 ConfigureAgendaSpeakerCarousel(); 108 //Make Testimonials and Full Width Testimonials carousels work 109 ConfigureTestimonialsCarousel(); 110 ConfigureFullWidthTestimonialsCarousel(); 111 //Make speakers carousel work 112 ConfigureSpeakersCarousel(); 113 //Make exhibitors carousel work 114 ConfigureExhibitorsCarousel(); 115 //Initialise the carousels on Voting List and Stands pages 116 //VotingListCarousel(); 117 //StandsCarousel(); 118 //ConfigureFullWidthMobileMenu(); 119}); 120 121window.addEventListener('scroll', function (e) { 122 e.preventDefault(); 123}); 124 125 126function initializeObserver(containerId) { 127 const containerDiv = document.querySelector(`#${containerId}`); 128 if (containerDiv) { 129 const targetForm = containerDiv.querySelector('form[action*="Kentico.FormWidget"]'); 130 if (targetForm) { 131 const observer = new MutationObserver((mutationsList, observer) => { 132 for (const mutation of mutationsList) { 133 const formAfterSubmit = containerDiv.querySelector('form[action*="Kentico.FormWidget"]'); 134 if (formAfterSubmit) { 135 var action = formAfterSubmit.getAttribute('action'); 136 var displayValidationErrorsAfterSubmit = action.includes('displayValidationErrors=True'); 137 if (displayValidationErrorsAfterSubmit) { 138 var elements = formAfterSubmit.querySelectorAll('.form-control'); 139 var firstErrorField = null;
140 elements.forEach(function (el) { 141 if (el.classList.contains('input-validation-error') && !firstErrorField) { 142 firstErrorField = el; 143 } 144 }); 145 if (firstErrorField) { 146 firstErrorField.focus(); 147 firstErrorField.scrollIntoView({ behavior: 'smooth', block: 'center' }); 148 } 149 } 150 } else { 151 const successTextElement = containerDiv.querySelector('.formwidget-submit-text'); 152 if (successTextElement) { 153 successTextElement.scrollIntoView({ behavior: 'smooth', block: 'center' }); 154 } 155 } 156 } 157 }); 158 observer.observe(containerDiv, { 159 attributes: true, 160 childList: true, 161 subtree: true, 162 attributeFilter: ['action'], 163 attributeOldValue: true, 164 characterData: true, 165 characterDataOldValue: true 166 }); 167 } 168 } 169} 170 171const divIds = ['fbSectionDiv', 'leftFBSectionDiv', 'rightFBSectionDiv']; 172 173divIds.forEach((id) => { 174 initializeObserver(id); 175}); 176 177$(document).ready(function () { 178 window.onload = function () { 179 var vidDefer = document.getElementsByTagName('iframe'); 180 for (var i = 0; i < vidDefer.length; i++) { 181 if (vidDefer[i].getAttribute('data-src')) { 182 vidDefer[i].setAttribute('src', vidDefer[i].getAttribute('data-src')); 183 } 184 } 185 } 186}); 187 188// GB: Checks if a form has been submitted 189$(document).ready(function () { 190 if ($(".success")[0]) { 191 $("#myModal").modal("show"); 192 } 193}); 194 195function ConfigureRecommendedCarousel() { 196 $('.recommended-block').slick({ 197 dots: false, 198 infinite: true, 199 speed: 500, 200 slidesToShow: 4, 201 slidesToScroll: 1, 202 responsive: [ 203 { 204 breakpoint: 1024, 205 settings: { 206 slidesToShow: 3, 207 slidesToScroll: 3, 208 infinite: true, 209 dots: true 210 } 211 }, 212 { 213 breakpoint: 600, 214 settings: { 215 slidesToShow: 2, 216 slidesToScroll: 2 217 } 218 }, 219 { 220 breakpoint: 480, 221 settings: { 222 slidesToShow: 1, 223 slidesToScroll: 1 224 } 225 } 226 // You can unslick at a given breakpoint now by adding: 227 // settings: "unslick" 228 // instead of a settings object 229 ] 230 }); 231} 232 233 234function ConfigureMobileMenu() { 235 $("#ite-menu-tree > li > .dropdown-toggle, #ite-menu-tree ul > li > .dropdown-toggle").click(function () { 236 //$("#ite-menu-tree > li > .dropdown-toggle, #ite-menu-tree ul > li > .dropdown-toggle").siblings("ul").slideUp(); //Close all other items 237 //$("#ite-menu-tree > li > .dropdown-toggle, #ite-menu-tree ul > li > .dropdown-toggle").children("i").addClass("fa-sort-down"); 238 //$("#ite-menu-tree > li > .dropdown-toggle, #ite-menu-tree ul > li > .dropdown-toggle").children("i").removeClass("fa-sort-up"); 239 //$(this).siblings("ul").slideToggle(); 240 if ($(this).children("i").hasClass("fa-sort-down")) { 241 if ($(this).parents("ul").length < 2) { 242 $("#ite-menu-tree ul").slideUp(); 243 } 244 $("#ite-menu-tree i").removeClass("fa-sort-up"); 245 $("#ite-menu-tree i").addClass("fa-sort-down"); 246 $(this).siblings("ul").slideDown(); 247 $(this).children("i").removeClass("fa-sort-down"); 248 $(this).children("i").addClass("fa-sort-up"); 249 } else { 250 $(this).siblings("ul").slideUp(); 251 $(this).children("i").addClass("fa-sort-down"); 252 $(this).children("i").removeClass("fa-sort-up"); 253 } 254 });
255} 256 257//NEWS CAROUSEL SECTION 258function ConfigureNewsCarousel() { 259 SetNewsCarousel(0); 260 AddCarouselEventListeners(); 261 HideLastSlides(); 262 AddArrowsListeners(); 263 CarouselArrowNext(); 264 CarouselArrowPrev(); 265} 266 267var newsSlider; 268function SetNewsCarousel(id) { 269 //exit if it's mobile 270 //if (screen && screen.width < 768) { return; }; 271 272 //stop inteval 273 if (typeof newsSlider !== "undefined") { 274 clearInterval(newsSlider); 275 } 276 277 var allItems = $(".latest-news-list .lastes-item"); 278 279 if (allItems.length > 0) { 280 $(allItems).removeClass("active"); 281 $(allItems[id]).addClass("active"); 282 DisplayCarouselItem(allItems[id]); 283 SwitchPage(id, allItems); 284 285 newsSlider = setInterval(function () { 286 var current = $(allItems).filter(".active").index() + 1; 287 $(allItems).removeClass("active"); 288 if (allItems.length + 1 === current) { 289 $(allItems[0]).addClass("active"); 290 current = 1; 291 } else { 292 $(allItems[current - 1]).addClass("active"); 293 } 294 DisplayCarouselItem(allItems[current - 1]); 295 SwitchPage(current, allItems); 296 }, 5000); 297 } 298}; 299 300function CarouselArrowNext() { 301 $("a.arrow.next").click(function () { 302 var allItems = $(".latest-news-list .lastes-item"); 303 var current = $(allItems).filter(".active").index(); 304 305 if (jQuery.browser.mobile) { 306 $("body,html").animate( 307 { 308 scrollTop: $(".ite-news-zone").offset().top - $(".ite-header").height() 309 }, 310 800 311 ); 312 } 313 314 if (current < allItems.length) { 315 SetNewsCarousel(current++); 316 } 317 else { 318 current = 0; 319 SetNewsCarousel(current); 320 } 321 }); 322}; 323 324function CarouselArrowPrev() { 325 $("a.arrow.prev").click(function () { 326 var allItems = $(".latest-news-list .lastes-item"); 327 var current = $(allItems).filter(".active").index(); 328 329 if (jQuery.browser.mobile) { 330 $("body,html").animate( 331 { 332 scrollTop: $(".ite-news-zone").offset().top - $(".ite-header").height() 333 }, 334 800 335 ); 336 } 337 338 // console.log($(".latest-news-list .lastes-item").filter(".active").index()) 339 340 if (current > 1) { 341 //current--; 342 SetNewsCarousel(current - 2); 343 } 344 else { 345 current == allItems.length; 346 SetNewsCarousel(current - 1); 347 } 348 }); 349}; 350 351function SwitchPage(current, allItems) { 352 if (current - 1 !== 1 && (current - 1) % 5 === 0) { 353 $(allItems).hide(); 354 $(allItems).slice(current - 1, current + 4).show(); 355 } 356} 357//Set item in big image box 358function DisplayCarouselItem(obj) { 359 var upelm = $(".lates-news-image:first"); 360 $("a:first", upelm).text($(obj).attr("data-title")); 361 $("a:first", upelm).attr("href", $("a:first", obj).attr("href")); 362 $(upelm).fadeTo(1, 0.6, function () { 363 $(upelm).css("background-image", "url('" + $(obj).attr("data-image") + "')"); 364 }).fadeTo('slow', 1); 365} 366//add listeners to when users click on list 367function AddCarouselEventListeners() { 368 $(".latest-news-list .lastes-item").click(function () { 369 SetNewsCarousel($(this).index() - 1); 370 }); 371} 372 373function HideLastSlides() { 374 $(".latest-news-list .lastes-item").slice(5).hide(); 375}; 376 377function AddArrowsListeners() { 378 $(".latest-news-list .arrows .arrow").click(function () { 379 var currentItem = $(".latest-news-list .lastes-item.active").index() 380 var hiddenItems = $(".lastes-item:hidden"); 381 //This will work only for 2 pages of content 382 $(".lastes-item:visible").hide(); 383 $(hiddenItems).show(); 384 }); 385}; 386//END NEWS CAROUSEL SECTION 387 388//function AdjustScreenSizeOnMobile() { 389// if (screen && screen.width < 768) { 390// setTimeout(function () { 391// $(".ite-splash").height($(window).height() - $(".ite-cta-buttons:first").height() - $(".ite-header:first").height()); 392// }, 2000); 393// } 394//} 395function ScrollDownOnExplore() { 396 $(".post-splash-explore, .post-splash-explore-fashion").click(function () { 397 event.preventDefault();
398 var viewportHeight = $(".ite-splash").height() + 2; 399 400 $('html, body').animate({ 401 scrollTop: viewportHeight, 402 complete: function () { 403 //do something 404 } 405 }, 600); 406 }); 407} 408function SetStickyHeader() { 409 if ($(".ite-header").length) { 410 var stickyOffset = $('.ite-header').offset().top; 411 412 $(window).scroll(function () { 413 var sticky = $('.ite-header'); 414 var line = $('.ite-header-line'); 415 var scroll = $(window).scrollTop(); 416 sticky.css("width", $(".ite-content").width() + "px"); 417 sticky.css("margin-left","0px"); 418 sticky.css("margin-right","0px"); 419 if (scroll > stickyOffset) { 420 sticky.addClass('fixed header__scroll'); 421 line.css("display", "block"); 422 //$(".ite-content").css("margin-top", sticky.height() + "px"); 423 } 424 else { 425 sticky.css("width", "inherit"); 426 sticky.removeClass('fixed header__scroll'); 427 line.css("display", "none"); 428 $(".ite-content").css("margin-top", "0px"); 429 } 430 }); 431 var resizeTimer; 432 433 $(window).on('resize', function (e) { 434 435 clearTimeout(resizeTimer); 436 resizeTimer = setTimeout(function () { 437 438 $('.ite-header').width($(".ite-content").width()); 439 440 }, 250); 441 442 }); 443 } 444 445} 446 447function SetSponsorsCarousel() { 448 $(".carousel-list").slick({ 449 arrows: true, 450 autoplay: true, 451 infinite: true, 452 speed: 500, 453 autoplaySpeed: 5000, 454 slidesToShow: 6, 455 slidesToScroll: 6, 456 responsive: [ 457 { 458 breakpoint: 1200, 459 settings: { 460 slidesToShow: 5, 461 slidesToScroll: 1 462 } 463 }, 464 { 465 breakpoint: 800, 466 settings: { 467 slidesToShow: 4, 468 slidesToScroll: 1 469 } 470 }, 471 { 472 breakpoint: 550, 473 settings: { 474 slidesToShow: 1, 475 slidesToScroll: 1 476 } 477 }, 478 { 479 breakpoint: 400, 480 settings: { 481 slidesToShow: 1, 482 slidesToScroll: 1 483 } 484 } 485 ] 486 }); 487 488} 489 490function ConfigureSpeakersCarousel() { 491 $(".featured-speakers-content").slick({ 492 dots: false, 493 autoplay: true, 494 infinite: true, 495 speed: 500, 496 autoplaySpeed: 5000, 497 slidesToShow: 4, 498 slidesToScroll: 1, 499 responsive: [ 500 { 501 breakpoint: 1100, 502 settings: { 503 slidesToShow: 2, 504 slidesToScroll: 1 505 } 506 }, 507 { 508 breakpoint: 850, 509 settings: { 510 slidesToShow: 1, 511 slidesToScroll: 1 512 } 513 } 514 ] 515 }); 516} 517 518 519 520function ConfigureExhibitorsCarousel() { 521 $(".featured-exhibitors-content").slick({ 522 dots: false, 523 autoplay: true, 524 infinite: true, 525 speed: 500, 526 autoplaySpeed: 5000, 527 slidesToShow: 4, 528 slidesToScroll: 1, 529 responsive: [ 530 { 531 breakpoint: 1100, 532 settings: { 533 slidesToShow: 2, 534 slidesToScroll: 1 535 } 536 }, 537 { 538 breakpoint: 850, 539 settings: { 540 slidesToShow: 1, 541 slidesToScroll: 1 542 } 543 } 544 ] 545 }); 546} 547 548function ConfigureTestimonialsCarousel() { 549 $(".quotes-elements").slick({ 550 dots: false, 551 autoplay: false, 552 infinite: true, 553 speed: 500, 554 autoplaySpeed: 5000, 555 slidesToShow: 3, 556 slidesToScroll: 1, 557 responsive: [ 558 { 559 breakpoint: 1200, 560 settings: { 561 slidesToShow: 2, 562 slidesToScroll: 1 563 } 564 }, 565 { 566 breakpoint: 1000, 567 settings: { 568 slidesToShow: 1, 569 slidesToScroll: 1 570 } 571 } 572 ] 573 });
574} 575 576function ConfigureAgendaSpeakerCarousel() { 577 $(".agenda-speaker-carousel").slick({ 578 dots: true, 579 autoplay: true, 580 infinite: true, 581 speed: 500, 582 autoplaySpeed: 5000, 583 slidesToShow: 2, 584 slidesToScroll: 1, 585 responsive: [ 586 { 587 breakpoint: 1200, 588 settings: { 589 slidesToShow: 1, 590 slidesToScroll: 1 591 } 592 }, 593 { 594 breakpoint: 1000, 595 settings: { 596 slidesToShow: 1, 597 slidesToScroll: 1 598 } 599 } 600 ] 601 }); 602} 603 604function resetAgendaSpeakerCarousel() { 605 var $speakerCarousel = $(".agenda-speaker-carousel"); 606 if ($speakerCarousel.length) { 607 $speakerCarousel.slick('unslick'); 608 } 609 ConfigureAgendaSpeakerCarousel(); 610} 611 612 613 614function ConfigureFullWidthTestimonialsCarousel() { 615 $(".quotes-elements-full-width").slick({ 616 dots: true, 617 autoplay: true 618 }); 619} 620 621function SetMobileMenuSlide() { 622 $(".ite-menuburger-icon").click(function () { $(".ite-menu-nav").slideToggle(); }); 623} 624 625function SetCountDown(id) { 626 //Set up clock countdown for home Splash 627 //Element must have date-datestart in UNIX date and days, hours, minutes & seconds child elements 628 var dateNode = $("#" + id); 629 if (dateNode.length > 0) { 630 var compareDate = new Date(parseInt(dateNode.attr("data-startdate"))); 631 632 var timer; 633 634 timer = setInterval(function () { 635 timeBetweenDates(compareDate); 636 }, 1000); 637 638 function timeBetweenDates(toDate) { 639 var dateEntered = toDate; 640 var now = new Date(); 641 var difference = dateEntered.getTime() - now.getTime(); 642 643 if (difference <= 0) { 644 645 // Timer done 646 clearInterval(timer); 647 648 } else { 649 650 var seconds = Math.floor(difference / 1000); 651 var minutes = Math.floor(seconds / 60); 652 var hours = Math.floor(minutes / 60); 653 var days = Math.floor(hours / 24); 654 655 hours %= 24; 656 minutes %= 60; 657 seconds %= 60; 658 659 $("#days", dateNode).text(days); 660 $("#hours", dateNode).text(hours); 661 $("#minutes", dateNode).text(minutes); 662 $("#seconds", dateNode).text(seconds); 663 } 664 } 665 } 666} 667 668//Articles dynmic loading 669var ArticleCatTemplateHeader = $(".cat-news-item-right:first").clone(); 670var ArticleCatTemplate = $(".cat-news-item:first").clone(); 671var LoadMoreArtcatbtn = $(".cat-load-more .load-more-btn:first"); //btn 672 673function DynamicArticlesByCategorySetup() { 674 if ($(".cat-sel-item.cat-area-item").length > 0) { 675 var dataSliceTo; 676 $(ArticleCatTemplateHeader).show(); //set up template 677 $(ArticleCatTemplate).show(); 678 679 var ishidefeaturedcarousel = $(".cat-area-item").attr("data-hidefeaturedcarousel"); 680 681 var selectedCategory = localStorage.getItem('selectedCategory'); 682 if (selectedCategory == null) { 683 var firstDivText = $(".cat-sel-item.cat-area-item").filter(function () { 684 return $(this).css('order') == '0'; 685 }).first().data('categoryguid'); 686 687 selectedCategory = firstDivText; // ALl New is default if nothing has been selected previously 688 } 689 690 691 if (selectedCategory == "all" && ishidefeaturedcarousel == "False") { 692 dataSliceTo = 6; 693 $(".ite-news-zone").show(); 694 } 695 else { 696 dataSliceTo = 8; 697 $(".ite-news-zone").hide(); 698 } 699 700 701 AppendCatNews(1, dataSliceTo, CurrentCulture, selectedCategory, true); //first load 702 $(LoadMoreArtcatbtn).attr("data-sliceFrom", 1); 703 $(LoadMoreArtcatbtn).attr("data-sliceTo", dataSliceTo); //end first load 704 $(LoadMoreArtcatbtn).attr("data-categoryguid", selectedCategory); 705 706 707 var selectedCategoryTab = $(".cat-sel-item.cat-area-item[data-categoryguid='" + selectedCategory + "']"); 708 if (!selectedCategoryTab.hasClass("active-category")) { 709 $(".cat-sel-item.active-category").removeClass("active-category"); 710 selectedCategoryTab.addClass("active-category"); 711 } 712
713 $(".cat-area-item").click(function () { 714 715 var categoryId = $(this).attr("data-categoryguid"); 716 717 if ((categoryId == null || categoryId == "all") && ishidefeaturedcarousel == "False") { 718 dataSliceTo = 6; // when all is selected 719 $(".ite-news-zone").show(); 720 } 721 else { 722 dataSliceTo = 8; 723 $(".ite-news-zone").hide(); 724 } 725 726 if (IsLoadingArticles) { return; } 727 $(".cat-sel-item.active-category").removeClass("active-category");//Remove active class 728 $(LoadMoreArtcatbtn).show(); 729 AppendCatNews(1, dataSliceTo, CurrentCulture, $(this).data("categoryguid"), true); 730 $(LoadMoreArtcatbtn).attr("data-categoryguid", $(this).attr("data-categoryguid")); 731 732 $(this).addClass("active-category"); 733 localStorage.setItem('selectedCategory', $(this).attr("data-categoryguid")); // Adding artcile item to local storage. 734 $(LoadMoreArtcatbtn).attr("data-sliceFrom", 1); 735 $(LoadMoreArtcatbtn).attr("data-sliceTo", dataSliceTo); 736 }); 737 } 738} 739 740var IsLoadingArticles = false; //prevents from click again 741//function AppendCatNews(sliceFrom, sliceTo, culture, category, featured, all, replace) { 742function AppendCatNews(sliceFrom, sliceTo, culture, category, replace) { 743 if (IsLoadingArticles) { return; }; 744 IsLoadingArticles = true; 745 746 $(".cat-loading-icon").show(); //show loading gif 747 if (replace) { 748 $(".cat-news-item").remove(); 749 $(".cat-news-item-right").remove(); 750 } 751 var params = { 752 categoryGuid: category, 753 culture: culture, 754 sliceFrom: sliceFrom, 755 sliceTo: sliceTo 756 }; 757 //Execute ajax 758 $.post("/Article/Index", params, function (data) { 759 if (data.length > 0) { 760 for (i = 0; i < data.length; i++) { 761 if (i < 2 && sliceTo == 6) { 762 var item = $(ArticleCatTemplateHeader).clone(); 763 $("img", item).attr("src", data[i].Image); 764 $("img", item).attr("atl", data[i].Title); 765 $(".cat-news-img-link", item).attr("href", data[i].Path); 766 $(".cat-news-title-link", item).attr("href", data[i].Path); 767 $(".cat-news-title", item).text(data[i].Title); 768 $(".cat-news-date", item).text(data[i].Date); 769 $(".cat-news-author", item).text(data[i].Author); 770 $(".cat-news-blurb", item).text(data[i].Subtitle); 771 $(".cat-news-readmr-btn a", item).attr("href", data[i].Path); 772 $(".cat-news-area-header:first").append(item); 773 } 774 else { 775 var item = $(ArticleCatTemplate).clone(); 776 $("img", item).attr("src", data[i].Image); 777 $("img", item).attr("atl", data[i].Title); 778 $(".cat-news-img-link", item).attr("href", data[i].Path); 779 $(".cat-news-title-link", item).attr("href", data[i].Path); 780 $(".cat-news-title", item).text(data[i].Title); 781 $(".cat-news-date", item).text(data[i].Date); 782 $(".cat-news-author", item).text(data[i].Author); 783 $(".cat-news-blurb", item).text(data[i].Subtitle); 784 $(".cat-news-readmr-btn a", item).attr("href", data[i].Path); 785 $(".cat-news-area:first").append(item); 786 } 787 } 788 if ((sliceFrom == 1 && data.length < sliceTo) || (sliceFrom > 1 && data.length < 4)) { 789 $(".cat-load-more .load-more-btn:first").hide(); 790 }; 791 } else { 792 $(".cat-load-more .load-more-btn:first").hide(); 793 }; 794 }).fail(function (e) { 795 console.log("Failed Article Category Load: " + e); 796 }).always(function () { 797 $(".cat-loading-icon").hide(); //hide loading gif 798 IsLoadingArticles = false; 799 });
800}; 801function LoadMoreCatNews(_this) { 802 var sliceFrom = parseInt($(_this).attr("data-sliceFrom")); 803 var ishidefeaturedcarousel = $(".cat-area-item").attr("data-hidefeaturedcarousel"); 804 var categoryId = $(_this).attr("data-categoryguid"); 805 if (sliceFrom == 1) { 806 if (categoryId == "all" && ishidefeaturedcarousel == "False") { 807 sliceFrom = 7 808 } else { 809 sliceFrom = 9 810 } 811 } 812 else { 813 sliceFrom = sliceFrom + 4; 814 } 815 $(_this).attr("data-sliceFrom", sliceFrom); 816 $(_this).attr("data-sliceTo", parseInt($(_this).attr("data-sliceTo")) + 4); 817 AppendCatNews(sliceFrom, $(_this).attr("data-sliceTo"), CurrentCulture, categoryId, false); 818}; 819//End article dynamic loading 820 821//Dynamic article filtering 822var ArchiveArticleTemplate; 823function ConfigureArticleFiltering() { 824 $(".cat-extra-element").click(function () { 825 $("#news-search-engine").show(); 826 }); 827 828 $("#search-close-btn").click(function () { 829 $("#news-search-engine").hide(); 830 }); 831 832 ArchiveArticleTemplate = $(".archive-news-template:first").clone(); 833 $(ArchiveArticleTemplate).show(); 834 835 $(".filter-wrap .filter-icon").click(function () { 836 $("nav.ite-news-filter").slideToggle(500); 837 }); 838 //Close when clicking anywhere else in the archive section 839 $(".ite-archive-news, .archive-wrapper .section-title").on("click", function () { 840 $("nav.ite-news-filter").hide(); 841 }); 842 843 $('.article-search-submit').click(function () { 844 LoadArticlesBySearchText($(".article-search-text").val()); 845 }); 846 847 $('.article-search-text').keypress(function (e) { 848 var key = e.which; 849 if (key == 13) // the enter key code 850 { 851 LoadArticlesBySearchText($(".article-search-text").val()); 852 return false; 853 } 854 }); 855} 856 857function LoadArticlesByDates(year, month) { 858 var params = { 859 culture: CurrentCulture, 860 month: month, 861 year: year 862 }; 863 $(".archive-loading-icon").show(); 864 $(".archive-news-item").remove(); 865 $.post("/Article/DateIndex", params, function (data) { 866 if (data.length > 0) { 867 for (i = 0; i < data.length; i++) { 868 var item = $(ArchiveArticleTemplate).clone(); 869 $(".archive-news-title", item).text(data[i].Title); 870 $(".archive-news-date", item).text(data[i].Date); 871 $(".archive-news-blurb", item).text(data[i].Subtitle); 872 $(".read-more-link", item).attr("href", data[i].Path); 873 $(".archive-news-area:first").append(item); 874 } 875 } else { 876 console.log("No Articles found"); 877 }; 878 }).fail(function (e) { 879 console.log("Failed Article Arcive Load: " + e); 880 }).always(function () { 881 $(".archive-loading-icon").hide(); //hide loading gif 882 }); 883 $("nav.ite-news-filter").hide(); 884} 885 886function LoadArticlesBySearchText(searchtext) { 887 if (IsLoadingArticles) { return; }; 888 IsLoadingArticles = true; 889 890 $(".cat-loading-icon").show(); //show loading gif 891 $(".cat-news-item").remove(); 892 $(".cat-news-item-right").remove(); 893 $(".cat-load-more .load-more-btn:first").hide(); 894 895 var params = { 896 culture: CurrentCulture, 897 searchtext: searchtext, 898 }; 899 900 $.post("/Article/SearchIndex", params, function (data) { 901 if (data.length > 0) { 902 for (i = 0; i < data.length; i++) { 903 if (i < 2) { 904 var item = $(ArticleCatTemplateHeader).clone(); 905 $("img", item).attr("src", data[i].Image); 906 $("img", item).attr("atl", data[i].Title); 907 $(".cat-news-img-link", item).attr("href", data[i].Path); 908 $(".cat-news-title-link", item).attr("href", data[i].Path); 909 $(".cat-news-title", item).text(data[i].Title); 910 $(".cat-news-date", item).text(data[i].Date); 911 $(".cat-news-blurb", item).text(data[i].Subtitle); 912 $(".cat-news-readmr-btn a", item).attr("href", data[i].Path); 913 $(".cat-news-area-header:first").append(item); 914 } 915 else { 916 var item = $(ArticleCatTemplate).clone(); 917 $("img", item).attr("src", data[i].Image); 918 $("img", item).attr("atl", data[i].Title); 919 $(".cat-news-img-link", item).attr("href", data[i].Path); 920 $(".cat-news-title-link", item).attr("href", data[i].Path); 921 $(".cat-news-title", item).text(data[i].Title); 922 $(".cat-news-date", item).text(data[i].Date); 923 $(".cat-news-blurb", item).text(data[i].Subtitle); 924 $(".cat-news-readmr-btn a", item).attr("href", data[i].Path); 925 $(".cat-news-area:first").append(item); 926 } 927 } 928 } 929 }).fail(function (e) { 930 console.log("Failed Article Search Load: " + e); 931 }).always(function () { 932 $(".cat-loading-icon").hide(); //hide loading gif 933 $("#news-search-engine").hide(); 934 IsLoadingArticles = false; 935 });
936} 937 938//End dynamic article filtering 939 940//PW: On Mobile keyboard opening 941function HideOnKeyboardOpening() { 942 if (screen && screen.width > 768) { return; }; 943 $(document.body).on("focus", "textarea, input", function () { 944 $(".ite-cta-buttons:first").hide(); 945 }).on("blur", "textarea, input", function () { 946 $(".ite-cta-buttons:first").show(); 947 }); 948} 949//End keyboard opening 950 951//Contacts 952 953//JW: Maps area 954$(window).on("load, resize", function () { 955 var viewportWidth = $(window).width(); 956 if (viewportWidth < 768) { 957 $(".map-box").removeClass("row"); 958 } else { 959 $(".map-box").addClass("row"); 960 } 961}); 962 963 964//JW: When the dropdown list is on 1 then the contacts will be displayed in A-Z format, when it is on 2 then it will be Z-A 965$('.sel-name').on('change', function () { 966 if (($(this).children('option:selected').data('name')) === 1) { 967 var alphabeticallyOrdered = $('.support-team-item').sort(function (a, b) { 968 return $(a).find(".support-team-name").text() > $(b).find(".support-team-name").text(); 969 }); 970 $(".support-team-group").html(alphabeticallyOrdered); 971 } 972 else if (($(this).children('option:selected').data('name')) === 2) { 973 alphabeticallyOrdered = $('.support-team-item').sort(function (a, b) { 974 return $(a).find(".support-team-name").text() < $(b).find(".support-team-name").text(); 975 }); 976 $(".support-team-group").html(alphabeticallyOrdered); 977 } 978}) 979 980//JW: Searches and filters through the contact list 981$('#contactSearch').on('keyup', function () { 982 var filterName = $(this).val(); 983 $('.support-team-item').each(function () { 984 if ($(this).find('.support-team-name').text().search(new RegExp(filterName, 'i')) < 0) { 985 $(this).hide(); 986 } else { 987 $(this).show(); 988 } 989 }) 990}) 991 992//JW: Filters the contacts based on the selected function and country. 993$('.sel-function, .sel-country').on('change', function () { 994 var $option = $('.sel-function').find(":selected"); //JW: Finds which function has been selected 995 var $COption = $('.sel-country').find(":selected"); //JW: Finds which country has been selected 996 $('.func-sel-item').removeClass('selected'); 997 $('.country-sel-item').removeClass('selected'); 998 $option.addClass('selected'); 999 $COption.addClass('selected'); 1000 var $selFunc = $option.attr('data-functionguid'); 1001 var $selCountry = $COption.attr('data-countryguid'); 1002 $('.support-team-item').each(function () { //JW: For each contact, if the function is the same as the selected function 1003 var $func = $(this).attr('data-functionguid'); //AND the country is the same as the selected country then show otherwise hide. 1004 var $country = $(this).attr('data-countryguid'); 1005 if (($func === $selFunc || $selFunc === 'all') && ($country === $selCountry || $selCountry === 'all')) { 1006 $(this).show(); 1007 } else { 1008 $(this).hide(); 1009 } 1010 }); 1011}) 1012 1013//JW: Displays/Hides all contacts after the first 3 on-click ----------------------------- Temporarily disabled, will continue working on it until it works with the filters 1014//$ShowHideMore = $('.support-team-group'); 1015//$ShowHideMore.each(function () { 1016// var $times = $(this).children('.support-team-item'); 1017// if ($times.length > 3 && $times.length !== null) { 1018// $ShowHideMore.children(':nth-of-type(n + 4)').addClass('moreShown'); 1019// $('.show-more-section').find('.message').addClass('more-times').html('+ Show more'); 1020// } 1021//}); 1022//$(document).on('click', '.show-more-element > span', function () { 1023// var that = $(this); 1024// var thisParent = that.closest('.show-more-section'); 1025// if (that.hasClass('more-times')) { 1026// $('.support-team-group').find('.moreShown').slideDown(); 1027// that.toggleClass('more-times', 'less-times').html('- Show less'); 1028// } else { 1029// $('.support-team-group').find('.moreShown').slideUp(); 1030// that.toggleClass('more-times', 'less-times').html('- Show more'); 1031// } 1032//}); 1033 1034 1035//End Contacts 1036 1037function AddListPagination() { 1038 // Amount of speakers 1039 if ($('.list-page').length) { 1040 var itemsCount = parseInt($('.list-page').attr('data-total-number-items')); 1041 var itemsPerPage = parseInt($('.list-page').attr('data-items-per-page')); 1042 // Amount of pages 1043 var numberOfPages = Math.ceil(itemsCount / itemsPerPage); 1044 // Pagination container 1045 var paginationContainer = $('.hyve-list-pagination-wrapper'); 1046 // list page links 1047 var paginationLinks = '<ul class="hyve-list-pagination">'; 1048 for (var i = 0; i < numberOfPages; i++) { 1049 paginationLinks += '<li class="pagItm"><span data-items="' + i * itemsPerPage + '" data-page="' + (i + 1) + '" class="hyve-list-page">' + (i + 1) + '</span></li>'; 1050 } 1051 paginationLinks += '</ul>'; 1052 // Append page links to pagination container 1053 if (numberOfPages > 1) { 1054 paginationContainer.append(paginationLinks); 1055 paginationContainer.show(); 1056 } 1057 $(".hyve-list-pagination > li:first").addClass("active"); 1058 RunPaginationTurboCutter(); 1059 } 1060} 1061 1062 1063// YL: Pagination on speaker list page 1064function AddSpeakerListPagination(speakerPerPage) { 1065 // Amount of speakers 1066 if ($('.speakers-grid').length) { 1067 var allSpeakers = parseInt($('.speakers-grid').attr('data-amount')); 1068 // Items per one page to show 1069 // var speakerPerPage = 12; 1070 // Amount of pages
1071 var speakerPagesAmount = Math.ceil(allSpeakers / speakerPerPage); 1072 // Pagination container 1073 var speakerPaginationContainer = $('.ite-speaker-list-pagination-wrapper'); 1074 // Speaker list page links 1075 var speakerPaginationLinks = '<ul class="ite-speaker-list-pagination">'; 1076 for (var i = 0; i < speakerPagesAmount; i++) { 1077 speakerPaginationLinks += '<li class="pagItm"><span data-items="' + i * speakerPerPage + '" data-page="' + (i + 1) + '" class="ite-speaker-list-page">' + (i + 1) + '</span></li>'; 1078 } 1079 speakerPaginationLinks += '</ul>'; 1080 // Append page links to pagination container 1081 if (speakerPagesAmount > 1) { 1082 speakerPaginationContainer.append(speakerPaginationLinks); 1083 speakerPaginationContainer.show(); 1084 } 1085 $(".ite-speaker-list-pagination > li:first").addClass("active"); 1086 RunSpeakerPaginationTurboCutter(); 1087 } 1088} 1089// YL: Pagination on exhibitor list page 1090function AddExhibitorListPagination(exhibitorPerPage) { 1091 // Amount of exhibitors 1092 if ($('.ite-exhibitor-list-wrapper').length) { 1093 var allExhibitors = parseInt($('.ite-exhibitor-list-wrapper').attr('data-amount')); 1094 // Items per one page to show 1095 // var exhibitorPerPage = 12; 1096 // Amount of pages 1097 var exhibitorPagesAmount = Math.ceil(allExhibitors / exhibitorPerPage); 1098 // Pagination container 1099 var exhibitorPaginationContainer = $('.ite-exhibitor-list-pagination-wrapper'); 1100 // Exhibitor list page links 1101 var exhibitorPaginationLinks = '<ul class="ite-exhibitor-list-pagination">'; 1102 for (var i = 0; i < exhibitorPagesAmount; i++) { 1103 exhibitorPaginationLinks += '<li class="pagItm"><span data-items="' + i * exhibitorPerPage + '" data-page="' + (i + 1) + '" class="ite-exhibitor-list-page">' + (i + 1) + '</span></li>'; 1104 } 1105 exhibitorPaginationLinks += '</ul>'; 1106 // Append page links to pagination container 1107 if (exhibitorPagesAmount > 1) { 1108 exhibitorPaginationContainer.append(exhibitorPaginationLinks); 1109 exhibitorPaginationContainer.show(); 1110 } 1111 $(".ite-exhibitor-list-pagination > li:first").addClass("active"); 1112 RunExhibitorPaginationTurboCutter(); 1113 } 1114} 1115 1116 1117function RunPaginationTurboCutter() { 1118 if ($('.list-page').length) { 1119 var itemsCount = parseInt($('.list-page').attr('data-total-number-items')); 1120 var itemsPerPage = parseInt($('.list-page').attr('data-items-per-page')); 1121 var numberOfPages = Math.ceil(itemsCount / itemsPerPage); 1122 1123 if (numberOfPages > 4) { 1124 $(".PaginationHelper").remove(); 1125 $(".hyve-list-pagination > li").hide(); 1126 $(".hyve-list-pagination > .active").show(); 1127 var x = $(".hyve-list-pagination > .active").prev().show().prev().show().prev().show(); 1128 var x2 = $(".hyve-list-pagination > .active").next().show().next().show().next().show(); 1129 var firstItem = $(".hyve-list-pagination > .pagItm:first").index(); 1130 var lastItem = $(".hyve-list-pagination > .pagItm:last").index(); 1131 var currentItemIndex = parseInt($(".hyve-list-pagination").find('li.active').index()); 1132 var nextItem = currentItemIndex + 1; 1133 var prevItem = currentItemIndex - 1; 1134 $(x).before("<li class='PaginationHelper'><span onclick='PagRoute(" + firstItem + ")'><i class='fas fa-angle-double-left'></i></span></li>").before("<li class='PaginationHelper'><span onclick='PagRoute(" + prevItem + ")'><i class='fas fa-angle-left'></i></span></li>"); 1135 $(x2).after("<li class='PaginationHelper'><span onclick='PagRoute(" + lastItem + ")'><i class='fas fa-angle-double-right'></i></span></li>").after("<li class='PaginationHelper'><span onclick='PagRoute(" + nextItem + ")'><i class='fas fa-angle-right'></i></span></li>"); 1136 } 1137 } 1138} 1139 1140//PW: Set pagination last/next 1141function RunExhibitorPaginationTurboCutter() { 1142 $(".PaginationHelper").remove(); 1143 $(".ite-exhibitor-list-pagination > li").hide(); 1144 $(".ite-exhibitor-list-pagination > .active").show(); 1145 var x = $(".ite-exhibitor-list-pagination > .active").prev().show().prev().show().prev().show(); 1146 var x2 = $(".ite-exhibitor-list-pagination > .active").next().show().next().show().next().show(); 1147 var firstItem = $(".ite-exhibitor-list-pagination > .pagItm:first").index(); 1148 var lastItem = $(".ite-exhibitor-list-pagination > .pagItm:last").index(); 1149 var currentItemIndex = parseInt($(".ite-exhibitor-list-pagination").find('li.active').index()); 1150 var nextItem = currentItemIndex + 1; 1151 var prevItem = currentItemIndex - 1; 1152 $(x).before("<li class='PaginationHelper'><span onclick='PagRouteExhibitor(" + firstItem + ")'><i class='fas fa-angle-double-left'></i></span></li>").before("<li class='PaginationHelper'><span onclick='PagRouteExhibitor(" + prevItem + ")'><i class='fas fa-angle-left'></i></span></li>"); 1153 $(x2).after("<li class='PaginationHelper'><span onclick='PagRouteExhibitor(" + lastItem + ")'><i class='fas fa-angle-double-right'></i></span></li>").after("<li class='PaginationHelper'><span onclick='PagRouteExhibitor(" + nextItem + ")'><i class='fas fa-angle-right'></i></span></li>"); 1154} 1155 1156function RunSpeakerPaginationTurboCutter() { 1157 $(".PaginationHelper").remove(); 1158 $(".ite-speaker-list-pagination > li").hide(); 1159 $(".ite-speaker-list-pagination > .active").show(); 1160 var x = $(".ite-speaker-list-pagination > .active").prev().show().prev().show().prev().show(); 1161 var x2 = $(".ite-speaker-list-pagination > .active").next().show().next().show().next().show(); 1162 var firstItem = $(".ite-speaker-list-pagination > .pagItm:first").index(); 1163 var lastItem = $(".ite-speaker-list-pagination > .pagItm:last").index(); 1164 var currentItemIndex = parseInt($(".ite-speaker-list-pagination").find('li.active').index()); 1165 var nextItem = currentItemIndex + 1; 1166 var prevItem = currentItemIndex - 1; 1167 $(x).before("<li class='PaginationHelper'><span onclick='PagRouteSpeaker(" + firstItem + ")'><i class='fas fa-angle-double-left'></i></span></li>").before("<li class='PaginationHelper'><span onclick='PagRouteSpeaker(" + prevItem + ")'><i class='fas fa-angle-left'></i></span></li>"); 1168 $(x2).after("<li class='PaginationHelper'><span onclick='PagRouteSpeaker(" + lastItem + ")'><i class='fas fa-angle-double-right'></i></span></li>").after("<li class='PaginationHelper'><span onclick='PagRouteSpeaker(" + nextItem + ")'><i class='fas fa-angle-right'></i></span></li>"); 1169} 1170 1171function PagRoute(index) { 1172 $(".hyve-list-page:eq(" + index + ")").click(); 1173} 1174 1175function PagRouteExhibitor(index) { 1176 $(".ite-exhibitor-list-page:eq(" + index + ")").click(); 1177} 1178 1179function PagRouteSpeaker(index) { 1180 $(".ite-speaker-list-page:eq(" + index + ")").click(); 1181} 1182 1183// YL: Show first page 1184function ShowFirstPage() { 1185 // Show only first page 1186 var itemsPerPage = parseInt($('.list-page').attr('data-items-per-page')); 1187 1188 $('.list-item').each(function () { 1189 var index = parseInt($(this).attr('data-index')); 1190 if (index <= itemsPerPage) { 1191 $(this).show(); 1192 } else { 1193 $(this).hide(); 1194 } 1195 }) 1196 // Add class 'active' to first page button 1197 $('.hyve-list-pagination > li').first().addClass('active'); 1198} 1199 1200 1201 1202function ShowFirstPageSpeakers(speakerPerPage) { 1203 // Show only first page speakers 1204 $('.speaker-box').each(function () { 1205 var index = parseInt($(this).attr('data-index')); 1206 if (index <= speakerPerPage) { 1207 $(this).show(); 1208 } else { 1209 $(this).hide(); 1210 } 1211 }) 1212 // Add class 'active' to first page button 1213 $('.ite-speaker-list-pagination > li').first().addClass('active'); 1214} 1215// YL: Show first page exhibitors 1216function ShowFirstPageExhibitors(exhibitorPerPage) { 1217 // Show only first page exhibtors 1218 $('.ite-exhibitor-list-item').each(function () { 1219 var index = parseInt($(this).attr('data-index')); 1220 if (index <= exhibitorPerPage) { 1221 $(this).show(); 1222 } else { 1223 $(this).hide(); 1224 } 1225 }) 1226 $('.ite-exhibitor-list-pagination > li').first().addClass('active'); 1227} 1228 1229 1230 1231// YL: Binding event listner on speaker list page links click 1232 1233 1234function BindListPageSwitching() { 1235 $('.hyve-list-page').click(function () { 1236 // Scroll to top of window 1237 window.scrollTo(0, $(".ite-content").offset().top); 1238 var itemsPerPage = parseInt($('.list-page').attr('data-items-per-page')); 1239 // Find active page link and remove class 'active' 1240 $(this).parents('.hyve-list-pagination').find('.active').removeClass('active'); 1241 // Add class 'active' to this page link 1242 $(this).parent().addClass('active'); 1243 // Get index of first element to show on this page 1244 var startIndex = parseInt($(this).attr('data-items')); 1245 // Show items on this page 1246 $('.list-item').each(function () { 1247 var currentIndex = parseInt($(this).attr('data-index')); 1248 if ((currentIndex > startIndex) && (currentIndex <= startIndex + itemsPerPage)) { 1249 $(this).show(); 1250 } else { 1251 $(this).hide(); 1252 } 1253 }) 1254 RunPaginationTurboCutter(); 1255 resetAgendaSpeakerCarousel(); 1256 }) 1257} 1258 1259function BindSpeakerListPageSwitching(speakerPerPage) { 1260 $('.ite-speaker-list-page').click(function () { 1261 // Scroll to top of window 1262 window.scrollTo(0, 0); 1263 // Find active page link and remove class 'active' 1264 $(this).parents('.ite-speaker-list-pagination').find('.active').removeClass('active'); 1265 // Add class 'active' to this page link 1266 $(this).parent().addClass('active'); 1267 // Get index of first element to show on this page 1268 var startIndex = parseInt($(this).attr('data-items')); 1269 // Show speakers on this page 1270 $('.speaker-box').each(function () { 1271 var currentIndex = parseInt($(this).attr('data-index')); 1272 if ((currentIndex > startIndex) && (currentIndex <= startIndex + speakerPerPage)) { 1273 $(this).show(); 1274 } else { 1275 $(this).hide(); 1276 } 1277 }) 1278 RunSpeakerPaginationTurboCutter(); 1279 }) 1280} 1281// YL: Binding event listner on exhibitor list page links click 1282function BindExhibitorListPageSwitching(exhibitorPerPage) { 1283 $('.ite-exhibitor-list-page').click(function () { 1284 // Scroll to top of window 1285 window.scrollTo(0, 0); 1286 // Find active page link and remove class 'active' 1287 $(this).parents('.ite-exhibitor-list-pagination').find('.active').removeClass('active'); 1288 // Add class 'active' to this page link 1289 $(this).parent().addClass('active'); 1290 // Get index of first element to show on this page 1291 var startIndex = parseInt($(this).attr('data-items')); 1292 // Show speakers on this page 1293 $('.ite-exhibitor-list-item').each(function () { 1294 var currentIndex = parseInt($(this).attr('data-index')); 1295 if ((currentIndex > startIndex) && (currentIndex < startIndex + exhibitorPerPage + 1)) { 1296 $(this).show(); 1297 } else { 1298 $(this).hide(); 1299 } 1300 }) 1301 RunExhibitorPaginationTurboCutter(); 1302 }) 1303} 1304// YL: Filter by date, country and category on speaker list page 1305//$('#speaker-filter-date').on('change', function () { 1306// var filterDate = $('#speaker-filter-date').val(); 1307// var filterCountry = $('#speaker-filter-country').val(); 1308// var filterCategory = $('#speaker-filter-category').val(); 1309// if (filterDate != 0) { 1310// $('.ite-speaker-list-item').each(function () { 1311// var speakerDate = $(this).attr('data-filter-date'); 1312// var speakerCountry = $(this).attr('data-filter-country'); 1313// var speakerCategory = $(this).attr('data-filter-category').split(/\|/); 1314// if (speakerDate.indexOf(filterDate) >= 0) { 1315// if ((filterCountry == speakerCountry) || (filterCountry == 0)
1315) { 1316// if ((speakerCategory.indexOf(filterCategory) >= 0) || (filterCategory == 0)) { 1317// $(this).show(); 1318// } else { 1319// $(this).hide(); 1320// } 1321// } else { 1322// $(this).hide(); 1323// } 1324// } else { 1325// $(this).hide(); 1326// } 1327// }) 1328// $('.ite-speaker-list-pagination-wrapper').hide(); 1329// if ($('.ite-speaker-list-wrapper').children(':visible').length == 0) { 1330// $('.ite-speaker-list-empty').show(); 1331// } else { 1332// $('.ite-speaker-list-empty').hide(); 1333// } 1334// } else { 1335// if ((filterCategory == 0) && (filterCountry == 0)) { 1336// $('.ite-speaker-list-pagination-wrapper').show(); 1337// ShowFirstPageSpeakers(speakerPageDisplayAmount); 1338// } else { 1339// $('#speaker-filter-country').trigger('change'); 1340// $('#speaker-filter-category').trigger('change'); 1341// } 1342// } 1343//}) 1344//$('#speaker-filter-country').on('change', function () { 1345// // Get speaker list filter values 1346// var filterDate = $('#speaker-filter-date').val(); 1347// var filterCountry = $('#speaker-filter-country').val(); 1348// var filterCategory = $('#speaker-filter-category').val(); 1349// if (filterCountry != 0) { 1350// $('.ite-speaker-list-item').each(function () { 1351// var speakerDate = $(this).attr('data-filter-date'); 1352// var speakerCountry = $(this).attr('data-filter-country'); 1353// var speakerCategory = $(this).attr('data-filter-category').split(/\|/); 1354// if (filterCountry == speakerCountry) { 1355// if ((speakerDate.indexOf(filterDate) >= 0) || (filterDate == 0)) { 1356// if (speakerCategory.indexOf(filterCategory) >= 0 || (filterCategory == 0)) { 1357// $(this).show(); 1358// } else { 1359// $(this).hide(); 1360// } 1361// } else { 1362// $(this).hide(); 1363// } 1364// } else { 1365// $(this).hide(); 1366// } 1367// }) 1368// $('.ite-speaker-list-pagination-wrapper').hide(); 1369// if ($('.ite-speaker-list-wrapper').children(':visible').length == 0) { 1370// $('.ite-speaker-list-empty').show(); 1371// } else { 1372// $('.ite-speaker-list-empty').hide(); 1373// } 1374// } else { 1375// if ((filterDate == 0) && (filterCategory == 0)) { 1376// $('.ite-speaker-list-pagination-wrapper').show(); 1377// ShowFirstPageSpeakers(speakerPageDisplayAmount); 1378// } else { 1379// $('#speaker-filter-date').trigger('change'); 1380// $('#speaker-filter-category').trigger('change'); 1381// } 1382// } 1383//}) 1384 1385 1386//$('#speaker-filter-category').on('change', function () { 1387// // Get speaker list filter values 1388// var filterDate = $('#speaker-filter-date').val(); 1389// var filterCountry = $('#speaker-filter-country').val(); 1390// var filterCategory = $('#speaker-filter-category').val(); 1391// if (filterCategory != 0) { 1392// $('.ite-speaker-list-item').each(function () { 1393// var speakerDate = $(this).attr('data-filter-date'); 1394// var speakerCountry = $(this).attr('data-filter-country'); 1395// var speakerCategory = $(this).attr('data-filter-category').split(/\|/); 1396// if (speakerCategory.indexOf(filterCategory) >= 0) { 1397// if ((speakerDate.indexOf(filterDate) != 0) || (filterDate == 0)) { 1398// if ((filterCountry == speakerCountry) || (filterCountry == 0)) { 1399// $(this).show(); 1400// } else { 1401// $(this).hide(); 1402// } 1403// } else { 1404// $(this).hide(); 1405// } 1406// } else { 1407// $(this).hide(); 1408// } 1409// }) 1410// $('.ite-speaker-list-pagination-wrapper').hide(); 1411// if ($('.ite-speaker-list-wrapper').children(':visible').length == 0) { 1412// $('.ite-speaker-list-empty').show();
1413// } else { 1414// $('.ite-speaker-list-empty').hide(); 1415// } 1416// } else { 1417// if ((filterDate == 0) && (filterCountry == 0)) { 1418// $('.ite-speaker-list-pagination-wrapper').show(); 1419// ShowFirstPageSpeakers(speakerPageDisplayAmount); 1420// } else { 1421// $('#speaker-filter-date').trigger('change'); 1422// $('#speaker-filter-country').trigger('change'); 1423// } 1424// } 1425//}) 1426//$('#speaker-filter-name').on('keyup', function () { 1427// var filterName = $(this).val(); 1428// $('.speaker-box').each(function () { 1429// if ($(this).find('.ite-speaker-name > a, .ite-speaker-job, .ite-speaker-company').text().search(new RegExp(filterName, 'i')) < 0) { 1430// $(this).hide(); 1431// } else { 1432// $(this).show(); 1433// } 1434// }) 1435// if ($('.ite-speaker-list-wrapper').children(':visible').length == 0) { 1436// $('.ite-speaker-list-empty').show(); 1437// } else { 1438// $('.ite-speaker-list-empty').hide(); 1439// } 1440// RunSpeakerPaginationTurboCutter(); 1441//}) 1442 1443// YL: Filter by category and country on exhibitor list page 1444$('#exhibitor-filter-country').on('change', function () { 1445 // Get exhibitor list filter values 1446 var filterCountry = $('#exhibitor-filter-country').val(); 1447 var filterCategory = $('#exhibitor-filter-category').val(); 1448 if (filterCountry != 0) { 1449 $('.ite-exhibitor-list-item').each(function () { 1450 var exhibitorCountry = $(this).attr('data-filter-country'); 1451 var exhibitorCategory = $(this).attr('data-filter-category'); 1452 if (filterCountry == exhibitorCountry) { 1453 if ((filterCategory == exhibitorCategory) || (filterCategory == 0)) { 1454 $(this).show(); 1455 } else { 1456 $(this).hide(); 1457 } 1458 } else { 1459 $(this).hide(); 1460 } 1461 }) 1462 $('.ite-exhibitor-list-pagination-wrapper').hide(); 1463 if ($('.ite-exhibitor-list-wrapper').children(':visible').length == 0) { 1464 $('.ite-exhibitor-list-empty').show(); 1465 } else { 1466 $('.ite-exhibitor-list-empty').hide(); 1467 } 1468 } else { 1469 if (filterCategory == 0) { 1470 $('.ite-exhibitor-list-pagination-wrapper').show(); 1471 ShowFirstPageExhibitors(12); 1472 } else { 1473 $('#exhibitor-filter-category').trigger('change'); 1474 } 1475 } 1476}) 1477$('#exhibitor-filter-category').on('change', function () { 1478 // Get exhibitor list filter values 1479 var filterCountry = $('#exhibitor-filter-country').val(); 1480 var filterCategory = $('#exhibitor-filter-category').val(); 1481 if (filterCategory != 0) { 1482 $('.ite-exhibitor-list-item').each(function () { 1483 var exhibitorCountry = $(this).attr('data-filter-country'); 1484 var exhibitorCategory = $(this).attr('data-filter-category'); 1485 if (filterCategory == exhibitorCategory) { 1486 if ((filterCountry == exhibitorCountry) || (filterCountry == 0)) { 1487 $(this).show(); 1488 } else { 1489 $(this).hide(); 1490 } 1491 } else { 1492 $(this).hide(); 1493 } 1494 }) 1495 $('.ite-exhibitor-list-pagination-wrapper').hide(); 1496 if ($('.ite-exhibitor-list-wrapper').children(':visible').length == 0) { 1497 $('.ite-exhibitor-list-empty').show(); 1498 } else { 1499 $('.ite-exhibitor-list-empty').hide(); 1500 } 1501 } else { 1502 if (filterCountry == 0) { 1503 $('.ite-exhibitor-list-pagination-wrapper').show(); 1504 ShowFirstPageExhibitors(12); 1505 } else { 1506 $('#exhibitor-filter-country').trigger('change'); 1507 } 1508 } 1509}) 1510 1511// RC - filters for junior mi companies 1512$('#micompanies-filter-status, #micompanies-filter-location, #micompanies-filter-commodity').on('change', function () { 1513 $('.ite-exhibitor-list-item').show(); 1514 // Get exhibitor list filter values 1515 var filterStatus = $('#micompanies-filter-status').val(); 1516 var filterLocation = $('#micompanies-filter-location').val().replace("'", "\\'"); 1517 var filterCommodity = $('#micompanies-filter-commodity').val(); 1518 1519 if (filterStatus != 0 || filterLocation != 0 || filterCommodity != 0) { 1520 1521 var elements = $('.ite-exhibitor-list-item'); 1522 1523 if (filterStatus != 0) { 1524 elements = elements.filter("[data-filter-status='" + filterStatus + "']"); 1525 } 1526 if (filterLocation != 0) { 1527 elements = elements.filter("[data-filter-location*='" + filterLocation + "']"); 1528 } 1529 if (filterCommodity != 0) { 1530 elements = elements.filter("[data-filter-commodity*='" + filterCommodity + "']"); 1531 } 1532 1533 $('.ite-exhibitor-list-item').not(elements).hide(); 1534 1535 $('.ite-exhibitor-list-pagination-wrapper').hide(); 1536 if ($('.ite-exhibitor-list-wrapper').children(':visible').length == 0) { 1537 $('.ite-exhibitor-list-empty').show(); 1538 } else { 1539 $('.ite-exhibitor-list-empty').hide(); 1540 } 1541 } else { 1542 $('.ite-exhibitor-list-pagination-wrapper').show(); 1543 ShowFirstPageExhibitors(16); 1544 } 1545}) 1546 1547// note the exhibitor classes have been used on the sponsor list 1548$('#sponsor-filter-category').on('change', function () { 1549 // Get exhibitor list filter values 1550 var filterCategory = $('#sponsor-filter-category').val(); 1551 if (filterCategory != 0) { 1552 $('.ite-exhibitor-list-item').each(function () { 1553 var exhibitorCategory = $(this).attr('data-filter-category'); 1554 if (filterCategory == exhibitorCategory) { 1555 $(this).show(); 1556 } else { 1557 $(this).hide(); 1558 } 1559 }) 1560 $('.ite-exhibitor-list-pagination-wrapper').hide(); 1561 if ($('.ite-exhibitor-list-wrapper').children(':visible').length == 0) { 1562 $('.ite-exhibitor-list-empty').show(); 1563 } else { 1564 $('.ite-exhibitor-list-empty').hide(); 1565 } 1566 } else { 1567 $('.ite-exhibitor-list-pagination-wrapper').show(); 1568 ShowFirstPageExhibitors(12); 1569 } 1570}) 1571 1572var accentMap = { "áº": "a", "Ã": "a", "á": "a", "Ã": "a", "à ": "a", "Ä": "a", "Ä": "a", "Ắ": "a", "ắ": "a", "Ằ": "a", "ằ": "a", "Ẵ": "a", "ẵ": "a", "Ẳ": "a", "ẳ": "a", "Ã": "a", "â": "a", "Ấ": "a", "ấ": "a", "Ầ": "a", "ầ": "a", "Ẫ": "a", "ẫ": "a", "Ẩ": "a", "ẩ": "a", "Ç": "a", "Ç": "a", "à ": "a", "Ã¥": "a", "Ǻ": "a", "Ç»": "a", "Ã": "a", "ä": "a", "Ç": "a", "Ç": "a", "Ã": "a", "ã": "a", "Ȧ": "a", "ȧ": "a", "Ç ": "a", "Ç¡": "a", "Ä": "a", "Ä ": "a", "Ä": "a", "Ä": "a", "Ả": "a", "ả": "a", "È": "a", "È": "a", "È": "a", "È": "a", "Ạ": "a", "ạ": "a", "Ặ": "a", "ặ": "a", "Ậ": "a", "áº": "a", "á¸": "a", "á¸": "a", "Ⱥ": "a", "â±¥": "a", "Ǽ": "a", "ǽ": "a", "Ç¢": "a", "Ç£": "a", "á¸": "b", "á¸": "b", "á¸": "b", "Ḡ": "b", "á¸": "b", "á¸": "b", "É": "b", "Æ": "b", "ᵬ": "b", "Æ": "b", "É": "b", "Æ": "b", "Æ": "b", "Ä": "c", "Ä": "c", "Ä": "c", "Ä"
1572: "c", "Ä": "c", "Ä": "c", "Ä": "c", "Ä": "c", "Ã": "c", "ç": "c", "á¸": "c", "á¸": "c", "È»": "c", "ȼ": "c", "Æ": "c", "Æ": "c", "É": "c", "Ä": "d", "Ä": "d", "á¸": "d", "á¸": "d", "á¸": "d", "á¸": "d", "á¸": "d", "á¸": "d", "á¸": "d", "á¸": "d", "á¸": "d", "á¸": "d", "Ä": "d", "Ä": "d", "áµ": "d", "Æ": "d", "É": "d", "Æ": "d", "É": "d", "Æ": "d", "Æ": "d", "È¡": "d", "ð": "d", "Ã": "e", "Æ": "e", "Æ": "e", "Ç": "e", "é": "e", "Ã": "e", "è": "e", "Ä": "e", "Ä": "e", "Ã": "e", "ê": "e", "Ế": "e", "ế": "e", "á»": "e", "á»": "e", "á»": "e", "á»
": "e", "á»": "e", "á»": "e", "Ä": "e", "Ä": "e", "Ã": "e", "ë": "e", "Ẽ": "e", "ẽ": "e", "Ä": "e", "Ä": "e", "Ȩ": "e", "È©": "e", "á¸": "e", "á¸": "e", "Ä": "e", "Ä": "e", "Ä": "e", "Ä": "e", "á¸": "e", "á¸": "e", "á¸": "e", "á¸": "e", "Ẻ": "e", "ẻ": "e", "È": "e", "È
": "e", "È": "e", "È": "e", "Ẹ": "e", "ẹ": "e", "á»": "e", "á»": "e", "á¸": "e", "á¸": "e", "á¸": "e", "á¸": "e", "É": "e", "É": "e", "É": "e", "É": "e", "á¸": "f", "á¸": "f", "áµ®": "f", "Æ": "f", "Æ": "f", "Ç´": "g", "ǵ": "g", "Ä": "g", "Ä": "g", "Ä": "g", "Ä": "g", "Ǧ": "g", "ǧ": "g", "Ä ": "g", "Ä¡": "g", "Ä¢": "g", "Ä£": "g", "Ḡ": "g", "ḡ": "g", "Ǥ": "g", "Ç¥": "g", "Æ": "g", "É ": "g", "Ĥ": "h", "Ä¥": "h", "È": "h", "È": "h", "Ḧ": "h", "ḧ": "h", "Ḣ": "h", "ḣ": "h", "Ḩ": "h", "ḩ": "h", "Ḥ": "h", "ḥ": "h", "Ḫ": "h", "ḫ": "h", H: "h", "̱": "h", "áº": "h", "Ħ": "h", "ħ": "h", "â±§": "h", "ⱨ": "h", "Ã": "i", "Ã": "i", "Ã": "i", "ì": "i", "Ĭ": "i", "Ä": "i", "Ã": "i", "î": "i", "Ç": "i", "Ç": "i", "Ã": "i", "ï": "i", "Ḯ": "i", "ḯ": "i", "Ĩ": "i", "Ä©": "i", "İ": "i", i: "i", "Ä®": "i", "į": "i", "Ī": "i", "Ä«": "i", "á»": "i", "á»": "i", "È": "i", "È": "i", "È": "i", "È": "i", "á»": "i", "á»": "i", "Ḭ": "i", "á¸": "i", I: "i", "ı": "i", "Æ": "i", "ɨ": "i", "Ä´": "j", "ĵ": "j", J: "j", "Ì": "j", "ǰ": "j", "È·": "j", "É": "j", "É": "j", "Ê": "j", "É": "j", "Ê": "j", "Ḱ": "k", "ḱ": "k", "Ǩ": "k", "Ç©": "k", "Ķ": "k", "Ä·": "k", "Ḳ": "k", "ḳ": "k", "Ḵ": "k", "ḵ": "k", "Æ": "k", "Æ": "k", "Ⱪ": "k", "ⱪ": "k", "Ĺ": "a", "ĺ": "l", "Ľ": "l", "ľ": "l", "Ä»": "l", "ļ": "l", "Ḷ": "l", "ḷ": "l", "Ḹ": "l", "ḹ": "l", "Ḽ": "l", "ḽ": "l", "Ḻ": "l", "ḻ": "l", "Å": "l", "Å": "l", "Å": "l", "Ì£": "l", "Å": "l", "Ì£": "l", "Ä¿": "l", "Å": "l", "Ƚ": "l", "Æ": "l", "â± ": "l", "ⱡ": "l", "â±¢": "l", "É«": "l", "ɬ": "l", "É": "l", "È´": "l", "Ḿ": "m", "ḿ": "m", "á¹": "m", "á¹": "m", "á¹": "m", "á¹": "m", "ɱ": "m", "Å": "n", "Å": "n", "Ǹ": "n", "ǹ": "n", "Å": "n", "Å": "n", "Ã": "n", "ñ": "n", "á¹": "n", "á¹
": "n", "Å
": "n", "Å": "n", "á¹": "n", "á¹": "n", "á¹": "n", "á¹": "n", "á¹": "n", "á¹": "n", "Æ": "n", "ɲ": "n", "È ": "n", "Æ": "n", "ɳ": "n", "ȵ": "n", N: "n", "Ì": "n", n: "n", "Ì": "n", "Ã": "o", "ó": "o", "Ã": "o", "ò": "o", "Å": "o", "Å": "o", "Ã": "o", "ô": "o", "á»": "o", "á»": "o", "á»": "o", "á»": "o", "á»": "o", "á»": "o", "á»": "o", "á»": "o", "Ç": "o", "Ç": "o", "Ã": "o", "ö": "o", "Ȫ": "o", "È«": "o", "Å": "o", "Å": "o", "Ã": "o", "õ": "o", "á¹": "o", "á¹": "o", "á¹": "o", "á¹": "o", "Ȭ": "o", "È": "o", "È®": "o", "ȯ": "o", "Ȱ": "o", "ȱ": "o", "Ã": "o", "ø": "o", "Ǿ": "o", "Ç¿": "o", "Ǫ": "o", "Ç«": "o", "Ǭ": "o", "Ç": "o", "Å": "o", "Å": "o", "á¹": "o", "á¹": "o", "á¹": "o", "á¹": "o", "á»": "o", "á»": "o", "È": "o", "È": "o", "È": "o", "È": "o", "Æ ": "o", "Æ¡": "o", "á»": "o", "á»": "o", "á»": "o", "á»": "o", "á» ": "o", "ỡ": "o", "á»": "o", "á»": "o", "Ợ": "o", "ợ": "o", "á»": "o", "á»": "o", "á»": "o", "á»": "o", "Æ": "o", "ɵ": "o", "á¹": "p", "á¹": "p", "á¹": "p", "á¹": "p", "â±£": "p", "Ƥ": "p", "Æ¥": "p", P: "p", "Ì": "p", p: "p", "Ì": "p", "Ê ": "q", "É": "q", "É": "q", "Å": "r", "Å": "r", "Å": "r", "Å": "r", "á¹": "r", "á¹": "r", "Å": "r", "Å": "r", "È": "r", "È": "r", "È": "r", "È": "r", "á¹": "r", "á¹": "r", "á¹": "r", "á¹": "r", "á¹": "r", "á¹": "r", "É": "r", "É": "r", "áµ²": "r", "ɼ": "r", "Ɽ": "r", "ɽ": "r", "ɾ": "r", "áµ³": "r", "Ã": "s", "Å": "s", "Å": "s", "Ṥ": "s", "á¹¥": "s", "Å": "s", "Å": "s", "Å ": "s", "Å¡": "s", "Ṧ": "s", "á¹§": "s", "á¹ ": "s", "ṡ": "s", "áº": "s", "Å": "s", "Å": "s", "á¹¢": "s", "á¹£": "s", "Ṩ": "s", "ṩ": "s", "È": "s", "È": "s", "Ê": "s", S: "s", "Ì©": "s", s: "s", "Ì©": "s", "Ã": "t", "þ": "t", "Ť": "t", "Å¥": "t", T: "t", "Ì": "t", "áº": "t", "Ṫ": "t", "ṫ": "t", "Å¢": "t", "Å£": "t", "Ṭ": "t", "á¹": "t", "È": "t", "È": "t", "á¹°": "t", "á¹±": "t", "á¹®": "t", "ṯ": "t", "Ŧ": "t", "ŧ": "t", "Ⱦ": "t", "ⱦ": "t", "áµµ": "t", "Æ«": "t", "Ƭ"
1572: "t", "Æ": "t", "Æ®": "t", "Ê": "t", "ȶ": "t", "Ã": "u", "ú": "u", "Ã": "u", "ù": "u", "Ŭ": "u", "Å": "u", "Ã": "u", "û": "u", "Ç": "u", "Ç": "u", "Å®": "u", "ů": "u", "Ã": "u", "ü": "u", "Ç": "u", "Ç": "u", "Ç": "u", "Ç": "u", "Ç": "u", "Ç": "u", "Ç": "u", "Ç": "u", "Ű": "u", "ű": "u", "Ũ": "u", "Å©": "u", "Ṹ": "u", "á¹¹": "u", "Ų": "u", "ų": "u", "Ū": "u", "Å«": "u", "Ṻ": "u", "á¹»": "u", "Ủ": "u", "á»§": "u", "È": "u", "È": "u", "È": "u", "È": "u", "Ư": "u", "ư": "u", "Ứ": "u", "ứ": "u", "Ừ": "u", "ừ": "u", "á»®": "u", "ữ": "u", "Ử": "u", "á»": "u", "á»°": "u", "á»±": "u", "Ụ": "u", "ụ": "u", "á¹²": "u", "á¹³": "u", "á¹¶": "u", "á¹·": "u", "á¹´": "u", "á¹µ": "u", "É": "u", "Ê": "u", "á¹¼": "v", "á¹½": "v", "á¹¾": "v", "ṿ": "v", "Ʋ": "v", "Ê": "v", "áº": "w", "áº": "w", "áº": "w", "áº": "w", "Å´": "w", "ŵ": "w", W: "w", "Ì": "w", "áº": "w", "áº": "w", "Ạ": "w", "áº": "w", "áº": "w", "áº": "w", "áº": "w", "áº": "x", "áº": "x", "áº": "x", "áº": "x", "Ã": "y", "ý": "y", "Ỳ": "y", "ỳ": "y", "Ŷ": "y", "Å·": "y", Y: "y", "Ì": "y", "áº": "y", "Ÿ": "y", "ÿ": "y", "Ỹ": "y", "ỹ": "y", "áº": "y", "áº": "y", "Ȳ": "y", "ȳ": "y", "á»¶": "y", "á»·": "y", "á»´": "y", "ỵ": "y", "Ê": "y", "É": "y", "É": "y", "Ƴ": "y", "Æ´": "y", "Ź": "z", "ź": "z", "áº": "z", "áº": "z", "Ž": "z", "ž": "z", "Å»": "z", "ż": "z", "áº": "z", "áº": "z", "áº": "z", "áº": "z", "Ƶ": "z", "ƶ": "z", "Ȥ": "z", "È¥": "z", "Ê": "z", "Ê": "z", "Ⱬ": "z", "ⱬ": "z", "Ç®": "z", "ǯ": "z", "ƺ": "z", "ï¼": "2", "ï¼": "6", "ï¼¢": "B", "F": "F", "J": "J", "ï¼®": "N", "ï¼²": "R", "ï¼¶": "V", "Z": "Z", "ï½": "b", "ï½": "f", "ï½": "j", "ï½": "n", "ï½": "r", "ï½": "v", "ï½": "z", "ï¼": "1", "ï¼": "5", "ï¼": "9", "A": "A", "ï¼¥": "E", "I": "I", "ï¼": "M", "ï¼±": "Q", "ï¼µ": "U", "ï¼¹": "Y", "ï½": "a", "ï½ ": "e", "ï½": "i", "ï½": "m", "ï½": "q", "ï½": "u", "ï½": "y", "ï¼": "0", "ï¼": "4", "ï¼": "8", "D": "D", "H": "H", "L": "L", "ï¼°": "P", "ï¼´": "T", "X": "X", "ï½": "d", "ï½": "h", "ï½": "l", "ï½": "p", "ï½": "t", "ï½": "x", "ï¼": "3", "ï¼": "7", "ï¼£": "C", "ï¼§": "G", "K": "K", "O": "O", "ï¼³": "S", "ï¼·": "W", "ï½": "c", "ï½": "g", "ï½": "k", "ï½": "o", "ï½": "s", "ï½": "w" }; 1573var normalize = function (term) { 1574 var ret = ""; 1575 for (var i = 0; i < term.length; i++) { 1576 ret += accentMap[term.charAt(i)] || term.charAt(i); 1577 } 1578 return ret; 1579}; 1580 1581$(function () { 1582 var names = []; 1583 1584 $("a.ite-exhibitor-link,a.ite-exhibitor-fashion-link").each(function (index) { 1585 names[index] = $(this).attr("title"); 1586 }); 1587 1588 $("#exhibitor-filter-name").autocomplete({ 1589 source: function (request, response) { 1590 var matcher = new RegExp($.ui.autocomplete.escapeRegex(request.term), "i"); 1591 response($.grep(names, function (value) { 1592 value = value.label || value.value || value; 1593 return matcher.test(value) || matcher.test(normalize(value)); 1594 })); 1595 }, 1596 change: function (event, ui) { 1597 $('#exhibitor-filter-name').trigger(jQuery.Event('keyup', { keycode: 13 })); 1598 //console.log("changed"); 1599 }, 1600 close: function (event, ui) { 1601 $('#exhibitor-filter-name').trigger(jQuery.Event('keyup', { keycode: 13 })); 1602 //console.log("closed"); 1603 } 1604 }) 1605 .on("autocompleteselect", function (e, ui) { 1606 //console.log(ui.item.label); 1607 //$('#exhibitor-filter-name').trigger(jQuery.Event('keyup', { keycode: 13 })); 1608 //$("#exhibitor-filter-name").data("ui-autocomplete")._trigger("change"); 1609 1610 }); 1611}); 1612 1613$('#exhibitor-filter-name').on('keyup', function () { 1614 var filterName = $(this).val(); 1615 var name = filterName.replace(/([-,.â¬~!@#$%^&*()_+=`{}\[\]\|\\:;'<>])+/g, ''); 1616 $('.ite-exhibitor-list-item').each(function () { 1617 if (normalize($(this).find('.ite-exhibitor-name > a,.ite-centered > a').text() 1618 .replace(/([-,.â¬~!@#$%^&*()_+=`{}\[\]\|\\:;'<>])+/g, '')) 1619 .search(new RegExp(normalize(name), 'i')) < 0) { 1620 $(this).hide(); 1621 } else { 1622 $(this).show(); 1623 } 1624 }) 1625 if ($('.ite-exhibitor-list-wrapper').children(':visible').length == 0) { 1626 $('.ite-exhibitor-list-empty').show(); 1627 } else { 1628 $('.ite-exhibitor-list-empty').hide(); 1629 } 1630}) 1631 1632 1633$(function () { 1634 var names = []; 1635 1636 $("#ite-sponsor-link").each(function (index) { 1637 names[index] = $(this).attr("title"); 1638 });
1639 1640 $("#sponsor-filter-name").autocomplete({ 1641 source: function (request, response) { 1642 var matcher = new RegExp($.ui.autocomplete.escapeRegex(request.term), "i"); 1643 response($.grep(names, function (value) { 1644 value = value.label || value.value || value; 1645 return matcher.test(value) || matcher.test(normalize(value)); 1646 })); 1647 }, 1648 change: function (event, ui) { 1649 $('#sponsor-filter-name').trigger(jQuery.Event('keyup', { keycode: 13 })); 1650 //console.log("changed"); 1651 }, 1652 close: function (event, ui) { 1653 $('#sponsor-filter-name').trigger(jQuery.Event('keyup', { keycode: 13 })); 1654 //console.log("closed"); 1655 } 1656 }) 1657 .on("autocompleteselect", function (e, ui) { 1658 //console.log(ui.item.label); 1659 //$('#exhibitor-filter-name').trigger(jQuery.Event('keyup', { keycode: 13 })); 1660 //$("#exhibitor-filter-name").data("ui-autocomplete")._trigger("change"); 1661 1662 }); 1663}); 1664 1665$('#sponsor-filter-name').on('keyup', function () { 1666 var filterName = $(this).val(); 1667 $('.ite-sponsor-box').each(function () { 1668 if (normalize($(this).find('#ite-sponsor-name, #ite-sponsor-type, #ite-sponsor-stand').text()).search(new RegExp(normalize(filterName), 'i')) < 0) { 1669 $(this).hide(); 1670 } else { 1671 $(this).show(); 1672 } 1673 }) 1674 1675 $('.sponsor-type-header').each(function () { 1676 var headerIndex = parseInt($(this).attr('data-index')); 1677 var itemCount = parseInt($(this).attr('data-sponsorsByType-count')); 1678 1679 var itemsInRange = $('.ite-sponsor-box[data-index]').filter(function () { 1680 var itemIndex = parseInt($(this).attr('data-index')); 1681 return itemIndex >= headerIndex && itemIndex <= headerIndex + itemCount && $(this).is(':visible'); 1682 }).length > 0; 1683 1684 if (!itemsInRange) { 1685 $(this).hide(); 1686 } else { 1687 $(this).show(); 1688 } 1689 1690 }); 1691 1692 if ($('.sponsor-grid').children(':visible').length == 0) { 1693 $('.ite-sponsor-list-empty').show(); 1694 } else { 1695 $('.ite-sponsor-list-empty').hide(); 1696 } 1697}) 1698 1699$('#partner-filter-name').on('keyup', function () { 1700 var filterName = $(this).val(); 1701 $('.partner-box').each(function () { 1702 if (normalize($(this).find('#ite-partner-name, #ite-partner-type, #ite-partner-stand').text()).search(new RegExp(normalize(filterName), 'i')) < 0) { 1703 $(this).hide(); 1704 } else { 1705 $(this).show(); 1706 } 1707 }); 1708 1709 $('.partner-type-header').each(function () { 1710 var headerIndex = parseInt($(this).attr('data-index')); 1711 var itemCount = parseInt($(this).attr('data-partnersByType-count')); 1712 1713 var itemsInRange = $('.partner-box[data-index]').filter(function () { 1714 var itemIndex = parseInt($(this).attr('data-index')); 1715 return itemIndex >= headerIndex && itemIndex <= headerIndex + itemCount && $(this).is(':visible'); 1716 }).length > 0; 1717 1718 if (!itemsInRange) { 1719 $(this).hide(); 1720 } else { 1721 $(this).show(); 1722 } 1723 1724 }); 1725 1726 if ($('.partner-grid').children(':visible').length == 0) { 1727 $('.ite-partner-list-empty').show(); 1728 } else { 1729 $('.ite-partner-list-empty').hide(); 1730 } 1731}) 1732 1733//var e = $.Event("keypress", { which: 13 }); 1734 1735//$('.ui-autocomplete-input').on('click', '.ui-menu-item-wrapper', function () { 1736// $('#exhibitor-filter-name').trigger(e); 1737//}); 1738 1739//$(".ui-menu-item-wrapper").click(function () { 1740// console.log("Handler for .click() called."); 1741//}); 1742 1743// RC add exhibition label filter 1744$('.ite-exhibitor-label').on('click', function () { 1745 var selectedLabelId = $(this).data('value'); 1746 var labelToggle = $('#ite-exhibitor-list').data('toggle-labels'); 1747 $('#exhibitor-filter-category').val(0); 1748 $('#exhibitor-filter-country').val(0); 1749 $('.ite-exhibitor-list-item').each(function () { 1750 var labelId = $(this).data('filter-label'); 1751 if (labelId == selectedLabelId || labelToggle == 'all') { 1752 $(this).show(); 1753 } else { 1754 $(this).hide(); 1755 } 1756 }) 1757 1758 if (labelToggle == 'all') { 1759 $('#ite-exhibitor-list').data('toggle-labels', 'filter'); 1760 } 1761 else { 1762 $('#ite-exhibitor-list').data('toggle-labels', 'all'); 1763 } 1764 1765 $('.ite-exhibitor-list-pagination-wrapper').hide(); 1766 if ($('.ite-exhibitor-list-wrapper').children(':visible').length == 0) { 1767 $('.ite-exhibitor-list-empty').show(); 1768 } else { 1769 $('.ite-exhibitor-list-empty').hide(); 1770 } 1771}) 1772 1773// exhibitor tab control 1774$('.exhibitor-tab-btn').on('click', function () { 1775 $('.exhibitor-tab-btn').each(function () { 1776 $(this).removeClass('active'); 1777 }) 1778 $(this).addClass('active'); 1779 var selectedTab = $(this).attr('data-exhibitor-tab'); 1780 $('.ite-exhibitor-tab').each(function () { 1781 var exhibitorTab = $(this).attr('data-exhibitor-tab'); 1782 if (selectedTab != "") { 1783 if (selectedTab == exhibitorTab) { 1784 $(this).show(); 1785 } else { 1786 $(this).hide(); 1787 } 1788 } 1789 }) 1790}) 1791 1792 1793$('.enhanced-tab-btn').on('click', function () { 1794 $('.enhanced-tab-btn').each(function () { 1795 $(this).removeClass('active'); 1796 }) 1797 $(this).addClass('active'); 1798 var selectedTab = $(this).attr('data-enhanced-tab'); 1799 $('.ite-enhanced-tab').each(function () { 1800 var enhancedTab = $(this).attr('data-enhanced-tab'); 1801 if (selectedTab != "") { 1802 if (selectedTab == enhancedTab) { 1803 $(this).show(); 1804 } else { 1805 $(this).hide(); 1806 } 1807 } 1808 }) 1809}) 1810 1811function ExhibitorTabInitialise() { 1812 $('.exhibitor-tab-btn').first().trigger('click'); 1813} 1814 1815function EnhancedTabInitialise() { 1816 $('.enhanced-tab-btn').first().trigger('click'); 1817} 1818 1819// filter partner controls 1820$('#partner-filter-category').on('change', function () { 1821 // Get partner list filter values 1822 var filterCategory = $('#partner-filter-category').val(); 1823 $('.ite-exhibitor-list-item').each(function () { 1824 var exhibitorCategory = $(this).attr('data-filter-category'); 1825 if (filterCategory == exhibitorCategory || (filterCategory == 0)) { 1826 $(this).show(); 1827 } else { 1828 $(this).hide(); 1829 } 1830 }) 1831 $('.ite-exhibitor-list-pagination-wrapper').hide(); 1832 if ($('.ite-exhibitor-list-wrapper').children(':visible').length == 0) { 1833 $('.ite-exhibitor-list-empty').show(); 1834 } else { 1835 $('.ite-exhibitor-list-empty').hide(); 1836 } 1837}) 1838$('#partner-filter-name').on('keyup', function () { 1839 var filterName = $(this).val(); 1840 $('.ite-exhibitor-list-item').each(function () { 1841 if ($(this).find('.ite-exhibitor-name > a').text().search(new RegExp(filterName, 'i')) < 0) { 1842 $(this).hide(); 1843 } else { 1844 $(this).show(); 1845 } 1846 }) 1847 if ($('.ite-exhibitor-list-wrapper').children(':visible').length == 0) { 1848 $('.ite-exhibitor-list-empty').show(); 1849 } else { 1850 $('.ite-exhibitor-list-empty').hide(); 1851 } 1852}) 1853 1854// YL: Filter on Business programme Events agenda 1855// Filter events by date 1856$('.ite-events-agenda__filter__date').on('click', function () { 1857 $('.ite-events-agenda__filter__date').each(function () { 1858 $(this).removeClass('active'); 1859 }) 1860 $(this).addClass('active'); 1861 var date = $(this).attr('data-event-date'); 1862 $('.ite-events-agenda__filter__event').each(function () { 1863 var eventDate = $(this).attr('data-event-date'); 1864 if (eventDate == date) { 1865 $(this).closest('div').show(); 1866 } else { 1867 $(this).closest('div').hide(); 1868 } 1869 }) 1870}) 1871 1872// Display active event information 1873$('.ite-events-agenda__filter__event').on('click', function () { 1874 $('.ite-events-agenda__filter__event').each(function () { 1875 $(this).removeClass('active'); 1876 }) 1877 $(this).addClass('active'); 1878 var filterEventID = $(this).attr('data-event-id'); 1879 $('.ite-event__container').each(function () { 1880 var eventID = $(this).attr('data-event-id'); 1881 if (eventID == filterEventID) { 1882 $(this).closest('div').show(); 1883 $(this).addClass('active'); 1884 } else { 1885 $(this).closest('div').hide(); 1886 $(this).removeClass('active'); 1887 } 1888 }) 1889}) 1890 1891// YL: Popover initialize 1892function PopoverInitialize() { 1893 $('[data-toggle="popover"]').each(function () { 1894 $(this).popover(); 1895 });
1896} 1897$('.agenda-filter-icon').on('click', function (e) { 1898 $(this).toggleClass("active"); //you can list several class names 1899 e.preventDefault(); 1900}); 1901// YL: Events agenda date filter 1902$('.agenda-filter-dates').on('change', function () { 1903 var date = $('.agenda-filter-dates option:selected').attr('data-event-date'); 1904 $('.ite-event-day-header').show(); 1905 $('.agenda-filter-events option').each(function () { 1906 //$(this).removeClass('active'); 1907 var eventDate = $(this).attr('data-event-date'); 1908 if (eventDate != 0) { 1909 if (eventDate.indexOf(date) >= 0 || date == 'All') { 1910 $(this).show(); 1911 } else { 1912 $(this).hide(); 1913 } 1914 } 1915 }) 1916 //PW: Show sessions which date match 1917 $(".ite-event-container[data-day-guid='" + $(this).attr("data-event-date") + "']").show(); 1918 $('.ite-event-day').each(function () { 1919 var guid = $(this).attr('data-day-guid'); 1920 if (guid == date || date == 'All') { 1921 $(this).show(); 1922 $(this).find('.ite-event-session').each(function () { 1923 var sessionDay = $(this).attr('data-day-guid'); 1924 if (sessionDay == date || date == 'All') { 1925 $(this).show(); 1926 } else { 1927 $(this).hide(); 1928 } 1929 }) 1930 } else { 1931 $(this).hide(); 1932 } 1933 1934 }) 1935}).change(); 1936//-- Start old code --\\ 1937//$('.agenda-filter-date').on('click', function () { 1938// $('.agenda-filter-date').each(function () { 1939// $(this).removeClass('active'); 1940// }) 1941// $(this).addClass('active'); 1942// var date = $(this).attr('data-event-date'); 1943// $('.agenda-filter-event').each(function () { 1944// $(this).removeClass('active'); 1945// var eventDate = $(this).attr('data-event-date'); 1946// if (eventDate != 0) { 1947// if (eventDate.indexOf(date) >= 0 || date == 'All') { 1948// $(this).parent().show(); 1949// } else { 1950// $(this).parent().hide(); 1951// } 1952// } 1953// if ($(this).attr('data-event-date') == 0) { 1954// $(this).addClass('active'); 1955// } 1956// }) 1957// //PW: Show sessions which date match 1958// $(".ite-event-container[data-day-guid='" + $(this).attr("data-event-date") + "']").show(); 1959// $('.ite-event-day').each(function () { 1960// var guid = $(this).attr('data-day-guid'); 1961// if (guid == date || date == 'All') { 1962// $(this).show(); 1963// $(this).find('.ite-event-session').each(function () { 1964// var sessionDay = $(this).attr('data-day-guid'); 1965// if (sessionDay == date || date == 'All') { 1966// $(this).show(); 1967// } else { 1968// $(this).hide(); 1969// } 1970// }) 1971// } else { 1972// $(this).hide(); 1973// } 1974 1975// }) 1976//}) 1977//-- End old code --\\ 1978 1979// YL: Events agenda event filter 1980$('.agenda-filter-events').on('change', function () { 1981 var guid = $('.agenda-filter-events option:selected').attr('data-event-guid'); 1982 $('.ite-event-day-header').show(); 1983 $('.ite-event-container').each(function () { 1984 var eventGuid = $(this).attr('data-event-guid'); 1985 if (guid != 0) { 1986 if (guid == eventGuid) { 1987 $(this).show(); 1988 var eventDay = $(this).attr('data-day-guid'); 1989 $(this).find('.ite-event-session').each(function () { 1990 var sessionDay = $(this).attr('data-day-guid'); 1991 if (sessionDay != eventDay) { 1992 $(this).hide(); 1993 } else { 1994 $(this).show(); 1995 } 1996 }) 1997 } else { 1998 $(this).hide(); 1999 } 2000 } else { 2001 $(this).show(); 2002 var eventDay = $(this).attr('data-day-guid'); 2003 $(this).find('.ite-event-session').each(function () { 2004 var sessionDay = $(this).attr('data-day-guid'); 2005 if (sessionDay != eventDay) { 2006 $(this).hide(); 2007 } else { 2008 $(this).show(); 2009 } 2010 }) 2011 } 2012 }) 2013 2014 // hide all day headers 2015 $('.ite-event-day-header').hide(); 2016 // loop through displayed events 2017 $(".ite-event-container:visible").each(function () { 2018 // get day guid 2019 var dayGuid = $(this).data('day-guid'); 2020 2021 // show day header if it matches day guid 2022 $('.ite-event-day-header').filter("[data-day-header='" + dayGuid + "']").show(); 2023 2024 }) 2025}).change();
2026//-- Start old code --\\ 2027//$('.agenda-filter-event').on('click', function () { 2028// $('.agenda-filter-event').each(function () { 2029// $(this).removeClass('active'); 2030// }) 2031// $(this).addClass('active'); 2032// var guid = $(this).attr('data-event-guid'); 2033// $('.ite-event-container').each(function () { 2034// var eventGuid = $(this).attr('data-event-guid'); 2035// if (guid != 0) { 2036// if (guid == eventGuid) { 2037// $(this).show(); 2038// var eventDay = $(this).attr('data-day-guid'); 2039// $(this).find('.ite-event-session').each(function () { 2040// var sessionDay = $(this).attr('data-day-guid'); 2041// if (sessionDay != eventDay) { 2042// $(this).hide(); 2043// } else { 2044// $(this).show(); 2045// } 2046// }) 2047// } else { 2048// $(this).hide(); 2049// } 2050// } else { 2051// $(this).show(); 2052// var eventDay = $(this).attr('data-day-guid'); 2053// $(this).find('.ite-event-session').each(function () { 2054// var sessionDay = $(this).attr('data-day-guid'); 2055// if (sessionDay != eventDay) { 2056// $(this).hide(); 2057// } else { 2058// $(this).show(); 2059// } 2060// }) 2061// } 2062// }) 2063//}) 2064//-- End old code --\\ 2065 2066//JW: Makes the filters on the Business Programme/Agenda page sticky when scrolling 2067function BusinessProgrammeNavSticky() { 2068 if ($(".ite-events-agenda-filter").length) { 2069 var header = document.querySelector('.ite-events-agenda-filter'); 2070 var origOffsetY = header.offsetTop; 2071 2072 function onScroll(e) { 2073 if (window.scrollY >= origOffsetY) { 2074 var headerHeight = $('.ite-header').height(); 2075 header.classList.add('stickyListNav'); 2076 $('.ite-events-agenda-filter').css("top", "+" + headerHeight + "px"); 2077 } 2078 else { 2079 header.classList.remove('stickyListNav'); 2080 $('.ite-events-agenda-filter').css("top", ""); 2081 } 2082 2083 } 2084 2085 2086 document.addEventListener('scroll', onScroll); 2087 } 2088} 2089//Sticky Exhibitor List 2090 2091function ExhibitorListNavSticky() { 2092 if ($(".ite-exhibitor-list-filter").length) { 2093 2094 var header = document.querySelector('.ite-exhibitor-list-filter'); 2095 var origOffsetY = header.offsetTop; 2096 2097 function onScroll(e) { 2098 if (window.scrollY >= origOffsetY) { 2099 var headerHeight = $('.ite-header').height(); 2100 header.classList.add('sticky-Exhibitor-List-Nav'); 2101 $('.ite-exhibitor-list-filter').css("top", "+" + headerHeight + "px"); 2102 } 2103 else { 2104 header.classList.remove('sticky-Exhibitor-List-Nav'); 2105 $('.ite-exhibitor-list-filter').css("top", ""); 2106 } 2107 } 2108 document.addEventListener('scroll', onScroll); 2109 } 2110} 2111 2112// YL: Initialize filter on events agenda page 2113function EventsAgendaFilter() { 2114 $('.agenda-filter-date').first().trigger('click'); 2115 /*$('.agenda-filter-events > div').each(function () { 2116 if ($(this).is(':visible')) { 2117 $(this).find('.agenda-filter-event').trigger('click'); 2118 return false; 2119 } 2120 });*/ 2121} 2122 2123// YL: Change icon when event description collapsed 2124/*$('.ite-event-session-collapse-description').on('click', function () { 2125 var flag = $(this).attr('aria-expanded'); 2126 if (flag == 'true') { 2127 $(this).children('.fa').removeClass('fa-minus').addClass('fa-plus'); 2128 $(this).children('.agenda-collapsein-link').hide(); 2129 $(this).children('.agenda-collapse-link').show(); 2130 $(this).attr('aria-expanded', 'false'); 2131 } else { 2132 $(this).children('.fa').removeClass('fa-plus').addClass('fa-minus'); 2133 $(this).children('.agenda-collapsein-link').show(); 2134 $(this).children('.agenda-collapse-link').hide(); 2135 $(this).attr('aria-expanded', 'true'); 2136 } 2137})*/ 2138 2139$('.ite-event-session-description').on('click', function () { 2140 var flag = $(this).hasClass('short'); 2141 //var moderators = $(this).siblings('.ite-event-session-moderators'); 2142 //var speakers = $(this).siblings('.ite-event-session-speakers'); 2143 if (flag) { 2144 $(this).removeClass('short'); 2145 //$(moderators).removeClass('collapsed'); 2146 //$(speakers).removeClass('collapsed'); 2147 } else { 2148 $(this).addClass('short'); 2149 //$(moderators).addClass('collapsed'); 2150 //$(speakers).addClass('collapsed'); 2151 } 2152}) 2153 2154//// JW: Collapse speakers in session if their count > 3 2155function CollapseSpeakers() { 2156 $(document).ready(function () { 2157 $(".expand-btn").click(function () { 2158 $(this).text($(this).text() == 'Back' ? 'Explore' : 'Back'); 2159 $(this).parent().siblings(".ite-event-session-speakers").toggleClass("unex
2159panded"); 2160 2161 if ($(this).siblings('.bounce').hasClass('icon-chevron-double-up')) { 2162 $(this).siblings('.bounce').removeClass('icon-chevron-double-up'); 2163 $(this).siblings('.bounce').addClass('icon-chevron-double-down'); 2164 } 2165 else { 2166 $(this).siblings('.bounce').removeClass('icon-chevron-double-down'); 2167 $(this).siblings('.bounce').addClass('icon-chevron-double-up'); 2168 } 2169 }); 2170 $('.ite-event-session-speakers').each(function () { 2171 var speakers = parseInt($(this).attr('data-amount')); 2172 if (speakers >= 3) { 2173 $(this).addClass('active'); 2174 $(this).addClass('unexpanded'); 2175 } 2176 }) 2177 $('.ite-event-session-speakers').each(function () { 2178 var speakers = parseInt($(this).attr('data-amount')); 2179 if (speakers < 3) { 2180 $(this).siblings('.expand-container').hide(); 2181 } 2182 }) 2183 }) 2184} 2185 2186// YL: Scrolling to session on business programme agenda page if there is param in link (from speaker page) 2187function BPOpenSession() { 2188 var url = window.location.href; 2189 //console.log(url); 2190 2191 if (url.indexOf('session=') !== -1) { 2192 var param = url.split('session=')[1]; 2193 //console.log(param); 2194 if ((param.indexOf('&')) && (param.indexOf('&') !== -1)) { 2195 param = param.split('&')[0]; 2196 } 2197 $('.ite-event-session').each(function () { 2198 var dayId = $(this).attr('data-day-guid'); 2199 var eventId = $(this).attr('data-event-guid'); 2200 var sessionId = $(this).attr('data-guid'); 2201 $('.agenda-filter-date').each(function () { 2202 var day = $(this).attr('data-event-date'); 2203 if (day == dayId) { 2204 $(this).trigger('click'); 2205 } 2206 }); 2207 $('.agenda-filter-event').each(function () { 2208 var event = $(this).attr('data-event-guid'); 2209 if (event == eventId) { 2210 $(this).trigger('click'); 2211 } 2212 }); 2213 if (param == sessionId) { 2214 $('html, body').animate({ 2215 scrollTop: parseInt($(this).offset().top) - 120 2216 }) 2217 } else { 2218 return false; 2219 } 2220 }) 2221 } else { 2222 //console.log('no params'); 2223 return false; 2224 } 2225} 2226 2227// YL: Scrolling to the event on business programme agenda page if there is param in link (for advertisements) 2228function BPOpenEvent() { 2229 var url = window.location.href; 2230 //console.log(url); 2231 2232 if (url.indexOf('event=') !== -1) { 2233 var param = url.split('event=')[1]; 2234 //console.log(param); 2235 if ((param.indexOf('&')) && (param.indexOf('&') !== -1)) { 2236 param = param.split('&')[0]; 2237 } 2238 $('.ite-event-container').each(function () { 2239 var eventId = $(this).attr('data-event-guid'); 2240 $('.agenda-filter-date').first().trigger('click'); 2241 $('.agenda-filter-event').each(function () { 2242 var event = $(this).attr('data-event-guid'); 2243 if (event == eventId) { 2244 $(this).trigger('click'); 2245 } 2246 }); 2247 }) 2248 } else { 2249 //console.log('no params'); 2250 return false; 2251 } 2252} 2253 2254// YL: Show full programme of event 2255$('.ite-event-full-programme').on('click', function () { 2256 var eventContainer = $(this).parent().parent(); 2257 var eventGuid = $(eventContainer).attr('data-event-guid'); 2258 $('.agenda-filter-date').first().trigger('click'); 2259 $('.agenda-filter-event').each(function () { 2260 var event = $(this).attr('data-event-guid'); 2261 if (event == eventGuid) { 2262 $(this).trigger('click'); 2263 } 2264 }); 2265}); 2266 2267//$(window).on("load, resize", function () { 2268// console.log("window width: " + $(document).width()); 2269// TweakMenu(); 2270//}); 2271 2272var resizeTimer; 2273 2274$(window).on('load, resize', function (e) { 2275 2276 clearTimeout(resizeTimer); 2277 resizeTimer = setTimeout(function () { 2278 2279 console.log("window width: " + $(document).width()); 2280 TweakMenu(); 2281 2282 }, 250); 2283 2284}); 2285 2286function TweakMenu() { 2287 2288 if ($(".stop-tweak-menu")[0]) { 2289 return; 2290 } 2291 2292 var logo = $(".ite-event-logo"); 2293 var menuZone = $(".ite-menu-zone"); 2294 var menu = $(".ite-menucta"); 2295 var buttonDiv = $(".ite-cta-buttons"); 2296 var buttonSpan = $(".ite-cta-buttons span"); 2297 2298 var menuLiA = $("#ite-menu-tree li a"); 2299 var fontSize = parseFloat(menuLiA.css('font-size'));
2300 //console.log("fontsize:" + fontSize); 2301 2302 var padding = parseFloat(menuLiA.css('padding-right')); 2303 //console.log("padding: " + padding); 2304 2305 //var menuHeight = menu.height(); 2306 var menuHeight = menuZone.height(); 2307 //console.log("menu Height:" + menuHeight); 2308 var isMobile = jQuery.browser && jQuery.browser.mobile 2309 ? jQuery.browser.mobile 2310 : window.matchMedia("(max-width: 768px)").matches; 2311 2312 if (!isMobile) { 2313 2314 if (menuHeight > 60) { //normal menu height is 54px 2315 //if the menu is too tall, try: 2316 2317 //shrink logo cols and expand menu&button cols 2318 if (logo.hasClass("col-sm-3")) { 2319 //console.log("SHRINKING LOGO"); 2320 2321 logo.removeClass("col-sm-3"); 2322 logo.addClass("col-sm-2"); 2323 logo.css("width", "16%"); 2324 2325 menuZone.removeClass("col-sm-9"); 2326 menuZone.addClass("col-sm-10"); 2327 2328 TweakMenu(); 2329 } 2330 //shrink button cols and button size and expand menu cols 2331 if (menu.height() > 60) { 2332 if (buttonDiv.hasClass("col-md-6")) { 2333 //console.log("SHRINKING BUTTONS"); 2334 2335 buttonDiv.removeClass("col-md-6"); 2336 buttonDiv.addClass("col-md-3"); 2337 buttonSpan.css("width", "49%"); 2338 buttonSpan.css("font-size", "13px"); 2339 2340 //console.log("buttonDiv width:" + buttonDiv.width()); 2341 2342 menu.removeClass("col-md-6"); 2343 menu.addClass("col-md-9"); 2344 2345 TweakMenu(); 2346 } 2347 } 2348 2349 //shrink the padding between the menu items 2350 if (menu.height() > 60) { 2351 if (padding > 8) { 2352 //console.log("SHRINKING MENU PADDING"); 2353 2354 menuLiA.css('padding-left', padding - 1 + "px"); 2355 menuLiA.css('padding-right', padding - 1 + "px"); 2356 2357 TweakMenu(); 2358 } 2359 } 2360 2361 if (menu.height() > 60) { 2362 //shrink menu font 2363 if (fontSize > 13) { 2364 //console.log("SHRINKING MENU FONT"); 2365 2366 menuLiA.css("font-size", fontSize - 1 + "px"); 2367 menuLiA.css('padding-right', padding - 1 + "px"); 2368 2369 TweakMenu(); 2370 } 2371 } 2372 } 2373 2374 } 2375} 2376 2377function GrowMenu() { 2378 var menuItem = $(".ite-menucta ul a"); 2379 menuItem.each(function (index) { 2380 var extraChars = GetRandomChars(2); 2381 $(this).text($(this).text() + extraChars); 2382 }); 2383 2384 TweakMenu(); 2385} 2386 2387function GetRandomChars(length) { 2388 var text = ""; 2389 var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; 2390 2391 for (var i = 0; i < length; i++) 2392 text += possible.charAt(Math.floor(Math.random() * possible.length)); 2393 2394 return text; 2395} 2396 2397function jump(h) { 2398 var top = document.getElementById(h).offsetTop; 2399 window.scrollTo(0, top); 2400} 2401function wisentStepOnChange(stepId, functions) { 2402 jump('ite_vr'); 2403} 2404 2405function GetURLParameter(sParam) { 2406 var sPageURL = window.location.search.substring(1); 2407 var sURLVariables = sPageURL.split('&'); 2408 for (var i = 0; i < sURLVariables.length; i++) { 2409 var sParameterName = sURLVariables[i].split('='); 2410 if (sParameterName[0].toLowerCase() == sParam.toLowerCase()) { 2411 return sParameterName[1]; 2412 } 2413 } 2414} 2415 2416$(document.body).on('change', '#Category', function () { 2417 var selectedCategory = $("#Category").val(); 2418 var subjectSelect = $('#Subject'); 2419 var formUserType = GetURLParameter('UserType'); 2420 if (selectedCategory != null && selectedCategory != '') { 2421 var url = $("#crm-subject-url").data('url'); 2422 $.getJSON(url, { categoryCode: selectedCategory, userType: formUserType }, function (subjects) { 2423 if (subjects != null && !jQuery.isEmptyObject(subjects)) { 2424 subjectSelect.empty(); 2425 subjectSelect.append($('<option/>', { 2426 value: null, 2427 text: "" 2428 })); 2429 $.each(subjects, function (index, subject) { 2430 subjectSelect.append($('<option/>', { 2431 value: subject.Value, 2432 text: subject.Text 2433 })); 2434 }); 2435 }; 2436 }); 2437 } 2438}); 2439 2440// get vote count 2441$(document).ready(function () { 2442 if ($("#vote-count").length) { 2443 var campaignName = $('#vote-count').data('campaign-name'); 2444 var candidateName = $('#vote-count').data('candidate-name'); 2445 $.ajax({
2446 type: "GET", 2447 url: "/VotingList/GetVoteCount", 2448 data: { CampaignName: campaignName, CandidateName: candidateName }, 2449 success: function (data) { 2450 $("#vote-count").text(data); 2451 } 2452 }); 2453 } 2454}); 2455 2456//voting list vote button without reCAPTCHA 2457$(document).ready(function () { 2458 var campaignName = $('#voteSubmit').data('campaignname'); 2459 var candidateName = $('#voteSubmit').data('candidatename'); 2460 var documentAlias = $('#voteSubmit').data('documentalias'); 2461 var voteConfirmation = $('#voteSubmit').data('voteconfirmation'); 2462 var voteAccepted = $('#voteSubmit').data('voteaccepted'); 2463 2464 if (document.cookie.split(';').filter((item) => item.includes('voted=true')).length) { 2465 $('#voteSubmit').attr("disabled", true); 2466 $('#voteSubmit').attr("value", voteAccepted); 2467 } 2468 else { 2469 $("#voteSubmit").click(function () { 2470 $.ajax({ 2471 type: "GET", 2472 //contentType: "application/json; charset=utf-8", 2473 url: "/VotingList/UpdateVotingResults", 2474 data: { CampaignName: campaignName, CandidateName: candidateName }, 2475 //dataType: "json", 2476 success: function (data) { 2477 $("#vote-count").text(data); 2478 $("#dataDiv").html(voteConfirmation); 2479 var expiryDate = new Date(); 2480 expiryDate.setMonth(expiryDate.getMonth() + 2); 2481 document.cookie = "voted=true; expires=" + expiryDate; 2482 $('#voteSubmit').attr("disabled", true); 2483 $('#voteSubmit').attr("value", voteAccepted); 2484 }, 2485 error: function (ex) { 2486 $("#dataDiv").html("Error submitting vote"); 2487 } 2488 }); 2489 }); 2490 } 2491}); 2492 2493//voting list vote button with reCAPTCHA 2494//$(document).ready(function () { 2495// var campaignName = $('#voteSubmitreCAPTCHA').data('campaignname'); 2496// var candidateName = $('#voteSubmitreCAPTCHA').data('candidatename'); 2497// var documentAlias = $('#voteSubmitreCAPTCHA').data('documentalias'); 2498// var voteConfirmation = $('#voteSubmitreCAPTCHA').data('voteconfirmation'); 2499// var voteAccepted = $('#voteSubmitreCAPTCHA').data('voteaccepted'); 2500// var invalidCaptcha = $('#voteSubmitreCAPTCHA').data('invalidcaptcha'); 2501 2502// if (document.cookie.split(';').filter((item) => item.includes('voted=true')).length) { 2503// $('#voteSubmitreCAPTCHA').attr("disabled", true); 2504// $('#voteSubmitreCAPTCHA').attr("value", voteAccepted); 2505// } 2506// else { 2507// $("#voteSubmitreCAPTCHA").click(function () { 2508// var response = grecaptcha.getResponse(); 2509// if (response.length != 0) { 2510// $.ajax({
2511// type: "GET", 2512// //contentType: "application/json; charset=utf-8", 2513// url: "/VotingList/UpdateVotingResults", 2514// data: { CampaignName: campaignName, CandidateName: candidateName }, 2515// //dataType: "json", 2516// success: function (data) { 2517// $("#vote-count").text(data); 2518// $("#dataDiv").html(voteConfirmation); 2519// var expiryDate = new Date(); 2520// expiryDate.setMonth(expiryDate.getMonth() + 2); 2521// document.cookie = "voted=true; expires=" + expiryDate; 2522// $('#voteSubmitreCAPTCHA').attr("disabled", true); 2523// $('#voteSubmitreCAPTCHA').attr("value", voteAccepted); 2524// }, 2525// error: function (ex) { 2526// $("#dataDiv").html("Error submitting vote"); 2527// } 2528// }); 2529// } 2530// else { 2531// $('#dataDiv').html(invalidCaptcha); 2532// } 2533// }); 2534// } 2535//}); 2536 2537//$('#voting-filter-name').on('keyup', function () { 2538// var filterName = $(this).val(); 2539// $('.voting-item').each(function () { 2540// if ($(this).find('.voting-title').text().search(new RegExp(filterName, 'i')) < 0) { 2541// $(this).hide(); 2542// } else { 2543// $(this).show(); 2544// } 2545// }) 2546//}) 2547 2548//$('#voting-candidate-filter-name').on('keyup', function () { 2549// var filterName = $(this).val(); 2550// $('.ite-voting-list-category-item').each(function () { 2551// if ($(this).find('.voting-title').text().search(new RegExp(filterName, 'i')) < 0) { 2552// $(this).hide(); 2553// } else { 2554// $(this).show(); 2555// } 2556// }) 2557//}) 2558 2559 2560 2561function ShowExhibitorProducts() { 2562 if (window.location.hash === '#products') { 2563 $('.exhibitor-tab-btn[data-exhibitor-tab="products"]').trigger('click'); 2564 } 2565}; 2566 2567function ShowEnhancedPresentations() { 2568 if (window.location.hash === '#presentations') { 2569 $('.enhanced-tab-btn[data-enhanced-tab="presentations"]').trigger('click'); 2570 } 2571}; 2572 2573//$(document).ready(function () { 2574// var linkURL = $(".item.active").data("link-url"); 2575// var linkText = $(".item.active").data("link-text"); 2576// var linkTarget = $(".item.active").data("link-target"); 2577// var imageTitle = $(".item.active").data("image-title"); 2578// $('#carousel-cta-link').attr("href", linkURL); 2579// $('#carousel-cta-text').text(linkText); 2580// $('#carousel-cta-link').attr("target", linkTarget); 2581// $('#homeSplashTitle').text(imageTitle) 2582 2583// $('.carousel').on('slid.bs.carousel', function () { 2584// linkURL = $(".item.active").data("link-url"); 2585// linkText = $(".item.active").data("link-text"); 2586// linkTarget = $(".item.active").data("link-target"); 2587// imageTitle = $(".item.active").data("image-title"); 2588// $('#carousel-cta-link').attr("href", linkURL); 2589// $('#carousel-cta-text').text(linkText); 2590// $('#carousel-cta-link').attr("target", linkTarget); 2591// $('#homeSplashTitle').text(imageTitle) 2592// }); 2593//}); 2594 2595//initialise the carousel on the voting details page 2596//function VotingListCarousel() { 2597// $('#lightSliderVotingList').lightSlider({ 2598// gallery: true, 2599// item: 1, 2600// loop: true, 2601// slideMargin: 0, 2602// thumbItem: 9, 2603// adaptiveHeight: true 2604// }); 2605//} 2606 2607//initialise the carousel on the Stand with description page 2608//function StandsCarousel() { 2609// $('#lightSliderStand').lightSlider({ 2610// gallery: true, 2611// item: 1, 2612// loop: true, 2613// slideMargin: 0, 2614// thumbItem: 9, 2615// adaptiveHeight: true 2616// }) 2617//} 2618 2619//initialise the animation on Facts module 2620function FactsAnimation() { 2621 var $animation_elements = $('.animation-element'); 2622 var $window = $(window); 2623 2624 function check_if_in_view() { 2625 var window_height = $window.height(); 2626 var window_top_position = $window.scrollTop(); 2627 var window_bottom_position = (window_top_position + window_height); 2628 2629 $.each($animation_elements, function () { 2630 var $element = $(this); 2631 var element_height = $element.outerHeight(); 2632 var element_top_position = $element.offset().top; 2633 var element_bottom_position = (element_top_position + element_height); 2634 2635 //check to see if this current container is within viewport 2636 if ((element_bottom_position >= window_top_position) && 2637 (element_top_position <= window_bottom_position)) { 2638 $element.addClass('in-view'); 2639 } else { 2640 $element.removeClass('in-view'); 2641 } 2642 }); 2643 } 2644 2645 $window.on('scroll resize', check_if_in_view); 2646 $window.trigger('scroll'); 2647} 2648 2649function IsMobileDeviceJS() { 2650 return navigator.userAgent.match( 2651 /(iPhone|iPod|iPad|Android|webOS|BlackBerry|IEMobile|Opera Mini)/i); 2652} 2653 2654function GetRandomBannerAd() { 2655 $('.ite-banner-ad').each(function () { 2656 if ($(this).length) { 2657 var NodeAliasPath = $(this).data("node-alias-path"); 2658 //var BannerTracking = $(this).data("banner-tracking"); 2659 var currentBanner = $(this); 2660 $.ajax({
2661 type: "GET", 2662 url: "/bannerad/getrandombanner", 2663 dataType: "json", 2664 contentType: "application/json; charset=utf-8", 2665 data: { nodeAliasPath: NodeAliasPath, selectedCulture: CurrentCulture}, 2666 success: function (data) { 2667 if (data) { 2668 var bannerTrackingClass = ""; 2669 //if (BannerTracking == 'True') { 2670 // bannerTrackingClass = "banner-click"; 2671 //} 2672 bannerTrackingClass = "bannerad-a"; 2673 var banner = "<a href='" + data.BannerURL + "' target='_blank' class='" + bannerTrackingClass + "' data-banner-name='" + data.Name + "'><img class='ite-top-banner' src='" + data.Image + "' alt='" + data.Name + "' title='" + data.Name + "' style='height: " + data.Height + "; width: " + data.Width + ";' /></a>" 2674 $(currentBanner).append(banner); 2675 } 2676 }, 2677 error: function (ex) { 2678 console.log(ex.error); 2679 } 2680 }); 2681 }; 2682 }); 2683} 2684 2685//$(document).on("click", "a.banner-click", function () { 2686// var bannerName = $(this).data('banner-name'); 2687// $.ajax({
2688// type: "POST", 2689// url: "/bannerad/addclick", 2690// data: { "BannerName": bannerName }, 2691// dataType: "json" 2692// }); 2693//}); 2694 2695/* ------------- Start - New Speaker scripts -------------- */ 2696 2697$('#searchSpeakers').on('keyup', function () { 2698 var filterName = $(this).val(); 2699 $('.speaker-box').each(function () { 2700 if ($(this).find('.speaker-name, .speaker-jobtitle, .speaker-company').text().search(new RegExp(filterName, 'i')) < 0) { 2701 $(this).hide(); 2702 } else { 2703 $(this).show(); 2704 } 2705 }) 2706 if ($('.speakers-grid').children(':visible').length == 0) { 2707 $('.ite-speaker-list-empty').show(); 2708 } else { 2709 $('.ite-speaker-list-empty').hide(); 2710 } 2711 RunSpeakerPaginationTurboCutter(); 2712}) 2713 2714$(document).ready(function () { 2715 $(".speaker-modal").on('shown.bs.modal', function () { 2716 var documentAlias = $(this).data('document-alias'); 2717 var sessionsLocalisation = $(this).data('sessions-localisation'); 2718 var modalId = "#" + $(this).attr('id'); 2719 if (documentAlias.length) { 2720 $(".speaker-session-template-container", modalId).empty(); 2721 // incase sessions have already been added 2722 if ($('.speaker-session-template', this).length == 0) { 2723 var speakerSessionTemplate = $('.speaker-session-template:first').clone(true, true); 2724 $.ajax({
2725 type: "GET", 2726 url: "/SpeakerList/GetSpeakerAgendaSessions", 2727 dataType: "json", 2728 contentType: "application/json; charset=utf-8", 2729 data: { DocumentAlias: documentAlias }, 2730 beforeSend: function () { 2731 $('.loading-icon').show(); 2732 }, 2733 success: function (data) { 2734 if (data) { 2735 for (i = 0; i < data.length; i++) { 2736 var item = $(speakerSessionTemplate).clone(); 2737 if (i == 0 || data[i].AgendaName != data[i - 1].AgendaName) { 2738 $(".session-header-template", item).text(data[i].AgendaName + " " + sessionsLocalisation); 2739 } else { 2740 $(".session-header-template", item).hide(); 2741 } 2742 $(".session-name-template", item).text(data[i].SessionName); 2743 $(".session-name-template", item).attr("href", data[i].SessionURL); 2744 if (data[i].SessionPreview.length != 0) { 2745 /*var previewText = $.parseHTML(data[i].SessionPreview);*/ 2746 /*$(".session-preview-text-template", item).empty().append(previewText);*/ 2747 var previewText = data[i].SessionPreview; 2748 $(".session-preview-text-template", item).html(previewText); 2749 } 2750 else { 2751 $(".session-preview-text-template", item).text("\u2007"); 2752 } 2753 $(".session-date-template", item).text(data[i].SessionDate); 2754 $(".session-start-end-time-template", item).text(data[i].SessionStartTime + " - " + data[i].SessionEndTime); 2755 var loc = data[i].LocationDisplayName; 2756 if (loc && loc.trim().length) { 2757 $(".session-location-template", item).text(loc); 2758 } else { 2759 var $locationName = $(".session-location-template", item).closest("strong"); 2760 var $locationIcon = $locationName.prev("i.fas.fa-map-marker-alt"); 2761 $locationName.remove(); 2762 $locationIcon.remove(); 2763 } 2764 item.find("p:has(.session-theme-template)").not(":first").remove(); 2765 item.find(".session-theme-template").first().text(""); 2766 var themes = data[i].ThemeDisplayNames || []; 2767 2768 var $themeSpan = $(".session-theme-template", item); 2769 var $themeP = $themeSpan.closest("p"); 2770 var $addevent = $(".addeventatc", item); 2771 if (!themes.length) { 2772 // 0 themes, remove the whole line 2773 $themeP.remove(); 2774 } 2775 else if (themes.length === 1) { 2776 // 1 theme, just replace ### 2777 $themeSpan.text(themes[0]); 2778 } 2779 else { 2780 // â¥2 themes 2781 $themeSpan.text(themes[0]); 2782 var $last = $themeP; 2783 for (let t = 1; t < themes.length; t++) { 2784 var $newP = $themeP.clone() 2785 .find(".session-theme-template") 2786 .text(themes[t]).end(); 2787 2788 if ($addevent.length) { 2789 2790 $newP.insertBefore($addevent); 2791 } else { 2792 2793 $last.after($newP); 2794 } 2795 $last = $newP; 2796 } 2797 } 2798 $(".start", item).text(data[i].SessionStartDateTime); 2799 $(".end", item).text(data[i].SessionEndDateTime); 2800 $(".title", item).text(data[i].SessionTitle); 2801 if (data[i].SessionPreview.length != 0) { 2802 //var previewText = $.parseHTML(data[i].SessionPreview); 2803 //$(".description", item).empty().append(previewText); 2804 var previewText = data[i].SessionPreview; 2805 $(".description", item).html(previewText); 2806 } 2807 else { 2808 $(".description", item).text("\u2007"); 2809 } 2810 $(".location", item).text(data[i].LocationDisplayName); 2811 $(".addeventatc-template", item).removeClass().addClass("addeventatc"); 2812 $(".speaker-session-template-container", modalId).append(item); 2813 } 2814 } 2815 }, 2816 complete: function () { 2817 addeventatc.refresh();
2818 $('.loading-icon').hide(); 2819 }, 2820 error: function (ex) { 2821 console.log(ex.error); 2822 }, 2823 }); 2824 } 2825 } 2826 }); 2827}); 2828 2829/* ------------- End - New Speaker scripts -------------- */ 2830 2831/* ------------- Start - New Agenda scripts ------------- */ 2832 2833 2834$(document).ready(function () { 2835 $(".close-cross").click(function () { 2836 $('.filter-btn2').children('.fa-angle-down').toggleClass('rotate-180right'); 2837 $(".agenda-border").toggle(); 2838 }); 2839}); 2840 2841$(document).ready(function () { 2842 $(".filter-btn2").click(function () { 2843 $(".agenda-border").toggle(); 2844 }); 2845}); 2846 2847$('.filter-btn2').click(function () { 2848 $(this).children('.fa-angle-down').toggleClass('rotate-180right'); 2849}); 2850 2851$(document).ready(function () { 2852 // after user clicks a filter option add selected filter in the section above 2853 $(".agenda-filters button").click(function () { 2854 var filterValue = $(this).data('filter-value'); 2855 var filterType = $(this).data('filter-type'); 2856 var filterButtonHTML = "<button type='button' class='btn filter-btn4 filter-selected' data-filter-type='" + filterType + "' data-filter-value='" + filterValue + "'>" + filterValue + " <i class='fa fa-times'></i></button>" 2857 $("#agenda-filters-selected").append(filterButtonHTML); 2858 // disable filter button after it' been used 2859 $(this).attr("disabled", "disabled"); 2860 FilterAgendaSessions(); 2861 // update query string to reflect the filters selected 2862 if (history.pushState) { 2863 var newurl = window.location.href; 2864 if ($(".filter-selected").length == 1) { 2865 newurl += "?" + filterType + "=" + filterValue; 2866 } 2867 else { 2868 newurl += "&" + filterType + "=" + filterValue; 2869 } 2870 window.history.pushState({ path: newurl }, '', newurl); 2871 } 2872 resetAgendaSpeakerCarousel(); 2873 }); 2874 2875 // remove filter from selected filters section 2876 $(document).on("click", "i.fa-times", function () { 2877 // re-enable filter option after it's been removed 2878 var filterType = $(this).parent().data('filter-type'); 2879 var filterValue = $(this).parent().data('filter-value'); 2880 // get the actual filter value needed incase the case of the query string value was altered 2881 var filterOptionValue = document.querySelector("[data-filter-value='" + filterValue + "' i][class*='filter-button']").textContent; 2882 var filterOption = $(".agenda-filters button").filter("[data-filter-value='" + filterOptionValue + "']"); 2883 if (filterOption.length) { 2884 filterOption.removeAttr("disabled"); 2885 $(this).parent().remove(); 2886 FilterAgendaSessions(); 2887 // remove parmeter from query string 2888 if (history.pushState) { 2889 var newurl = window.location.href; 2890 if ($(".filter-selected").length == 0) { 2891 newurl = window.location.protocol + "//" + window.location.host + window.location.pathname; 2892 $('.hyve-list-pagination-wrapper').show(); 2893 ShowFirstPage(); 2894 RunPaginationTurboCutter(); 2895 } 2896 else { 2897 var filterTypeValue = filterType + "=" + encodeURIComponent(filterValue); 2898 var regEx = new RegExp(filterTypeValue, "ig"); 2899 var replaceMask = ""; 2900 newurl = newurl.replace(regEx, replaceMask); 2901 //newurl = newurl.replace(filterTypeValue, ""); 2902 newurl = newurl.replace("&&", "&"); 2903 newurl = newurl.replace("?&", "?"); 2904 if (newurl.charAt(newurl.length - 1) == "&") { 2905 newurl = newurl.slice(0, -1) 2906 } 2907 } 2908 window.history.pushState({ path: newurl }, '', newurl); 2909 } 2910 } 2911 resetAgendaSpeakerCarousel(); 2912 });
2913}); 2914 2915// apply filters if they are in the query string 2916$(document).ready(function () { 2917 if (window.location.search) { 2918 var search = window.location.search.substring(1); 2919 var allFilters = search.split('&'); 2920 var filterTypeValue; 2921 var filterType; 2922 var filterValue; 2923 var validFilterValue; 2924 var i; 2925 2926 for (i = 0; i < allFilters.length; i++) { 2927 filterTypeValue = allFilters[i].split('='); 2928 filterType = filterTypeValue[0]; 2929 if (filterType == "day" || filterType == "location" || filterType == "theme") { 2930 var isValueValid = false; 2931 filterValue = decodeURIComponent(filterTypeValue[1]); 2932 $('.agenda-filters button').each(function () { 2933 var optionFilterValue = $(this).data('filter-value'); 2934 if (optionFilterValue.toLowerCase() == filterValue.toLowerCase()) { 2935 isValueValid = true; 2936 validFilterValue = optionFilterValue; 2937 } 2938 }) 2939 if (isValueValid) { 2940 // create selected filter 2941 var filterButtonHTML = "<button type='button' class='btn filter-btn4 filter-selected' data-filter-type='" + filterType + "' data-filter-value='" + validFilterValue + "'>" + validFilterValue + " <i class='fa fa-times'></i></button>" 2942 $("#agenda-filters-selected").append(filterButtonHTML); 2943 // disable filter option 2944 $(".agenda-filters button").filter("[data-filter-value='" + validFilterValue + "']").attr("disabled", "disabled"); 2945 // filter sessions 2946 FilterAgendaSessions(); 2947 } 2948 } 2949 } 2950 } 2951}); 2952 2953// filter sessions based on selected filters 2954function FilterAgendaSessions() { 2955 $('.agenda-session-row').show(); 2956 var sessions = $('.agenda-session-row'); 2957 var dateFilter = []; 2958 var locationFilter = []; 2959 var themeFilter = []; 2960 $('.filter-selected').each(function () { 2961 var filterValue = $(this).data('filter-value'); 2962 var filterType = $(this).data('filter-type'); 2963 // go through all the sessions and hide if it matches the filter 2964 if (filterType == "day") { 2965 dateFilter.push("[data-session-date='" + filterValue + "']"); 2966 } 2967 if (filterType == "location") { 2968 locationFilter.push("[data-location='" + filterValue + "']"); 2969 } 2970 if (filterType == "theme") { 2971 themeFilter.push("[data-theme='" + filterValue + "']"); 2972 } 2973 }); 2974 if (dateFilter.length > 0) { 2975 var dateSessions = sessions.filter(dateFilter.join()); 2976 $('.agenda-session-row').not(dateSessions).hide(); 2977 } 2978 if (locationFilter.length > 0) { 2979 var locationSessions = sessions.filter(locationFilter.join()); 2980 $('.agenda-session-row').not(locationSessions).hide(); 2981 } 2982 if (themeFilter.length > 0) { 2983 var themeSessions = sessions.filter(themeFilter.join()); 2984 $('.agenda-session-row').not(themeSessions).hide(); 2985 } 2986 2987 $('.hyve-list-pagination-wrapper').hide(); 2988 2989 //RunPaginationTurboCutter(); 2990}; 2991 2992// text search filter on full agenda
2993$('#searchAgenda').on('keyup', function () { 2994 var filterKeyword = $(this).val(); 2995 $('.agenda-session-row').each(function () { 2996 if ($(this).find('.session-title, .session-preview, .session-description, .speaker-name-title').text().search(new RegExp(filterKeyword, 'i')) < 0) { 2997 $(this).hide(); 2998 } else { 2999 $(this).show(); 3000 3001 } 3002 }) 3003 // if search text box is cleared then remove any selected filters 3004 if (filterKeyword == "") { 3005 $(".filter-selected").remove(); 3006 $(".agenda-filters button").removeAttr("disabled"); 3007 $('.hyve-list-pagination-wrapper').show(); 3008 ShowFirstPage(); 3009 RunPaginationTurboCutter(); 3010 } else { 3011 $('.hyve-list-pagination-wrapper').hide(); 3012 } 3013 3014 if ($('.agenda-session-row:visible').length == 0) { 3015 $('#NoSessions').show(); 3016 } else { 3017 $('#NoSessions').hide(); 3018 } 3019 3020 resetAgendaSpeakerCarousel(); 3021}); 3022 3023/* --------------- End - New Agenda scripts ------------- */ 3024 3025 3026/* --------------- Start - Agenda share modal ------------- */ 3027$('#btnCopyToClipboard').click(function () { 3028 var clipboardText = ""; 3029 clipboardText = $('#SessionURLCopyText').attr("placeholder"); 3030 copyToClipboard(clipboardText); 3031}); 3032 3033function copyToClipboard(text) { 3034 var textArea = document.createElement("textarea"); 3035 textArea.value = text; 3036 document.body.appendChild(textArea); 3037 textArea.select(); 3038 textArea.setSelectionRange(0, 99999); 3039 navigator.clipboard.writeText(textArea.value); 3040 document.body.removeChild(textArea); 3041} 3042/* --------------- End - Agenda share modal ------------- */ 3043 3044/** 3045 * jQuery.browser.mobile (http://detectmobilebrowser.com/) 3046 * 3047 * jQuery.browser.mobile will be true if the browser is a mobile device 3048 * 3049 **/ 3050(function (a) { (jQuery.browser = jQuery.browser || {}).mobile = /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0, 4)) })(navigator.userAgent || navigator.vendor || window.opera); 3051 3052/* full width template header */ 3053var navbar = document.getElementById("header-id"); 3054if (navbar) { 3055 3056 var sticky = navbar.offsetTop; 3057 $(window).on("load", function () { 3058 ConfigureFullWidthMobileMenu(); 3059 });
3060 3061 window.addEventListener('load', function () { 3062 SetStickyFullWidthHeader(); 3063 window.addEventListener('scroll', SetStickyFullWidthHeader); 3064 }); 3065 3066 function SetStickyFullWidthHeader() { 3067 var headerHeight = document.getElementById('full-header-container').offsetHeight + 'px'; 3068 if (window.scrollY > sticky) { 3069 navbar.classList.add("sticky-header"); 3070 $(".ite-content").css("padding-top", headerHeight); 3071 document.getElementsByClassName("full-header-logo")[0].classList.add("reduce-logo-on-scroll"); 3072 document.getElementsByClassName("header-container")[0].classList.add("reduce-header-on-scroll"); 3073 document.getElementsByClassName("full-header-logo-container")[0].classList.add("reduce-header-on-scroll"); 3074 } else { 3075 document.getElementsByClassName("full-width-header")[0].classList.remove("sticky-header"); 3076 $(".ite-content").css("padding-top", "0px"); 3077 document.getElementsByClassName("full-header-logo")[0].classList.remove("reduce-logo-on-scroll"); 3078 document.getElementsByClassName("header-container")[0].classList.remove("reduce-header-on-scroll"); 3079 document.getElementsByClassName("full-header-logo-container")[0].classList.remove("reduce-header-on-scroll"); 3080 } 3081 } 3082 3083 let dropdowns = $("#full-header-nav .dropdown-toggle"); 3084 for (var i = 0; i < dropdowns.length; i++) { 3085 dropdowns[i].addEventListener('click', ConfigureFullWidthMobileMenu); 3086 } 3087 3088 function ConfigureFullWidthMobileMenu() { 3089 if ($(this).children("i").hasClass("fa-chevron-down")) { 3090 if ($(this).parents("ul").length < 2) { 3091 $("#full-header-nav ul").slideUp(); 3092 } 3093 $("#full-header-nav i").removeClass("fa-chevron-up"); 3094 $("#full-header-nav i").addClass("fa-chevron-down"); 3095 $(this).siblings("ul").slideDown(); 3096 $(this).children("i").removeClass("fa-chevron-down"); 3097 $(this).children("i").addClass("fa-chevron-up"); 3098 } else { 3099 $(this).siblings("ul").slideUp(); 3100 $(this).children("i").addClass("fa-chevron-down"); 3101 $(this).children("i").removeClass("fa-chevron-up"); 3102 } 3103 } 3104} 3105 3106/* ------------ UTM processing - Start ------------ */ 3107 3108var urlParams = new URLSearchParams(window.location.search); 3109var newHREF = ''; 3110$(document).ready(function () { 3111 $(".utm-url").each(function () { 3112 var href = $(this).attr('href'); 3113 newHREF = UpdateHREFWithUTMValues(href, urlParams); 3114 $(this).attr("href", newHREF); 3115 }); 3116}); 3117 3118function UpdateHREFWithUTMValues(href, urlParams) { 3119 var utm_source = urlParams.get('utm_source'); 3120 var utm_medium = urlParams.get('utm_medium'); 3121 var utm_campaign = urlParams.get('utm_campaign'); 3122 var utm_term = urlParams.get('utm_term'); 3123 var utm_content = urlParams.get('utm_content'); 3124 3125 3126 if (utm_source == null || utm_source == '') { 3127 utm_source = $.cookie('utm_sourcevar'); 3128 if (typeof utm_source == 'undefined') { 3129 utm_source = ""; 3130 } 3131 } 3132 3133 if (utm_medium == null || utm_medium == '') { 3134 utm_medium = $.cookie('utm_mediumvar'); 3135 if (typeof utm_medium == 'undefined') { 3136 utm_medium = ""; 3137 } 3138 } 3139 3140 if (utm_campaign == null || utm_campaign == '') { 3141 utm_campaign = $.cookie('utm_campaignvar'); 3142 if (typeof utm_campaign == 'undefined') { 3143 utm_campaign = ""; 3144 } 3145 } 3146 3147 if (utm_term == null || utm_term == '') { 3148 utm_term = $.cookie('utm_termvar'); 3149 if (typeof utm_term == 'undefined') { 3150 utm_term = ""; 3151 } 3152 } 3153 3154 if (utm_content == null || utm_content == '') { 3155 utm_content = $.cookie('utm_contentvar'); 3156 if (typeof utm_content == 'undefined') { 3157 utm_content = ""; 3158 } 3159 } 3160 3161 var hrefUrl = ''; 3162 3163 if (!href.includes(window.location.origin)) { 3164 hrefUrl = new URL(href, window.location.origin); 3165 } else { 3166 hrefUrl = new URL(href); 3167 } 3168 3169 var hrefUrlParams = new URLSearchParams(hrefUrl.search); 3170 3171 hrefUrlParams.append("utm_source", utm_source); 3172 hrefUrlParams.append("utm_medium", utm_medium); 3173 hrefUrlParams.append("utm_campaign", utm_campaign); 3174 hrefUrlParams.append("utm_term", utm_term);
3175 hrefUrlParams.append("utm_content", utm_content); 3176 3177 // remove original query string from href (if any) 3178 hrefUrl.search = ''; 3179 var hrefUrlWithoutQueryString = hrefUrl.toString(); 3180 3181 // add original parameters plus utm ones (if any) 3182 var updatedHREF = hrefUrlWithoutQueryString; 3183 if (hrefUrlParams.toString() != '') { 3184 updatedHREF = hrefUrlWithoutQueryString + "?" + hrefUrlParams.toString(); 3185 } 3186 3187 return updatedHREF; 3188} 3189/* ------------ UTM processing - End ------------ */ 3190 3191/* fashion template header */ 3192var fashionNavbar = document.getElementById("fashion-header-id"); 3193if (fashionNavbar) { 3194 3195 var sticky = fashionNavbar.offsetTop; 3196 3197 $(window).on("load", function () { 3198 ConfigureFullWidthMobileMenu(); 3199 }); 3200 3201 //window.addEventListener('scroll', SetStickyFullWidthHeader); 3202 3203 //function SetStickyFullWidthHeader() { 3204 // var headerHeight = document.getElementById('full-header-container').offsetHeight + 'px'; 3205 // if (window.scrollY > sticky) { 3206 // //fashionNavbar.classList.add("sticky-header"); 3207 // //fashionNavbar.classList.remove("fashion-home-header"); 3208 // //$(".ite-content").css("padding-top", headerHeight); 3209 // document.getElementsByClassName("full-header-logo")[0].classList.add("reduce-logo-on-scroll"); 3210 // document.getElementsByClassName("header-container")[0].classList.add("reduce-header-on-scroll"); 3211 // document.getElementsByClassName("full-header-logo-container")[0].classList.add("reduce-header-on-scroll"); 3212 // } else { 3213 // //fashionNavbar.classList.add("fashion-home-header"); 3214 // //fashionNavbar.classList.remove("sticky-header"); 3215 // //document.getElementsByClassName("full-width-header")[0].classList.remove("sticky-header"); 3216 // $(".ite-content").css("padding-top", "0px"); 3217 // document.getElementsByClassName("full-header-logo")[0].classList.remove("reduce-logo-on-scroll"); 3218 // document.getElementsByClassName("header-container")[0].classList.remove("reduce-header-on-scroll"); 3219 // document.getElementsByClassName("full-header-logo-container")[0].classList.remove("reduce-header-on-scroll"); 3220 // } 3221 //} 3222 3223 let dropdowns = $("#full-header-nav .dropdown-toggle"); 3224 for (var i = 0; i < dropdowns.length; i++) { 3225 dropdowns[i].addEventListener('click', ConfigureFullWidthMobileMenu); 3226 } 3227 3228 function ConfigureFullWidthMobileMenu() { 3229 if ($(this).children("i").hasClass("fa-chevron-down")) { 3230 if ($(this).parents("ul").length < 2) { 3231 $("#full-header-nav ul").slideUp(); 3232 } 3233 $("#full-header-nav i").removeClass("fa-chevron-up"); 3234 $("#full-header-nav i").addClass("fa-chevron-down"); 3235 $(this).siblings("ul").slideDown(); 3236 $(this).children("i").removeClass("fa-chevron-down"); 3237 $(this).children("i").addClass("fa-chevron-up"); 3238 } else { 3239 $(this).siblings("ul").slideUp(); 3240 $(this).children("i").addClass("fa-chevron-down"); 3241 $(this).children("i").removeClass("fa-chevron-up"); 3242 } 3243 } 3244} 3245 3246
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.