j1-template 2022.0.10 → 2022.0.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (126) hide show
  1. checksums.yaml +4 -4
  2. data/assets/themes/j1/adapter/js/advertising.js +1 -4
  3. data/assets/themes/j1/adapter/js/algolia.js +1 -4
  4. data/assets/themes/j1/adapter/js/analytics.js +237 -0
  5. data/assets/themes/j1/adapter/js/asciidoctor.js +1 -4
  6. data/assets/themes/j1/adapter/js/attic.js +1 -4
  7. data/assets/themes/j1/adapter/js/bmd.js +1 -4
  8. data/assets/themes/j1/adapter/js/carousel.js +1 -4
  9. data/assets/themes/j1/adapter/js/clipboard.js +1 -2
  10. data/assets/themes/j1/adapter/js/comments.js +387 -0
  11. data/assets/themes/j1/adapter/js/cookieConsent.js +35 -27
  12. data/assets/themes/j1/adapter/js/fab.js +1 -1
  13. data/assets/themes/j1/adapter/js/framer.js +1 -4
  14. data/assets/themes/j1/adapter/js/j1.js +52 -166
  15. data/assets/themes/j1/adapter/js/justifiedGallery.js +1 -4
  16. data/assets/themes/j1/adapter/js/justifiedGalleryCustomizer.js +1 -4
  17. data/assets/themes/j1/adapter/js/lightbox.js +1 -5
  18. data/assets/themes/j1/adapter/js/logger.js +1 -2
  19. data/assets/themes/j1/adapter/js/mmenu.js +2 -3
  20. data/assets/themes/j1/adapter/js/navigator.js +4 -3
  21. data/assets/themes/j1/adapter/js/quicksearch.js +1 -4
  22. data/assets/themes/j1/adapter/js/rouge.js +1 -4
  23. data/assets/themes/j1/adapter/js/rtable.js +1 -4
  24. data/assets/themes/j1/adapter/js/rtextResizer.js +1 -4
  25. data/assets/themes/j1/adapter/js/scroller.js +1 -4
  26. data/assets/themes/j1/adapter/js/themer.js +1 -1
  27. data/assets/themes/j1/adapter/js/toccer.js +1 -4
  28. data/assets/themes/j1/adapter/js/translator.js +25 -68
  29. data/assets/themes/j1/core/js/template.js +13 -5
  30. data/assets/themes/j1/core/js/template.min.js +1 -1
  31. data/assets/themes/j1/core/js/template.min.js.map +1 -1
  32. data/lib/j1/version.rb +1 -1
  33. data/lib/starter_web/Gemfile +1 -1
  34. data/lib/starter_web/_config.yml +1 -9
  35. data/lib/starter_web/_data/apps/carousel.yml +2 -2
  36. data/lib/starter_web/_data/apps/defaults/carousel.yml +3 -2
  37. data/lib/starter_web/_data/apps/defaults/justifiedGallery.yml +2 -2
  38. data/lib/starter_web/_data/apps/defaults/justifiedGalleryCustomizer.yml +2 -2
  39. data/lib/starter_web/_data/apps/defaults/lightGallery.yml +2 -2
  40. data/lib/starter_web/_data/apps/defaults/lightbox.yml +2 -2
  41. data/lib/starter_web/_data/apps/justifiedGallery.yml +2 -2
  42. data/lib/starter_web/_data/apps/justifiedGalleryCustomizer.yml +2 -2
  43. data/lib/starter_web/_data/apps/lightGallery.yml +2 -2
  44. data/lib/starter_web/_data/apps/lightbox.yml +2 -2
  45. data/lib/starter_web/_data/blocks/banner.yml +3 -2
  46. data/lib/starter_web/_data/blocks/defaults/banner.yml +9 -0
  47. data/lib/starter_web/_data/blocks/defaults/footer.yml +9 -0
  48. data/lib/starter_web/_data/blocks/defaults/panel.yml +9 -0
  49. data/lib/starter_web/_data/blocks/footer.yml +3 -2
  50. data/lib/starter_web/_data/blocks/panel.yml +3 -2
  51. data/lib/starter_web/_data/builder/blog_navigator.yml +3 -2
  52. data/lib/starter_web/_data/builder/defaults/blog_navigator.yml +8 -8
  53. data/lib/starter_web/_data/j1_config.yml +0 -116
  54. data/lib/starter_web/_data/layouts/default.yml +14 -14
  55. data/lib/starter_web/_data/layouts/page.yml +7 -18
  56. data/lib/starter_web/_data/layouts/post.yml +0 -11
  57. data/lib/starter_web/_data/modules/advertising.yml +3 -2
  58. data/lib/starter_web/_data/modules/analytics.yml +99 -0
  59. data/lib/starter_web/_data/modules/attics.yml +3 -2
  60. data/lib/starter_web/_data/modules/comments.yml +55 -0
  61. data/lib/starter_web/_data/modules/cookieconsent.yml +2 -1
  62. data/lib/starter_web/_data/modules/cookies.yml +2 -0
  63. data/lib/starter_web/_data/modules/defaults/advertising.yml +4 -3
  64. data/lib/starter_web/_data/modules/defaults/analytics.yml +93 -0
  65. data/lib/starter_web/_data/modules/defaults/attics.yml +3 -2
  66. data/lib/starter_web/_data/modules/defaults/authentication.yml +51 -48
  67. data/lib/starter_web/_data/modules/defaults/comments.yml +114 -0
  68. data/lib/starter_web/_data/modules/defaults/cookieconsent.yml +3 -3
  69. data/lib/starter_web/_data/modules/defaults/cookies.yml +19 -8
  70. data/lib/starter_web/_data/modules/defaults/fab.yml +4 -2
  71. data/lib/starter_web/_data/modules/defaults/framer.yml +2 -3
  72. data/lib/starter_web/_data/modules/defaults/log4javascript.yml +3 -2
  73. data/lib/starter_web/_data/modules/defaults/log4r.yml +2 -2
  74. data/lib/starter_web/_data/modules/defaults/navigator.yml +4 -2
  75. data/lib/starter_web/_data/modules/defaults/quicksearch.yml +4 -3
  76. data/lib/starter_web/_data/modules/defaults/rtable.yml +3 -2
  77. data/lib/starter_web/_data/modules/defaults/scoller.yml +3 -2
  78. data/lib/starter_web/_data/modules/defaults/themer.yml +119 -118
  79. data/lib/starter_web/_data/modules/defaults/toccer.yml +1 -1
  80. data/lib/starter_web/_data/modules/defaults/translator.yml +1 -1
  81. data/lib/starter_web/_data/modules/fab.yml +3 -2
  82. data/lib/starter_web/_data/modules/framer.yml +3 -4
  83. data/lib/starter_web/_data/modules/log4r.yml +2 -2
  84. data/lib/starter_web/_data/modules/navigator.yml +4 -2
  85. data/lib/starter_web/_data/modules/quicksearch.yml +3 -3
  86. data/lib/starter_web/_data/modules/rtable.yml +3 -3
  87. data/lib/starter_web/_data/modules/scroller.yml +2 -3
  88. data/lib/starter_web/_data/modules/themer.yml +2 -3
  89. data/lib/starter_web/_data/modules/toccer.yml +3 -3
  90. data/lib/starter_web/_data/modules/translator.yml +1 -1
  91. data/lib/starter_web/_data/plugins/defaults/paginator.yml +2 -2
  92. data/lib/starter_web/_data/plugins/paginator.yml +2 -2
  93. data/lib/starter_web/_data/resources.yml +442 -309
  94. data/lib/starter_web/_includes/attributes.asciidoc +1 -1
  95. data/lib/starter_web/_plugins/lunr_index.rb +1 -1
  96. data/lib/starter_web/collections/posts/public/featured/_posts/2021-01-01-about-cookies.ads.asciidoc +196 -0
  97. data/lib/starter_web/collections/posts/public/featured/_posts/2021-01-01-about-cookies.comments.asciidoc +182 -0
  98. data/lib/starter_web/package.json +1 -1
  99. data/lib/starter_web/pages/public/learn/roundtrip/{100_present_images.no_ads.asciidoc → 100_present_images.base.asciidoc} +0 -0
  100. data/lib/starter_web/pages/public/learn/roundtrip/100_present_images.comments.asciidoc +237 -0
  101. data/lib/starter_web/utilsrv/_defaults/package.json +1 -1
  102. data/lib/starter_web/utilsrv/package.json +1 -1
  103. metadata +12 -26
  104. data/_includes/themes/j1/blocks/ads/ad.html +0 -64
  105. data/_includes/themes/j1/modules/boards/news_pin_board.html +0 -183
  106. data/_includes/themes/j1/modules/connectors/analytic/custom-provider.html +0 -32
  107. data/_includes/themes/j1/modules/connectors/analytic/google-analytics.html +0 -30
  108. data/_includes/themes/j1/modules/connectors/analytics +0 -60
  109. data/_includes/themes/j1/modules/connectors/comment/commento.html +0 -31
  110. data/_includes/themes/j1/modules/connectors/comment/custom-provider.html +0 -30
  111. data/_includes/themes/j1/modules/connectors/comment/disqus.html +0 -32
  112. data/_includes/themes/j1/modules/connectors/comment/facebook.html +0 -30
  113. data/_includes/themes/j1/modules/connectors/comment/hyvor.html +0 -32
  114. data/_includes/themes/j1/modules/connectors/comment/just-comments.html +0 -31
  115. data/_includes/themes/j1/modules/connectors/comments +0 -64
  116. data/_includes/themes/j1/modules/connectors/sharing +0 -29
  117. data/_includes/themes/j1/modules/connectors/survey/custom-provider.html +0 -30
  118. data/_includes/themes/j1/modules/connectors/survey/jotform.html +0 -32
  119. data/_includes/themes/j1/modules/connectors/surveys +0 -58
  120. data/_includes/themes/j1/modules/connectors/translator +0 -58
  121. data/_includes/themes/j1/modules/connectors/translators/custom-translator.html +0 -32
  122. data/_includes/themes/j1/modules/connectors/translators/google-translator.html +0 -53
  123. data/_includes/themes/j1/modules/search/algolia.html +0 -181
  124. data/_includes/themes/j1/modules/search/docsearch.html +0 -42
  125. data/assets/data/disqus.js +0 -81
  126. data/assets/data/hyvor.js +0 -72
@@ -82,24 +82,10 @@ regenerate: true
82
82
  {% assign themer_enabled = modules.themer_options.enabled %}
83
83
  {% assign themer_reloadPageOnChange = modules.themer_options.reloadPageOnChange %}
84
84
  {% assign themer_hideOnReload = modules.themer_options.hideOnReload %}
85
- {% assign comment_provider = template_config.comments.provider %}
85
+
86
86
 
87
87
  {% comment %} Set variables
88
88
  -------------------------------------------------------------------------------- {% endcomment %}
89
- {% if comment_provider == 'disqus' %}
90
- {% assign site_id = template_config.comments.disqus.site_id %}
91
- {% elsif comment_provider == 'hyvor' %}
92
- {% assign site_id = template_config.comments.hyvor.site_id %}
93
- {% elsif comment_provider == 'commento' %}
94
- {% assign site_id = template_config.comments.commento.site_id %}
95
- {% elsif comment_provider == 'just-comments' %}
96
- {% assign site_id = template_config.comments.just-comments.site_id %}
97
- {% elsif comment_provider == 'facebook' %}
98
- {% assign site_id = template_config.comments.facebook.site_id %}
99
- {% else %}
100
- {% assign site_id = false %}
101
- {% endif %}
102
-
103
89
  {% assign production = false %}
104
90
  {% if environment == 'prod' or environment == 'production' %}
105
91
  {% assign production = true %}
@@ -115,14 +101,6 @@ regenerate: true
115
101
  {% assign language = "en" %}
116
102
  {% endif %}
117
103
 
118
- {% if language == "en" %}
119
- {% assign comments_headline = template_config.comments.comments_headline.en %}
120
- {% endif %}
121
-
122
- {% if language == "de" %}
123
- {% assign comments_headline = template_config.comments.comments_headline.de %}
124
- {% endif %}
125
-
126
104
  /*
127
105
  # -----------------------------------------------------------------------------
128
106
  # ~/assets/themes/j1/adapter/js/j1_template.js
@@ -151,7 +129,6 @@ regenerate: true
151
129
  /* eslint semi: "off" */
152
130
  // -----------------------------------------------------------------------------
153
131
  'use strict';
154
-
155
132
  var j1 = (function () {
156
133
 
157
134
  // ---------------------------------------------------------------------------
@@ -848,6 +825,7 @@ var j1 = (function () {
848
825
  var categoryAllowed;
849
826
 
850
827
  // provider APIs require user consent
828
+ // -----------------------------------------------------------------------
851
829
  var meta_analytics = $('meta[name=analytics]').attr('content');
852
830
  var analytics = (meta_analytics === 'true') ? true: false;
853
831
  var meta_comments = $('meta[name=comments]').attr('content');
@@ -864,6 +842,7 @@ var j1 = (function () {
864
842
  var personalization = (meta_personalization === 'true') ? true: false;
865
843
 
866
844
  // if personalized content detected, page requires user consent
845
+ // -----------------------------------------------------------------------
867
846
  if (personalization && !user_consent.personalization) {
868
847
  // redirect to error page: blocked content
869
848
  window.location.href = '/444.html';
@@ -873,7 +852,9 @@ var j1 = (function () {
873
852
  logText= '\n' + 'loading page partials: started';
874
853
  logger.info(logText);
875
854
 
876
- if (j1.appDetected()) { // app mode
855
+ if (j1.appDetected()) {
856
+ // app mode
857
+ // ---------------------------------------------------------------------
877
858
  logger.info('\n' + 'mode detected: app');
878
859
 
879
860
  $.when ($.ajax(ep_status))
@@ -916,78 +897,22 @@ var j1 = (function () {
916
897
 
917
898
  // show the page delayed
918
899
  setTimeout (function() {
919
- // Manage providers for personalization OptIn/Out (Comments|Ads)
920
- if (!user_consent.personalization) {
921
- logger.debug('\n' + 'disable comment provider: ' + comment_provider);
922
- logger.debug('\n' + 'personalization not allowed, privacy settings for personalization: ' + user_consent.personalization);
923
- $('#leave-a-comment').remove();
924
- if (comment_provider === 'disqus') {
925
- $('#dsq-count-scr').remove();
926
- $('#disqus-thread').remove();
927
- }
928
- if (comment_provider === 'hyvor') {
929
- $('#hyvor-embed').remove();
930
- $('#hyvor-talk-view').remove();
931
- }
932
- } else {
933
- if (comments) {
934
- logger.info('\n' + 'enable comment provider: ' + comment_provider);
935
- $('#main-content').append('<h2 id="leave-a-comment" class="mt-4">{{comments_headline}}</h2>');
936
- if (comment_provider === 'disqus') {
937
- logger.info('\n' + 'load comment provider code: ' + comment_provider);
938
- $('#main-content').append('<div id="disqus_thread"></div>');
939
- $('body').append('<script async id="dsq-count-scr" src="//' + site_id + '.disqus.com/count.js"></script>');
940
- j1.loadJS({
941
- xhr_data_path: '/assets/data/' + comment_provider + '.js',
942
- xhr_data_element: comment_provider
943
- });
944
- }
945
- if (comment_provider === 'hyvor') {
946
- $('body').append('<script> var HYVOR_TALK_WEBSITE = ' + site_id + '; var HYVOR_TALK_CONFIG = { url: false, id: false };');
947
- $('#main-content').append('<div id="hyvor-talk-view"></div>');
948
- $('body').append('<script async id="hyvor-embed" type="text/javascript" src="//talk.hyvor.com/web-api/embed.js"></script>');
949
- }
950
- }
951
- }
952
-
953
900
  // display page
954
- $('#no_flicker').css('display', 'block');
901
+ $('#no_flicker').css('display', 'block');
955
902
 
956
- // no dropcaps if translation enabled
957
- if (user_translate.translationEnabled) {
903
+ // manage Dropcaps if translation is enabled|disabled
904
+ // -----------------------------------------------------------------
905
+ if (user_translate.translationEnabled) {
958
906
  logger.info('\n' + 'translation enabled: ' + user_translate.translationEnabled);
959
907
  logger.debug('\n' + 'skipped processing of dropcaps');
960
- } else {
908
+ } else {
961
909
  // initialize dropcaps
962
910
  logger.info('\n' + 'post processing: createDropCap');
963
911
  j1.core.createDropCap();
964
- }
965
-
966
- // add recommended title to hyvor iframe for SEO optimization (if loadad)
967
- if (comment_provider === 'hyvor') {
968
- var dependencies_met_load_finished = setInterval (function () {
969
- if ($('#hyvor-talk-view').children().length) {
970
- $('#hyvor-talk-iframe').prop('title', 'Hyvor talk iframe');
971
- clearInterval(dependencies_met_load_finished);
972
- }
973
- }, 25);
974
- }
975
- // NOTE: Placed tracking warning/info here because page may reloaded
976
- // after cookie consent selection
977
- if (user_consent.analysis) {
978
- logger.info('\n' + 'tracking allowed, privacy settings for analysis: ' + user_consent.analysis);
979
- if (tracking_enabled && !tracking_id_valid) {
980
- logger.error('\n' + 'tracking enabled, but invalid tracking id found: ' + tracking_id);
981
- } else if (tracking_enabled && tracking_id_valid) {
982
- logger.info('\n' + 'tracking enabled, tracking id found: ' + tracking_id);
983
- } else {
984
- logger.info('\n' + 'tracking disabled, tracking id found: ' + tracking_id);
985
- }
986
- } else {
987
- logger.debug('\n' + 'tracking not allowed, privacy settings for analysis: ' + user_consent.analysis);
988
912
  }
989
913
 
990
- // show|hide cookie icon (should MOVED to Cookiebar ???)
914
+ // TODO: should MOVED to Cookiebar ???
915
+ // show|hide cookie icon
991
916
  if (j1.existsCookie(cookie_names.user_consent)) {
992
917
  // Display cookie icon
993
918
  logText = '\n' + 'show cookie icon';
@@ -1000,6 +925,7 @@ var j1 = (function () {
1000
925
  $('#quickLinksCookieButton').css('display', 'none');
1001
926
  }
1002
927
 
928
+ // TODO: should MOVED to ControlCenter Adapter ???
1003
929
  // -----------------------------------------------------------------
1004
930
  // show cc icon (currently NOT supported)
1005
931
  // $('#quickLinksControlCenterButton').css('display', 'block');
@@ -1020,6 +946,7 @@ var j1 = (function () {
1020
946
  $('#quickLinksSignInOutButton').css('display', 'block');
1021
947
  }
1022
948
 
949
+ // TODO: should MOVED to Themer ???
1023
950
  // jadams, 2021-07-25: hide|show themes menu on cookie consent
1024
951
  // (analysis|personalization) settings. BootSwatch is a 3rd party
1025
952
  // is using e.g GA. Because NO control is possible on 3rd parties,
@@ -1033,10 +960,7 @@ var j1 = (function () {
1033
960
  $("#themes_menu").show();
1034
961
  }
1035
962
 
1036
- // if the page requested contains an anchor element,
1037
- // do a smooth scroll to
1038
- j1.scrollTo();
1039
-
963
+ // detect if a loaded page has been chenged
1040
964
  if (user_session.previous_page !== user_session.current_page) {
1041
965
  logText = '\n' + 'page change detected';
1042
966
  logger.info(logText);
@@ -1052,57 +976,34 @@ var j1 = (function () {
1052
976
  current_user_data = j1.mergeData(user_session, user_state);
1053
977
  j1.core.navigator.updateSidebar(current_user_data);
1054
978
 
1055
- // Set|Log status
979
+ // set|log status
1056
980
  state = 'finished';
1057
981
  j1.setState(state);
1058
982
  logText = '\n' + 'state: ' + state;
1059
983
  logger.info(logText);
1060
984
  logText = '\n' + 'page finalized successfully';
1061
985
  logger.info(logText);
986
+
987
+ // do a (smooth) scroll if all nav elements ready
988
+ // -----------------------------------------------------------------
989
+ var dependencies_met_navigator_finished = setInterval(function() {
990
+ if (j1.adapter.navigator.getState() == 'finished') {
991
+ // if a page requested contains an anchor element, do a smooth scroll
992
+ j1.scrollTo();
993
+ clearInterval(dependencies_met_navigator_finished);
994
+ }
995
+ }, 25);
1062
996
  }, flickerTimeout);
1063
997
  });
1064
998
  } else {
1065
999
  // web mode
1000
+ // ---------------------------------------------------------------------
1066
1001
  setTimeout (function() {
1067
1002
  // j1.setState('finished');
1068
1003
  logger.info('\n' + 'state: finished');
1069
1004
  logger.info('\n' + 'page initialization: finished');
1070
1005
 
1071
- // Manage providers for personalization OptIn/Out (Comments|Ads)
1072
- if (!user_consent.personalization) {
1073
- logger.debug('\n' + 'disable comment provider: ' + comment_provider);
1074
- logger.debug('\n' + 'personalization not allowed, privacy settings for personalization: ' + user_consent.personalization);
1075
- $('#leave-a-comment').remove();
1076
- if (comment_provider === 'disqus') {
1077
- $('#dsq-count-scr').remove();
1078
- $('#disqus-thread').remove();
1079
- }
1080
- if (comment_provider === 'hyvor') {
1081
- $('#hyvor-embed').remove();
1082
- $('#hyvor-talk-view').remove();
1083
- }
1084
- } else {
1085
- if (comments) {
1086
- logger.info('\n' + 'enable comment provider: ' + comment_provider);
1087
- $('#main-content').append('<h2 id="leave-a-comment" class="mt-4">{{comments_headline}}</h2>');
1088
- if (comment_provider === 'disqus') {
1089
- logger.info('\n' + 'load comment provider code: ' + comment_provider);
1090
- $('#main-content').append('<div id="disqus_thread"></div>');
1091
- $('body').append('<script async id="dsq-count-scr" src="//' + site_id + '.disqus.com/count.js"></script>');
1092
- j1.loadJS({
1093
- xhr_data_path: '/assets/data/' + comment_provider + '.js',
1094
- xhr_data_element: comment_provider
1095
- });
1096
- }
1097
- if (comment_provider === 'hyvor') {
1098
- $('body').append('<script> var HYVOR_TALK_WEBSITE = ' + site_id + '; var HYVOR_TALK_CONFIG = { url: false, id: false };');
1099
- $('#main-content').append('<div id="hyvor-talk-view"></div>');
1100
- $('body').append('<script async id="hyvor-embed" type="text/javascript" src="//talk.hyvor.com/web-api/embed.js"></script>');
1101
- }
1102
- }
1103
- }
1104
-
1105
- // display page
1006
+ // display the page loaded
1106
1007
  $('#no_flicker').css('display', 'block');
1107
1008
 
1108
1009
  // jadams, 2021-11-19: test code for 'tapTarget' of 'materializeCss'
@@ -1129,7 +1030,8 @@ var j1 = (function () {
1129
1030
  $(this).parents(".card-header").toggleClass("highlight");
1130
1031
  });
1131
1032
 
1132
- // no dropcaps if translation enabled
1033
+ // manage Dropcaps if translation is enabled|disabled
1034
+ // -------------------------------------------------------------------
1133
1035
  if (user_translate.translationEnabled) {
1134
1036
  logger.info('\n' + 'translation enabled: ' + user_translate.translationEnabled);
1135
1037
  logger.debug('\n' + 'skipped processing of dropcaps');
@@ -1139,31 +1041,6 @@ var j1 = (function () {
1139
1041
  j1.core.createDropCap();
1140
1042
  }
1141
1043
 
1142
- // add recommended title to hyvor iframe for SEO optimization (if loadad)
1143
- if (comment_provider === 'hyvor') {
1144
- var dependencies_met_load_finished = setInterval (function () {
1145
- if ($('#hyvor-talk-view').children().length) {
1146
- $('#hyvor-talk-iframe').prop('title', 'Hyvor talk iframe');
1147
- clearInterval(dependencies_met_load_finished);
1148
- }
1149
- }, 25);
1150
- }
1151
-
1152
- // NOTE: Placed tracking warning/info here because page may reloaded
1153
- // after cookie consent selection
1154
- if (user_consent.analysis) {
1155
- logger.info('\n' + 'tracking allowed, privacy settings for analysis: ' + user_consent.analysis);
1156
- if (tracking_enabled && !tracking_id_valid) {
1157
- logger.error('\n' + 'tracking enabled, but invalid tracking id found: ' + tracking_id);
1158
- } else if (tracking_enabled && tracking_id_valid) {
1159
- logger.info('\n' + 'tracking enabled, tracking id found: ' + tracking_id);
1160
- } else {
1161
- logger.info('\n' + 'tracking disabled, tracking id found: ' + tracking_id);
1162
- }
1163
- } else {
1164
- logger.debug('\n' + 'tracking not allowed, privacy settings for analysis: ' + user_consent.analysis);
1165
- }
1166
-
1167
1044
  logger.info('\n' + 'mode detected: web');
1168
1045
  logger.info('\n' + 'hide signin icon');
1169
1046
  $('#quickLinksSignInOutButton').css('display', 'none');
@@ -1177,9 +1054,12 @@ var j1 = (function () {
1177
1054
  expires: 0
1178
1055
  });
1179
1056
 
1057
+ // TODO: should MOVED to ControlCenter Adapter ???
1058
+ // -----------------------------------------------------------------
1180
1059
  // show cc icon (currently NOT supported)
1181
1060
  // $('#quickLinksControlCenterButton').css('display', 'block');
1182
1061
 
1062
+ // TODO: should MOVED to Cookiebar ???
1183
1063
  // show|hide cookie icon
1184
1064
  if (j1.existsCookie(cookie_names.user_consent)) {
1185
1065
  // Display cookie icon
@@ -1193,6 +1073,7 @@ var j1 = (function () {
1193
1073
  $('#quickLinksCookieButton').css('display', 'none');
1194
1074
  }
1195
1075
 
1076
+ // TODO: should MOVED to Themer ???
1196
1077
  // jadams, 2021-07-25: hide|show themes menu on cookie consent
1197
1078
  // (analysis|personalization) settings. BootSwatch is a 3rd party
1198
1079
  // is using e.g GA. Because NO control is possible on 3rd parties,
@@ -1206,10 +1087,7 @@ var j1 = (function () {
1206
1087
  $("#themes_menu").show();
1207
1088
  }
1208
1089
 
1209
- // If the page requested contains an anchor element,
1210
- // do a smooth scroll
1211
- j1.scrollTo();
1212
-
1090
+ // detect if a loaded page has been chenged
1213
1091
  if (user_session.previous_page !== user_session.current_page) {
1214
1092
  logText = '\n' + 'page change detected';
1215
1093
  logger.info(logText);
@@ -1225,13 +1103,23 @@ var j1 = (function () {
1225
1103
  current_user_data = j1.mergeData(user_session, user_state);
1226
1104
  j1.core.navigator.updateSidebar(current_user_data);
1227
1105
 
1228
- // Set|Log status
1106
+ // set|log status
1229
1107
  state = 'finished';
1230
1108
  j1.setState(state);
1231
1109
  logText = '\n' + 'state: ' + state;
1232
1110
  logger.info(logText);
1233
1111
  logText = '\n' + 'page finalized successfully';
1234
1112
  logger.info(logText);
1113
+
1114
+ // do a (smooth) scroll if all nav elements ready
1115
+ // -------------------------------------------------------------------
1116
+ var dependencies_met_navigator_finished = setInterval(function() {
1117
+ if (j1.adapter.navigator.getState() == 'finished') {
1118
+ // if a page requested contains an anchor element, do a smooth scroll
1119
+ j1.scrollTo();
1120
+ clearInterval(dependencies_met_navigator_finished);
1121
+ }
1122
+ }, 25);
1235
1123
  }, flickerTimeout);
1236
1124
  }
1237
1125
  },
@@ -1324,9 +1212,9 @@ var j1 = (function () {
1324
1212
  var anchor = window.location.href.split('#')[1];
1325
1213
  var anchor_id = typeof anchor !== 'undefined' ? '#' + anchor : false;
1326
1214
  var scrollDuration = {{toccer_options.scrollSmoothDuration}};
1215
+ var scrollOffset = j1.getScrollOffset();
1327
1216
  var isSlider = false;
1328
1217
  var selector;
1329
- var scrollOffset;
1330
1218
 
1331
1219
  if (typeof anchor === 'undefined') {
1332
1220
  return false;
@@ -1334,15 +1222,13 @@ var j1 = (function () {
1334
1222
  return false;
1335
1223
  }
1336
1224
 
1337
- scrollOffset = j1.getScrollOffset();
1338
-
1339
1225
  // Check if the anchor is an slider/gallery element
1340
1226
  if (typeof anchor !== 'undefined') {
1341
- isSlider = anchor.includes('slide');
1227
+ isSlider = anchor.includes('slide');
1342
1228
  }
1343
1229
 
1344
1230
  if (anchor_id && anchor_id !== '#' && !isSlider) {
1345
- // scroll only, if an anchor is given with URL
1231
+ // scroll only, if an anchor is given with an URL
1346
1232
  selector = $(anchor_id);
1347
1233
  if (selector.length) {
1348
1234
  j1.core.scrollSmooth.scroll(anchor_id, {
@@ -1669,11 +1555,11 @@ var j1 = (function () {
1669
1555
  domainAttribute = domain;
1670
1556
  stringifiedAttributes += '; ' + 'Domain=' + domainAttribute;
1671
1557
  } else {
1672
- domainAttribute = '';
1558
+ domainAttribute = 'localhost';
1673
1559
  stringifiedAttributes += '; ' + 'Domain=' + domainAttribute;
1674
1560
  }
1675
1561
 
1676
- if (settings.secure == 'true') {
1562
+ if (settings.secure == true) {
1677
1563
  stringifiedAttributes += '; ' + 'Secure=' + settings.secure;
1678
1564
  }
1679
1565
 
@@ -76,10 +76,7 @@ regenerate: true
76
76
  /* eslint indent: "off" */
77
77
  // -----------------------------------------------------------------------------
78
78
  'use strict';
79
-
80
- {% comment %} Main
81
- -------------------------------------------------------------------------------- {% endcomment %}
82
- j1.adapter['justifiedGallery'] = (function (j1, window) {
79
+ j1.adapter.justifiedGallery = (function (j1, window) {
83
80
 
84
81
  {% comment %} Global variables
85
82
  ------------------------------------------------------------------------------ {% endcomment %}
@@ -89,10 +89,7 @@ regenerate: true
89
89
  /* eslint indent: "off" */
90
90
  // -----------------------------------------------------------------------------
91
91
  'use strict';
92
-
93
- {% comment %} Main
94
- -------------------------------------------------------------------------------- {% endcomment %}
95
- j1.adapter['justifiedGalleryCustomizer'] = (function (j1, window) {
92
+ j1.adapter.justifiedGalleryCustomizer = (function (j1, window) {
96
93
 
97
94
  {% comment %} Set global variables
98
95
  ------------------------------------------------------------------------------ {% endcomment %}
@@ -80,11 +80,7 @@ regenerate: false
80
80
  /* eslint indent: "off" */
81
81
  // -----------------------------------------------------------------------------
82
82
  'use strict';
83
-
84
- {% comment %} Main
85
- --------------------------------------------------------------- {% endcomment %}
86
- // j1.Lightbox = (function (j1, window) {
87
- j1.adapter['lightbox'] = (function (j1, window) {
83
+ j1.adapter.lightbox = (function (j1, window) {
88
84
 
89
85
  {% comment %} Global variables
90
86
  ------------------------------------------------------------------------------ {% endcomment %}
@@ -80,8 +80,7 @@ regenerate: true
80
80
  /* eslint indent: "off" */
81
81
  // -----------------------------------------------------------------------------
82
82
  'use strict';
83
-
84
- j1.adapter['logger'] = (function (j1, window) {
83
+ j1.adapter.logger = (function (j1, window) {
85
84
 
86
85
  // ---------------------------------------------------------------------------
87
86
  // globals
@@ -101,8 +101,7 @@ regenerate: true
101
101
  /* eslint indent: "off" */
102
102
  // -----------------------------------------------------------------------------
103
103
  'use strict';
104
-
105
- j1.adapter['mmenu'] = (function (j1, window) {
104
+ j1.adapter.mmenu = (function (j1, window) {
106
105
 
107
106
  // ---------------------------------------------------------------------------
108
107
  // globals
@@ -363,7 +362,7 @@ j1.adapter['mmenu'] = (function (j1, window) {
363
362
  logger.debug('\n' + 'hide|show the main nav menu');
364
363
  // switch off|on the (main) nav menu
365
364
  $('#' + navMenuOptions.nav_main_menu).toggle();
366
- $('#' + navMenuOptions.nav_quicklinks).toggle();
365
+ $('#' + navMenuOptions.nav_quicklinks).toggle();
367
366
  }
368
367
  });
369
368
 
@@ -148,8 +148,7 @@ ToDo: Remove configuration from j1_navigator.yml
148
148
  /* eslint indent: "off" */
149
149
  // -----------------------------------------------------------------------------
150
150
  'use strict';
151
-
152
- j1.adapter['navigator'] = (function (j1, window) {
151
+ j1.adapter.navigator = (function (j1, window) {
153
152
 
154
153
  // ---------------------------------------------------------------------------
155
154
  // globals
@@ -400,11 +399,13 @@ j1.adapter['navigator'] = (function (j1, window) {
400
399
  clearInterval(dependencies_met_page_finished);
401
400
  }, 25);
402
401
  }
403
- _this.setState('initialized');
402
+ // _this.setState('initialized');
403
+ _this.setState('finished');
404
404
  }, 25); // END 'dependencies_met_page_finished'
405
405
  } else {
406
406
  logText = '\n' + 'theme switcher detected as: disabled';
407
407
  logger.info(logText);
408
+ _this.setState('finished');
408
409
  }
409
410
 
410
411
  // -----------------------------------------------------------------
@@ -73,10 +73,7 @@ regenerate: true
73
73
  /* eslint indent: "off" */
74
74
  // -----------------------------------------------------------------------------
75
75
  'use strict';
76
-
77
- {% comment %} Main
78
- -------------------------------------------------------------------------------- {% endcomment %}
79
- j1.adapter['quicksearch'] = (function (j1, window) {
76
+ j1.adapter.quicksearch = (function (j1, window) {
80
77
 
81
78
  {% comment %} Set global variables
82
79
  ------------------------------------------------------------------------------ {% endcomment %}
@@ -64,10 +64,7 @@ regenerate: false
64
64
  /* eslint quotes: "off" */
65
65
  // -----------------------------------------------------------------------------
66
66
  'use strict';
67
-
68
- {% comment %} Main
69
- -------------------------------------------------------------------------------- {% endcomment %}
70
- j1.adapter['rouge'] = (function (j1, window) {
67
+ j1.adapter.rouge = (function (j1, window) {
71
68
 
72
69
  // ---------------------------------------------------------------------------
73
70
  // globals
@@ -75,10 +75,7 @@ regenerate: true
75
75
  /* eslint indent: "off" */
76
76
  // -----------------------------------------------------------------------------
77
77
  'use strict';
78
-
79
- {% comment %} Main
80
- -------------------------------------------------------------------------------- {% endcomment %}
81
- j1.adapter['rtable'] = (function (j1, window) {
78
+ j1.adapter.rtable = (function (j1, window) {
82
79
 
83
80
  {% comment %} Set global variables
84
81
  ------------------------------------------------------------------------------ {% endcomment %}
@@ -89,10 +89,7 @@ regenerate: true
89
89
  /* eslint indent: "off" */
90
90
  // -----------------------------------------------------------------------------
91
91
  'use strict';
92
-
93
- {% comment %} Main
94
- -------------------------------------------------------------------------------- {% endcomment %}
95
- j1.adapter['rtextResizer'] = (function (j1, window) {
92
+ j1.adapter.rtextResizer = (function (j1, window) {
96
93
 
97
94
  {% comment %} Set global variables
98
95
  ------------------------------------------------------------------------------ {% endcomment %}
@@ -74,10 +74,7 @@ regenerate: true
74
74
  /* eslint indent: "off" */
75
75
  // -----------------------------------------------------------------------------
76
76
  'use strict';
77
-
78
- {% comment %} Main
79
- -------------------------------------------------------------------------------- {% endcomment %}
80
- j1.adapter['scroller'] = (function (j1, window) {
77
+ j1.adapter.scroller = (function (j1, window) {
81
78
 
82
79
  {% comment %} Set global variables
83
80
  -------------------------------------------------------------------------------- {% endcomment %}
@@ -96,8 +96,8 @@ regenerate: true
96
96
  // -----------------------------------------------------------------------------
97
97
 
98
98
  'use strict';
99
+ j1.adapter.themer = (function (j1, window) {
99
100
 
100
- j1.adapter['themer'] = (function (j1, window) {
101
101
  // ---------------------------------------------------------------------------
102
102
  // globals
103
103
  // ---------------------------------------------------------------------------
@@ -90,10 +90,7 @@ regenerate: true
90
90
  /* eslint indent: "off" */
91
91
  // -----------------------------------------------------------------------------
92
92
  'use strict';
93
-
94
- {% comment %} Main
95
- -------------------------------------------------------------------------------- {% endcomment %}
96
- j1.adapter['toccer'] = (function () {
93
+ j1.adapter.toccer = (function () {
97
94
 
98
95
  {% comment %} Set global variables
99
96
  ------------------------------------------------------------------------------ {% endcomment %}