Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 

192 строки
6.1 KiB

  1. import "systemjs/dist/system.js";
  2. import {UiUtils} from "./utils/UiUtils";
  3. import IHK from './ihk';
  4. import 'focus-visible';
  5. const $ = global.$;
  6. // import './modules/a-z';
  7. // import './modules/accordion';
  8. // import './modules/ad-teaser';
  9. // import './modules/anchors';
  10. // import './modules/bookmarks';
  11. // import './modules/breadcrumb';
  12. // import './modules/caruso';
  13. // import './modules/contact';
  14. // import './modules/events';
  15. // import './modules/gallery';
  16. import './modules/header';
  17. // import './modules/magazine-header';
  18. // import './modules/masonry';
  19. // import './modules/quick-facts';
  20. // import './modules/registration';
  21. import './modules/search';
  22. import './modules/sidebar';
  23. // import './modules/slider';
  24. // import './modules/social';
  25. // import './modules/survey';
  26. // import './modules/table';
  27. // import './modules/topics';
  28. import './modules/webforms'; // todo captcha und webforms trennen
  29. import './utils/ie';
  30. import Masonry from "./modules/masonry";
  31. IHK.realVH();
  32. $(window).on('resize', function () {
  33. IHK.realVH();
  34. });
  35. $(document).ready(function () {
  36. IHK.init();
  37. $('body').addClass('ready');
  38. // trigger das init event auf der globale jquery instanz so dass es alle modulle mitkriegen (z.B. cookie.js)
  39. $("body").trigger('ihk-init');
  40. UiUtils.initUI();
  41. // systemjs for dynamic loading of js modules
  42. // Load the modules if needed
  43. if ($("dynamic-content").length || $("dynamic-video-content").length) {
  44. global.System.import(window.ihk.resources.webComponentsJSLink);
  45. }
  46. if ($(".vst-registration,#confirmation, #captcha-wrapper ").length) {
  47. global.System.import(window.ihk.resources.gfiRegistrationJSLink).then(() => {
  48. global.$('body').trigger('dynamic-component-loaded');
  49. });
  50. }
  51. if ($(".print-share-list").length || $(".document-number").length) {
  52. global.System.import(window.ihk.resources.gfiBookmarksJSLink).then(() => {
  53. });
  54. }
  55. if ($(".breadcrumb-item.noClick").length) {
  56. global.System.import(window.ihk.resources.gfiBreadcrumbJSLink).then(() => {
  57. });
  58. }
  59. if ($(".caruso-basket").length) {
  60. global.System.import(window.ihk.resources.gfiCarusoJSLink).then(() => {
  61. });
  62. }
  63. if ($("#search-form, #search-submit, #search-submit-button, #query").length) {
  64. global.System.import(window.ihk.resources.gfiSearchUtilsJSLink).then(() => {
  65. });
  66. }
  67. if($("[data-mwf-form]").length){
  68. global.System.import( window.ihk.resources.gfiWebformsJSLink);
  69. }
  70. $("body").on("dynamic-component-loaded", function () {
  71. if ($(".highchart-container:not(.initiated)").length) {
  72. $(".highchart-container:not(.initiated)").each((i, el) => {
  73. $(el).addClass("initiated")
  74. });
  75. global.System.import(window.ihk.resources.highchartsJSLink);
  76. }
  77. if ($(".a-z:not(.initiated)").length) {
  78. global.System.import(window.ihk.resources.gfiAZJSLink).then(() => {
  79. global.$('body').trigger('gfi-dynamic-init');
  80. });
  81. }
  82. if ($(".accordion:not(.initiated)").length) {
  83. global.System.import(window.ihk.resources.gfiAccordionJSLink).then(() => {
  84. global.$('body').trigger('gfi-dynamic-init');
  85. });
  86. }
  87. if ($(".ad-box:not(.initiated)").length) {
  88. global.System.import(window.ihk.resources.gfiAdTeaserJSLink).then(() => {
  89. global.$('body').trigger('gfi-dynamic-init');
  90. });
  91. }
  92. if ($(".anchorlinks:not(.initiated)").length) {
  93. global.System.import(window.ihk.resources.gfiAnchorsJSLink).then(() => {
  94. global.$('body').trigger('gfi-dynamic-init');
  95. });
  96. }
  97. if ($(".contact-wrapper:not(.initiated)").length) {
  98. global.System.import(window.ihk.resources.gfiContactJSLink).then(() => {
  99. global.$('body').trigger('gfi-dynamic-init');
  100. });
  101. }
  102. if ($(".events-list[data-pagination='true']:not(.initiated)").length) {
  103. global.System.import(window.ihk.resources.gfiEventsJSLink).then(() => {
  104. global.$('body').trigger('gfi-dynamic-init');
  105. });
  106. }
  107. if ($(".gallery:not(.initiated)").length) {
  108. global.System.import(window.ihk.resources.gfiGalleryJSLink).then(() => {
  109. global.$('body').trigger('gfi-dynamic-init');
  110. });
  111. }
  112. if ($(".magazine-header:not(.initiated)").length) {
  113. global.System.import(window.ihk.resources.gfiMagazineHeaderJSLink).then(() => {
  114. global.$('body').trigger('gfi-dynamic-init');
  115. });
  116. }
  117. if ($(".teasers[data-type='masonry'] .row:not(.initiated)").length) {
  118. global.System.import(window.ihk.resources.gfiMasonryJSLink).then(() => {
  119. global.$('body').trigger('gfi-dynamic-init');
  120. });
  121. }
  122. if ($(".quick-facts:not(.initiated)").length) {
  123. global.System.import(window.ihk.resources.gfiQuickFactsJSLink).then(() => {
  124. global.$('body').trigger('gfi-dynamic-init');
  125. });
  126. }
  127. if ($(".slider:not(.initiated)").length) {
  128. global.System.import(window.ihk.resources.gfiSliderJSLink).then(() => {
  129. global.$('body').trigger('gfi-dynamic-init');
  130. });
  131. }
  132. if ($(".social-box:not(.initiated)").length) {
  133. global.System.import(window.ihk.resources.gfiSocialJSLink).then(() => {
  134. global.$('body').trigger('gfi-dynamic-init');
  135. });
  136. }
  137. if ($(".survey:not(.initiated)").length) {
  138. global.System.import(window.ihk.resources.gfiSurveyJSLink).then(() => {
  139. global.$('body').trigger('gfi-dynamic-init');
  140. });
  141. }
  142. if ($(".richtext table:not(.initiated)").length) {
  143. global.System.import(window.ihk.resources.gfiTableJSLink).then(() => {
  144. global.$('body').trigger('gfi-dynamic-init');
  145. });
  146. }
  147. if ($(".topics:not(.initiated)").length) {
  148. global.System.import(window.ihk.resources.gfiTopicsJSLink).then(() => {
  149. global.$('body').trigger('gfi-dynamic-init');
  150. });
  151. }
  152. if ($(".ihk-popper-tooltip:not(.initiated)").length) {
  153. global.System.import(window.ihk.resources.gfiTooltipJSLink).then(() => {
  154. global.$('body').trigger('gfi-dynamic-init');
  155. });
  156. }
  157. if ($(".tooltip, [data-toggle='dropdown'], .modal-dialog ").length) {
  158. global.System.import(window.ihk.resources.gfiBootstrapCustomJSLink).then(() => {
  159. });
  160. }
  161. });
  162. global.$('body').trigger('dynamic-component-loaded');
  163. });