j1-template 2020.0.8 → 2020.0.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (341) hide show
  1. checksums.yaml +4 -4
  2. data/_includes/themes/j1/blocks/ads/ad.html +64 -0
  3. data/_includes/themes/j1/blocks/footer/boxes/links_box.proc +1 -1
  4. data/_includes/themes/j1/layouts/content_generator_blog_archive.html +3 -2
  5. data/_includes/themes/j1/layouts/content_generator_collection.html +3 -2
  6. data/_includes/themes/j1/layouts/content_generator_page.html +3 -2
  7. data/_includes/themes/j1/layouts/content_generator_post.html +12 -12
  8. data/_includes/themes/j1/layouts/layout_metadata_generator.html +134 -4
  9. data/_includes/themes/j1/modules/connectors/ad/custom-provider.html +6 -9
  10. data/_includes/themes/j1/modules/connectors/ad/google-adsense.html +9 -6
  11. data/_includes/themes/j1/modules/connectors/ads +3 -6
  12. data/_includes/themes/j1/modules/navigator/generator.html +6 -7
  13. data/_includes/themes/j1/modules/navigator/procedures/topsearch.proc +10 -5
  14. data/_includes/themes/j1/procedures/layouts/module_writer.proc +1 -1
  15. data/_includes/themes/j1/procedures/posts/collate_timeline.proc +7 -7
  16. data/_layouts/default.html +18 -13
  17. data/assets/data/authclient.html +18 -8
  18. data/assets/data/banner.html +23 -23
  19. data/assets/data/carousel.json +30 -21
  20. data/assets/data/cookie_consent.html +79 -51
  21. data/assets/data/footer.html +14 -5
  22. data/assets/data/galleries.json +90 -81
  23. data/assets/data/gallery_customizer.html +19 -10
  24. data/assets/data/mdi_icons.json +55 -1
  25. data/assets/data/menu.html +14 -7
  26. data/assets/data/mmenu.html +47 -94
  27. data/assets/data/mmenu_sidebar.html +40 -44
  28. data/assets/data/mmenu_toc.html +19 -3
  29. data/assets/data/panel.html +30 -23
  30. data/assets/data/quicklinks.html +13 -3
  31. data/assets/data/{search.yml → search.json} +44 -14
  32. data/assets/data/ssm.html +20 -9
  33. data/assets/data/themes.json +17 -6
  34. data/assets/data/twa_v1.json +7034 -6978
  35. data/assets/themes/j1/adapter/js/algolia.js +34 -17
  36. data/assets/themes/j1/adapter/js/attic.js +66 -46
  37. data/assets/themes/j1/adapter/js/carousel.js +43 -22
  38. data/assets/themes/j1/adapter/js/clipboard.js +230 -0
  39. data/assets/themes/j1/adapter/js/cookie_consent.js +21 -4
  40. data/assets/themes/j1/adapter/js/framer.js +18 -3
  41. data/assets/themes/j1/adapter/js/gallery_customizer.js +27 -10
  42. data/assets/themes/j1/adapter/js/j1.js +342 -757
  43. data/assets/themes/j1/adapter/js/{justified_gallery.js → jf_gallery.js} +64 -38
  44. data/assets/themes/j1/adapter/js/lightbox.js +20 -3
  45. data/assets/themes/j1/adapter/js/logger.js +23 -6
  46. data/assets/themes/j1/adapter/js/mdb.js +167 -0
  47. data/assets/themes/j1/adapter/js/mmenu.js +33 -30
  48. data/assets/themes/j1/adapter/js/navigator.js +126 -140
  49. data/assets/themes/j1/adapter/js/searcher.js +22 -4
  50. data/assets/themes/j1/adapter/js/ssm.js +84 -63
  51. data/assets/themes/j1/adapter/js/themer.js +35 -53
  52. data/assets/themes/j1/adapter/js/toccer.js +29 -14
  53. data/assets/themes/j1/core/css/theme_extensions.css +120 -1230
  54. data/assets/themes/j1/core/css/theme_extensions.min.css +1 -1
  55. data/assets/themes/j1/core/css/uno.css +256 -1288
  56. data/assets/themes/j1/core/css/uno.min.css +1 -1
  57. data/assets/themes/j1/core/css/vendor.css +7 -57
  58. data/assets/themes/j1/core/css/vendor.min.css +2 -2
  59. data/assets/themes/j1/core/js/template.js +16 -86
  60. data/assets/themes/j1/core/js/template.js.map +1 -1
  61. data/assets/themes/j1/core/js/template.min.js +1 -1
  62. data/assets/themes/j1/extensions/bsDatepicker/css/datepicker.css +203 -0
  63. data/assets/themes/j1/extensions/bsDatepicker/css/theme/uno.css +235 -0
  64. data/assets/themes/j1/extensions/bsDatepicker/js/datepicker.js +509 -0
  65. data/assets/themes/j1/extensions/bsDatepicker/less/datepicker.less +122 -0
  66. data/assets/themes/j1/extensions/bsThemeSwitcher/js/switcher.js +425 -0
  67. data/assets/themes/j1/extensions/bsThemeSwitcher/js/switcher.min.js +20 -0
  68. data/assets/themes/j1/extensions/clipboard/LICENSE +20 -0
  69. data/assets/themes/j1/extensions/clipboard/css/theme/uno.css +52 -0
  70. data/assets/themes/j1/extensions/clipboard/css/theme/uno.min.css +52 -0
  71. data/assets/themes/j1/extensions/clipboard/js/clipboard.js +975 -0
  72. data/assets/themes/j1/extensions/clipboard/js/clipboard.min.js +7 -0
  73. data/assets/themes/j1/extensions/{iconify → iconifyAPI}/js/iconify.min.js +0 -0
  74. data/assets/themes/j1/extensions/iframeResizer/LICENSE +21 -0
  75. data/assets/themes/j1/extensions/iframeResizer/examples/frame.absolute.html +127 -0
  76. data/assets/themes/j1/extensions/iframeResizer/examples/frame.content.html +157 -0
  77. data/assets/themes/j1/extensions/iframeResizer/examples/frame.hover.html +68 -0
  78. data/assets/themes/j1/extensions/iframeResizer/examples/frame.nested.html +100 -0
  79. data/assets/themes/j1/extensions/iframeResizer/examples/frame.textarea.html +45 -0
  80. data/assets/themes/j1/extensions/iframeResizer/examples/frame.tolerance.html +113 -0
  81. data/assets/themes/j1/extensions/iframeResizer/examples/index.html +83 -0
  82. data/assets/themes/j1/extensions/iframeResizer/examples/two.html +88 -0
  83. data/assets/themes/j1/extensions/iframeResizer/js/client/iframeResizer.contentWindow.js +1288 -0
  84. data/assets/themes/j1/extensions/iframeResizer/js/client/iframeResizer.contentWindow.map +1 -0
  85. data/assets/themes/j1/extensions/iframeResizer/js/client/iframeResizer.contentWindow.min.js +10 -0
  86. data/assets/themes/j1/extensions/iframeResizer/js/iframeResizer.js +1390 -0
  87. data/assets/themes/j1/extensions/iframeResizer/js/iframeResizer.map +1 -0
  88. data/assets/themes/j1/extensions/iframeResizer/js/iframeResizer.min.js +9 -0
  89. data/assets/themes/j1/extensions/jqMouseWheel/README.md +76 -0
  90. data/assets/themes/j1/extensions/jqMouseWheel/js/jquery.mousewheel.js +221 -0
  91. data/assets/themes/j1/extensions/jqMouseWheel/js/jquery.mousewheel.min.js +9 -0
  92. data/assets/themes/j1/extensions/{justified_gallery → justifiedGallery}/LICENSE +0 -0
  93. data/assets/themes/j1/extensions/{justified_gallery → justifiedGallery}/README.md +0 -0
  94. data/assets/themes/j1/extensions/{justified_gallery → justifiedGallery}/_versions/v3.7.0/css/justifiedGallery.css +0 -0
  95. data/assets/themes/j1/extensions/{justified_gallery → justifiedGallery}/_versions/v3.7.0/css/justifiedGallery.min.css +0 -0
  96. data/assets/themes/j1/extensions/{justified_gallery → justifiedGallery}/_versions/v3.7.0/css/theme/uno.css +0 -0
  97. data/assets/themes/j1/extensions/{justified_gallery → justifiedGallery}/_versions/v3.7.0/js/justifiedGallery.3.7.0.js +0 -0
  98. data/assets/themes/j1/extensions/{justified_gallery → justifiedGallery}/_versions/v3.7.0/js/justifiedGallery.js +0 -0
  99. data/assets/themes/j1/extensions/{justified_gallery → justifiedGallery}/_versions/v3.7.0/js/justifiedGallery.min.js +0 -0
  100. data/assets/themes/j1/extensions/{justified_gallery → justifiedGallery}/_versions/v3.7.0/less/.csslintrc +0 -0
  101. data/assets/themes/j1/extensions/{justified_gallery → justifiedGallery}/_versions/v3.7.0/less/justifiedGallery.less +0 -0
  102. data/assets/themes/j1/extensions/{justified_gallery → justifiedGallery}/_versions/v4.0.0/css/justifiedGallery.css +0 -0
  103. data/assets/themes/j1/extensions/{justified_gallery → justifiedGallery}/_versions/v4.0.0/css/justifiedGallery.min.css +0 -0
  104. data/assets/themes/j1/extensions/{justified_gallery → justifiedGallery}/_versions/v4.0.0/css/theme/uno.css +0 -0
  105. data/assets/themes/j1/extensions/{justified_gallery → justifiedGallery}/_versions/v4.0.0/js/jquery.justifiedGallery.js +0 -0
  106. data/assets/themes/j1/extensions/{justified_gallery → justifiedGallery}/_versions/v4.0.0/js/jquery.justifiedGallery.min.js +0 -0
  107. data/assets/themes/j1/extensions/{justified_gallery → justifiedGallery}/css/justifiedGallery.css +0 -0
  108. data/assets/themes/j1/extensions/{justified_gallery → justifiedGallery}/css/justifiedGallery.min.css +0 -0
  109. data/assets/themes/j1/extensions/{justified_gallery → justifiedGallery}/css/theme/uno.css +0 -0
  110. data/assets/themes/j1/extensions/{justified_gallery → justifiedGallery}/css/theme/uno.min.css +0 -0
  111. data/assets/themes/j1/extensions/{justified_gallery → justifiedGallery}/js/justifiedGallery.js +0 -0
  112. data/assets/themes/j1/extensions/{justified_gallery → justifiedGallery}/js/justifiedGallery.min.js +0 -0
  113. data/assets/themes/j1/extensions/{light_gallery → lightGallery}/css/core/lg-fb-comment-box.css +0 -0
  114. data/assets/themes/j1/extensions/{light_gallery → lightGallery}/css/core/lg-fb-comment-box.min.css +0 -0
  115. data/assets/themes/j1/extensions/{light_gallery → lightGallery}/css/core/lg-transitions.css +0 -0
  116. data/assets/themes/j1/extensions/{light_gallery → lightGallery}/css/core/lg-transitions.min.css +0 -0
  117. data/assets/themes/j1/extensions/{light_gallery → lightGallery}/css/core/lightgallery.css +0 -0
  118. data/assets/themes/j1/extensions/{light_gallery → lightGallery}/css/core/lightgallery.min.css +0 -0
  119. data/assets/themes/j1/extensions/{light_gallery → lightGallery}/css/fonts/lg.eot +0 -0
  120. data/assets/themes/j1/extensions/{light_gallery → lightGallery}/css/fonts/lg.svg +0 -0
  121. data/assets/themes/j1/extensions/{light_gallery → lightGallery}/css/fonts/lg.ttf +0 -0
  122. data/assets/themes/j1/extensions/{light_gallery → lightGallery}/css/fonts/lg.woff +0 -0
  123. data/assets/themes/j1/extensions/{light_gallery → lightGallery}/css/img/loading.gif +0 -0
  124. data/assets/themes/j1/extensions/{light_gallery → lightGallery}/css/img/video-play.png +0 -0
  125. data/assets/themes/j1/extensions/{light_gallery → lightGallery}/css/img/vimeo-play.png +0 -0
  126. data/assets/themes/j1/extensions/{light_gallery → lightGallery}/css/img/youtube-play.png +0 -0
  127. data/assets/themes/j1/extensions/{light_gallery → lightGallery}/css/themes/icons/animation-w.png +0 -0
  128. data/assets/themes/j1/extensions/{light_gallery → lightGallery}/css/themes/icons/customize-w.png +0 -0
  129. data/assets/themes/j1/extensions/{light_gallery → lightGallery}/css/themes/icons/dynamic-w.png +0 -0
  130. data/assets/themes/j1/extensions/{light_gallery → lightGallery}/css/themes/icons/facebook-icon.svg +0 -0
  131. data/assets/themes/j1/extensions/{light_gallery → lightGallery}/css/themes/icons/googleplus-icon.svg +0 -0
  132. data/assets/themes/j1/extensions/{light_gallery → lightGallery}/css/themes/icons/html5-w.png +0 -0
  133. data/assets/themes/j1/extensions/{light_gallery → lightGallery}/css/themes/icons/linked-in.png +0 -0
  134. data/assets/themes/j1/extensions/{light_gallery → lightGallery}/css/themes/icons/module-w.png +0 -0
  135. data/assets/themes/j1/extensions/{light_gallery → lightGallery}/css/themes/icons/play-button.png +0 -0
  136. data/assets/themes/j1/extensions/{light_gallery → lightGallery}/css/themes/icons/responsive-w.png +0 -0
  137. data/assets/themes/j1/extensions/{light_gallery → lightGallery}/css/themes/icons/thumb-w.png +0 -0
  138. data/assets/themes/j1/extensions/{light_gallery → lightGallery}/css/themes/icons/touch-w.png +0 -0
  139. data/assets/themes/j1/extensions/{light_gallery → lightGallery}/css/themes/icons/twitter-icon.svg +0 -0
  140. data/assets/themes/j1/extensions/{light_gallery → lightGallery}/css/themes/icons/twitter.png +0 -0
  141. data/assets/themes/j1/extensions/{light_gallery → lightGallery}/css/themes/icons/video1-w.png +0 -0
  142. data/assets/themes/j1/extensions/{light_gallery → lightGallery}/css/themes/icons/zoom-w.png +0 -0
  143. data/assets/themes/j1/extensions/{light_gallery → lightGallery}/css/themes/icons/zoom.png +0 -0
  144. data/assets/themes/j1/extensions/{light_gallery → lightGallery}/css/themes/uno.css +1 -1
  145. data/assets/themes/j1/extensions/{light_gallery → lightGallery}/css/themes/uno.min.css +1 -1
  146. data/assets/themes/j1/extensions/{light_gallery → lightGallery}/js/core/lightgallery.js +0 -0
  147. data/assets/themes/j1/extensions/{light_gallery → lightGallery}/js/core/lightgallery.min.js +0 -0
  148. data/assets/themes/j1/extensions/{light_gallery → lightGallery}/js/modules/j1/j1-video.js +0 -0
  149. data/assets/themes/j1/extensions/{light_gallery → lightGallery}/js/modules/j1/j1-video.min.js +0 -0
  150. data/assets/themes/j1/extensions/{light_gallery → lightGallery}/js/modules/lg-autoplay.js +0 -0
  151. data/assets/themes/j1/extensions/{light_gallery → lightGallery}/js/modules/lg-autoplay.min.js +0 -0
  152. data/assets/themes/j1/extensions/{light_gallery → lightGallery}/js/modules/lg-fullscreen.js +0 -0
  153. data/assets/themes/j1/extensions/{light_gallery → lightGallery}/js/modules/lg-fullscreen.min.js +0 -0
  154. data/assets/themes/j1/extensions/{light_gallery → lightGallery}/js/modules/lg-hash.js +0 -0
  155. data/assets/themes/j1/extensions/{light_gallery → lightGallery}/js/modules/lg-hash.min.js +0 -0
  156. data/assets/themes/j1/extensions/{light_gallery → lightGallery}/js/modules/lg-pager.js +0 -0
  157. data/assets/themes/j1/extensions/{light_gallery → lightGallery}/js/modules/lg-pager.min.js +0 -0
  158. data/assets/themes/j1/extensions/{light_gallery → lightGallery}/js/modules/lg-share.js +0 -0
  159. data/assets/themes/j1/extensions/{light_gallery → lightGallery}/js/modules/lg-share.min.js +0 -0
  160. data/assets/themes/j1/extensions/{light_gallery → lightGallery}/js/modules/lg-thumbnail.js +0 -0
  161. data/assets/themes/j1/extensions/{light_gallery → lightGallery}/js/modules/lg-thumbnail.min.js +0 -0
  162. data/assets/themes/j1/extensions/{light_gallery → lightGallery}/js/modules/lg-video.js +0 -0
  163. data/assets/themes/j1/extensions/{light_gallery → lightGallery}/js/modules/lg-video.min.js +0 -0
  164. data/assets/themes/j1/extensions/{light_gallery → lightGallery}/js/modules/lg-zoom.js +0 -0
  165. data/assets/themes/j1/extensions/{light_gallery → lightGallery}/js/modules/lg-zoom.min.js +0 -0
  166. data/assets/themes/j1/extensions/lightbox/LICENSE +22 -0
  167. data/assets/themes/j1/extensions/lightbox/css/lightbox.css +224 -0
  168. data/assets/themes/j1/extensions/lightbox/css/lightbox.min.css +21 -0
  169. data/assets/themes/j1/extensions/lightbox/css/theme/uno.css +25 -0
  170. data/assets/themes/j1/extensions/lightbox/css/theme/uno.min.css +26 -0
  171. data/{lib/starter_web/assets/images/modules/lightbox → assets/themes/j1/extensions/lightbox/images}/close.png +0 -0
  172. data/{lib/starter_web/assets/images/modules/lightbox → assets/themes/j1/extensions/lightbox/images}/loading.gif +0 -0
  173. data/{lib/starter_web/assets/images/modules/lightbox → assets/themes/j1/extensions/lightbox/images}/next.png +0 -0
  174. data/{lib/starter_web/assets/images/modules/lightbox → assets/themes/j1/extensions/lightbox/images}/prev.png +0 -0
  175. data/assets/themes/j1/extensions/lightbox/js/lightbox.js +583 -0
  176. data/assets/themes/j1/extensions/lightbox/js/lightbox.min.js +35 -0
  177. data/assets/themes/j1/extensions/mmenuLight/css/mmenu.css +392 -0
  178. data/assets/themes/j1/extensions/mmenuLight/css/mmenu.min.css +393 -0
  179. data/assets/themes/j1/extensions/mmenuLight/css/theme/uno.css +170 -0
  180. data/assets/themes/j1/extensions/mmenuLight/css/theme/uno.min.css +169 -0
  181. data/assets/themes/j1/extensions/mmenuLight/js/mmenu.js +30 -0
  182. data/assets/themes/j1/extensions/noUISlider/LICENSE +13 -0
  183. data/assets/themes/j1/extensions/noUISlider/css/nouislider.css +260 -0
  184. data/assets/themes/j1/extensions/noUISlider/css/nouislider.min.css +1 -0
  185. data/assets/themes/j1/extensions/noUISlider/js/nouislider.js +2312 -0
  186. data/assets/themes/j1/extensions/noUISlider/js/nouislider.min.js +3 -0
  187. data/assets/themes/j1/extensions/twemoji/js/LICENSE +21 -0
  188. data/assets/themes/j1/extensions/twemoji/js/picker/LICENSE +21 -0
  189. data/assets/themes/j1/extensions/twemoji/js/picker/twemoji-picker.js +21 -0
  190. data/assets/themes/j1/extensions/twemoji/js/picker/twemoji-picker.min.js +21 -0
  191. data/assets/themes/j1/extensions/twemoji/js/twemoji.js +590 -0
  192. data/assets/themes/j1/extensions/twemoji/js/twemoji.min.js +25 -0
  193. data/lib/j1/version.rb +3 -3
  194. data/lib/starter_web/Gemfile +7 -1
  195. data/lib/starter_web/_config.yml +9 -8
  196. data/lib/starter_web/_data/_defaults/resources.yml +13 -13
  197. data/lib/starter_web/_data/blocks/banner.yml +21 -29
  198. data/lib/starter_web/_data/blocks/footer.yml +10 -3
  199. data/lib/starter_web/_data/blocks/panel.yml +13 -13
  200. data/lib/starter_web/_data/layouts/default.yml +10 -0
  201. data/lib/starter_web/_data/layouts/home.yml +7 -7
  202. data/lib/starter_web/_data/layouts/page.yml +15 -16
  203. data/lib/starter_web/_data/modules/advertising.yml +48 -0
  204. data/lib/starter_web/_data/modules/attics.yml +2 -38
  205. data/lib/starter_web/_data/modules/cookie_consent.yml +3 -95
  206. data/lib/starter_web/_data/modules/defaults/attics.yml +16 -15
  207. data/lib/starter_web/_data/modules/defaults/cookie_consent.yml +75 -12
  208. data/lib/starter_web/_data/modules/defaults/jekyll_search.yml +9 -9
  209. data/lib/starter_web/_data/modules/defaults/navigator.yml +56 -21
  210. data/lib/starter_web/_data/modules/defaults/ssm.yml +3 -3
  211. data/lib/starter_web/_data/modules/defaults/toccer.yml +4 -8
  212. data/lib/starter_web/_data/modules/jekyll_search.yml +3 -21
  213. data/lib/starter_web/_data/modules/navigator.yml +1 -1
  214. data/lib/starter_web/_data/modules/navigator_menu.yml +4 -0
  215. data/lib/starter_web/_data/modules/ssm.yml +9 -0
  216. data/lib/starter_web/_data/modules/themer.yml +2 -3
  217. data/lib/starter_web/_data/modules/toccer.yml +6 -11
  218. data/lib/starter_web/_data/resources.yml +240 -112
  219. data/lib/starter_web/_data/template_settings.yml +117 -6
  220. data/lib/starter_web/_plugins/asciidoctor-extensions/fab-icon-inline.rb +1 -1
  221. data/lib/starter_web/_plugins/asciidoctor-extensions/fas-icon-inline.rb +2 -2
  222. data/lib/starter_web/_plugins/asciidoctor-extensions/iconify-icon-inline.rb +2 -2
  223. data/lib/starter_web/_plugins/asciidoctor-extensions/mdi-icon-inline.rb +2 -2
  224. data/lib/starter_web/_plugins/asciidoctor-extensions/twitter-emoji-inline.rb +2 -2
  225. data/lib/starter_web/_plugins/minifyJS.rb +54 -0
  226. data/lib/starter_web/_plugins/{uglify.rb → minifyJSON.rb} +15 -9
  227. data/lib/starter_web/assets/images/modules/attics/admin-dashboard-bootstrap-1280x600.jpg +0 -0
  228. data/lib/starter_web/assets/images/modules/attics/alex-holyoake-1920x1280.jpg +0 -0
  229. data/lib/starter_web/assets/images/modules/attics/anaya-katlego-1920x1280.jpg +0 -0
  230. data/lib/starter_web/assets/images/modules/attics/antonella-lombardi-1920x1280.jpg +0 -0
  231. data/lib/starter_web/assets/images/modules/attics/antonino-visalli-1920x1280.jpg +0 -0
  232. data/lib/starter_web/assets/images/modules/attics/banner/library-1920x800-bw.jpg +0 -0
  233. data/lib/starter_web/assets/images/modules/attics/banner/signpost-1920x800-bw.jpg +0 -0
  234. data/lib/starter_web/assets/images/modules/attics/banner/water-journal-1280x600.jpg +0 -0
  235. data/lib/starter_web/assets/images/modules/attics/banner/write-1280x600-bw.jpg +0 -0
  236. data/lib/starter_web/assets/images/modules/attics/brandon-mowinkel-1920x1280.jpg +0 -0
  237. data/lib/starter_web/assets/images/modules/attics/building-blocks-1920x1280-bw.jpg +0 -0
  238. data/lib/starter_web/assets/images/modules/attics/cookies-1920x1200-bw.jpg +0 -0
  239. data/lib/starter_web/assets/images/modules/attics/daniel-jensen-1920x1280.jpg +0 -0
  240. data/lib/starter_web/assets/images/modules/attics/giammarco-boscaro-1920x1280.jpg +0 -0
  241. data/lib/starter_web/assets/images/modules/attics/go-up-1920x1280-bw.jpg +0 -0
  242. data/lib/starter_web/assets/images/modules/attics/ian-schneider-1920x1280.jpg +0 -0
  243. data/lib/starter_web/assets/images/modules/attics/ideas-start-here-1920x1280-bw.jpg +0 -0
  244. data/lib/starter_web/assets/images/modules/attics/jason-rosewell-1920x1280.jpg +0 -0
  245. data/lib/starter_web/assets/images/modules/attics/jessica-ruscello-1920x1280.jpg +0 -0
  246. data/lib/starter_web/assets/images/modules/attics/lianhao-1920x1280.jpg +0 -0
  247. data/lib/starter_web/assets/images/modules/attics/library-1920x1280-bw.jpg +0 -0
  248. data/lib/starter_web/assets/images/modules/attics/matthaeus-1920x1280.jpg +0 -0
  249. data/lib/starter_web/assets/images/modules/attics/nousnou-iwasaki-1920x1280.jpg +0 -0
  250. data/lib/starter_web/assets/images/modules/attics/premium-1920x1280-bw.jpg +0 -0
  251. data/lib/starter_web/assets/images/modules/attics/robert-v-ruggiero-1920x1280.jpg +0 -0
  252. data/lib/starter_web/assets/images/modules/attics/romain-vignes-1920x1280.jpg +0 -0
  253. data/lib/starter_web/assets/images/modules/attics/runner-1920x1200-bw.jpg +0 -0
  254. data/lib/starter_web/assets/images/modules/attics/spider-web-1920x1200-bw.jpg +0 -0
  255. data/lib/starter_web/assets/images/modules/attics/the-place-1920x1280-bw.jpg +0 -0
  256. data/lib/starter_web/assets/images/modules/attics/welcome-1920x1280-bw.jpg +0 -0
  257. data/lib/starter_web/assets/images/modules/carousel/cats/cat-1.jpg +0 -0
  258. data/lib/starter_web/assets/images/modules/carousel/mega_cities/andreas-brucker_b.jpg +0 -0
  259. data/lib/starter_web/assets/images/modules/carousel/mega_cities/denys-nevozhai-1_b.jpg +0 -0
  260. data/lib/starter_web/assets/images/modules/carousel/mega_cities/denys-nevozhai-2_b.jpg +0 -0
  261. data/lib/starter_web/assets/images/modules/carousel/mega_cities/luca-bravo_b.jpg +0 -0
  262. data/lib/starter_web/assets/images/modules/carousel/mega_cities/thomas-tucker_b.jpg +0 -0
  263. data/lib/starter_web/assets/images/modules/gallery/mega_cities/banter-snaps_b.jpg +0 -0
  264. data/lib/starter_web/assets/images/modules/gallery/mega_cities/denys-nevozhai-1_b.jpg +0 -0
  265. data/lib/starter_web/assets/images/modules/gallery/mega_cities/denys-nevozhai-2-bw.jpg +0 -0
  266. data/lib/starter_web/assets/images/modules/gallery/mega_cities/denys-nevozhai-2_b.jpg +0 -0
  267. data/lib/starter_web/assets/images/modules/gallery/mega_cities/emmad-mazhari_b.jpg +0 -0
  268. data/lib/starter_web/assets/images/modules/gallery/mega_cities/ethan-brooke_b.jpg +0 -0
  269. data/lib/starter_web/assets/images/modules/gallery/mega_cities/federico-rizzarelli_b.jpg +0 -0
  270. data/lib/starter_web/assets/images/modules/gallery/mega_cities/gints-gailis_b.jpg +0 -0
  271. data/lib/starter_web/assets/images/modules/gallery/mega_cities/johan-mouchet_b.jpg +0 -0
  272. data/lib/starter_web/assets/images/modules/gallery/mega_cities/luca-bravo_b.jpg +0 -0
  273. data/lib/starter_web/assets/images/modules/gallery/mega_cities/oskars-sylwan_b.jpg +0 -0
  274. data/lib/starter_web/assets/images/modules/gallery/mega_cities/steven-diaz_b.jpg +0 -0
  275. data/lib/starter_web/assets/images/modules/gallery/mega_cities/thomas-tucker-bw.jpg +0 -0
  276. data/lib/starter_web/assets/images/modules/gallery/mega_cities/thomas-tucker_b.jpg +0 -0
  277. data/lib/starter_web/index.html +9 -8
  278. data/lib/starter_web/package.json +1 -1
  279. data/lib/starter_web/pages/public/clear_button.adoc +121 -0
  280. data/lib/starter_web/pages/public/learn/examples/floating_ad.adoc +221 -0
  281. data/lib/starter_web/pages/public/learn/{floating_sidebar.adoc → examples/floating_div.adoc} +60 -50
  282. data/lib/starter_web/pages/public/learn/kickstarter/web_in_a_day/000_includes/parts.asciidoc +1 -1
  283. data/lib/starter_web/pages/public/learn/kickstarter/web_in_a_day/100_meet_and_greet_jekyll.adoc +9 -4
  284. data/lib/starter_web/pages/public/learn/roundtrip/000_bs_tour_api.adoc +2 -2
  285. data/lib/starter_web/pages/public/learn/roundtrip/000_includes/documents/410_table_3_column.asciidoc +1 -1
  286. data/lib/starter_web/pages/public/learn/roundtrip/000_includes/documents/419_advanced_modals_html.asciidoc +5 -5
  287. data/lib/starter_web/pages/public/learn/roundtrip/100_present_images.adoc +2 -2
  288. data/lib/starter_web/pages/public/learn/roundtrip/200_typography.adoc +4 -3
  289. data/lib/starter_web/pages/public/learn/roundtrip/300_icon_fonts.adoc +35 -44
  290. data/lib/starter_web/pages/public/learn/roundtrip/400_asciidoc_extensions.adoc +1 -1
  291. data/lib/starter_web/pages/public/learn/roundtrip/420_responsive_tables_extensions.adoc +39 -39
  292. data/lib/starter_web/pages/public/learn/vtutorials/000_includes/documents/410_table_3_column.asciidoc +1 -1
  293. data/lib/starter_web/pages/public/learn/whats_up.adoc +1 -0
  294. data/lib/starter_web/pages/public/panels/intro_panel/panel.adoc +54 -48
  295. data/lib/starter_web/pages/public/previewer/000_includes/tables/mdi_icons/100_absolute_sizes.asciidoc +1 -1
  296. data/lib/starter_web/pages/public/previewer/000_includes/tables/mdi_icons/110_bs_grid_sizes.asciidoc +1 -1
  297. data/lib/starter_web/pages/public/previewer/000_includes/tables/mdi_icons/120_relative_sizes.asciidoc +1 -41
  298. data/lib/starter_web/pages/public/previewer/000_includes/tables/mdi_icons/200_rotate.asciidoc +1 -1
  299. data/lib/starter_web/pages/public/previewer/000_includes/tables/mdi_icons/300_flip.asciidoc +1 -1
  300. data/lib/starter_web/pages/public/previewer/000_includes/tables/mdi_icons/400_spin_pulsed.asciidoc +1 -1
  301. data/lib/starter_web/pages/public/previewer/000_includes/tables/mdi_icons/500_bw_color_palette.asciidoc +1 -1
  302. data/lib/starter_web/pages/public/previewer/000_includes/tables/mdi_icons/510_bs_color_palette.asciidoc +1 -1
  303. data/lib/starter_web/pages/public/previewer/000_includes/tables/mdi_icons/600_md_color_palette.asciidoc +1 -1
  304. data/lib/starter_web/pages/public/previewer/000_includes/tables/mdi_icons/601_md_color_palette_indigo.asciidoc +1 -1
  305. data/lib/starter_web/pages/public/previewer/000_includes/tables/mdi_icons/602_md_color_palette_pink.asciidoc +1 -1
  306. data/lib/starter_web/pages/public/previewer/000_includes/tables/twitter_emoji/100_bs_sizes.asciidoc +1 -1
  307. data/lib/starter_web/pages/public/previewer/000_includes/tables/twitter_emoji/100_relative_sizes.asciidoc +1 -1
  308. data/lib/starter_web/pages/public/previewer/000_includes/tables/twitter_emoji/200_rotate.asciidoc +1 -1
  309. data/lib/starter_web/pages/public/previewer/000_includes/tables/twitter_emoji/300_flip.asciidoc +1 -1
  310. data/lib/starter_web/pages/public/previewer/000_includes/tables/twitter_emoji/400_spin_pulsed.asciidoc +1 -1
  311. data/lib/starter_web/pages/public/previewer/bootstrap_theme.adoc +672 -863
  312. data/lib/starter_web/pages/public/previewer/iframer.adoc +15 -14
  313. data/lib/starter_web/pages/public/previewer/justified_gallery.html +1 -1
  314. data/lib/starter_web/pages/public/previewer/mdb_preview/000_includes/attributes.asciidoc +69 -0
  315. data/lib/starter_web/pages/public/previewer/mdb_preview/000_includes/documents/100_buttons.asciidoc +170 -0
  316. data/lib/starter_web/pages/public/previewer/mdb_preview/mdb_previewer.adoc +52 -0
  317. data/lib/starter_web/pages/public/previewer/mdi_icons_preview.adoc +1 -1
  318. data/lib/starter_web/pages/public/previewer/twitter_emoji_preview.adoc +2 -2
  319. data/lib/starter_web/utilsrv/_defaults/package.json +1 -1
  320. data/lib/starter_web/utilsrv/package.json +1 -1
  321. metadata +148 -105
  322. data/assets/data/colors.json +0 -42
  323. data/assets/data/font_sizes.json +0 -42
  324. data/assets/data/messages.yml +0 -131
  325. data/assets/themes/j1/extensions/iframe_resizer/examples/frame.absolute.html +0 -86
  326. data/assets/themes/j1/extensions/iframe_resizer/examples/frame.content.html +0 -58
  327. data/assets/themes/j1/extensions/iframe_resizer/examples/frame.hover.html +0 -51
  328. data/assets/themes/j1/extensions/iframe_resizer/examples/frame.nested.html +0 -68
  329. data/assets/themes/j1/extensions/iframe_resizer/examples/frame.textarea.html +0 -46
  330. data/assets/themes/j1/extensions/iframe_resizer/examples/frame.tolerance.html +0 -79
  331. data/assets/themes/j1/extensions/iframe_resizer/examples/index.html +0 -70
  332. data/assets/themes/j1/extensions/iframe_resizer/examples/two.html +0 -71
  333. data/assets/themes/j1/extensions/iframe_resizer/js/client/iframeResizer.contentWindow.js +0 -1104
  334. data/assets/themes/j1/extensions/iframe_resizer/js/client/iframeResizer.contentWindow.map +0 -1
  335. data/assets/themes/j1/extensions/iframe_resizer/js/client/iframeResizer.contentWindow.min.js +0 -10
  336. data/assets/themes/j1/extensions/log4javascript/log4javascript.js +0 -5826
  337. data/assets/themes/j1/extensions/log4javascript/log4javascript.min.js +0 -266
  338. data/lib/starter_web/assets/images/modules/attics/admin-dashboard-bootstrap-1280x600.png +0 -0
  339. data/lib/starter_web/assets/images/modules/attics/mae-mu-Vf9gbsLZyf0-unsplash.jpg +0 -0
  340. data/lib/starter_web/assets/images/modules/attics/mae-mue-1920x1280-v.jpg +0 -0
  341. data/lib/starter_web/assets/images/modules/attics/mae-mue-1920x1280.jpg +0 -0
@@ -0,0 +1,230 @@
1
+ ---
2
+ regenerate: true
3
+ ---
4
+
5
+ {% capture cache %}
6
+
7
+ {% comment %}
8
+ # -----------------------------------------------------------------------------
9
+ # ~/assets/themes/j1/adapter/js/clipboard.js
10
+ # Liquid template to adapt Clipboard for J1 Template
11
+ #
12
+ # Product/Info:
13
+ # https://jekyll.one
14
+ #
15
+ # Copyright (C) 2020 Juergen Adams
16
+ #
17
+ # J1 Template is licensed under the MIT License.
18
+ # For details, see https://jekyll.one
19
+ # -----------------------------------------------------------------------------
20
+ # Test data:
21
+ # {{ liquid_var | debug }}
22
+ # -----------------------------------------------------------------------------
23
+ # NOTE:
24
+ # -----------------------------------------------------------------------------
25
+ {% endcomment %}
26
+
27
+ {% comment %} Set config files
28
+ -------------------------------------------------------------------------------- {% endcomment %}
29
+
30
+ {% comment %} Set config data
31
+ -------------------------------------------------------------------------------- {% endcomment %}
32
+ {% assign environment = site.environment %}
33
+
34
+
35
+ {% assign production = false %}
36
+ {% if environment == 'prod' or environment == 'production' %}
37
+ {% assign production = true %}
38
+ {% endif %}
39
+
40
+ /*
41
+ # -----------------------------------------------------------------------------
42
+ # ~/assets/themes/j1/adapter/js/clipboard.js
43
+ # JS Adapter for Clipboard
44
+ #
45
+ # Product/Info:
46
+ # {{site.data.template_settings.theme_author_url}}
47
+ #
48
+ # Copyright (C) 2020 Juergen Adams
49
+ #
50
+ # J1 Template is licensed under the MIT License.
51
+ # For details, see {{site.data.template_settings.theme_author_url}}
52
+ # -----------------------------------------------------------------------------
53
+ # NOTE:
54
+ # -----------------------------------------------------------------------------
55
+ # Adapter generated: {{site.time}}
56
+ # -----------------------------------------------------------------------------
57
+ */
58
+
59
+ // -----------------------------------------------------------------------------
60
+ // ESLint shimming
61
+ // -----------------------------------------------------------------------------
62
+ /* eslint indent: "off" */
63
+ // -----------------------------------------------------------------------------
64
+ 'use strict';
65
+
66
+ j1.adapter['clipboard'] = (function (j1, window) {
67
+
68
+ // ---------------------------------------------------------------------------
69
+ // globals
70
+ // ---------------------------------------------------------------------------
71
+ var environment = '{{environment}}';
72
+ var moduleOptions = {};
73
+ var logger;
74
+ var logText;
75
+ var _this;
76
+ var clipboardJS;
77
+
78
+ // ---------------------------------------------------------------------------
79
+ // main object
80
+ // ---------------------------------------------------------------------------
81
+ return {
82
+
83
+ // -------------------------------------------------------------------------
84
+ // module initializer
85
+ // -------------------------------------------------------------------------
86
+ init: function (options) {
87
+ // initialize state flag
88
+ j1.adapter.clipboard.state = 'pending';
89
+
90
+ // -----------------------------------------------------------------------
91
+ // defaults
92
+ // -----------------------------------------------------------------------
93
+ var settings = $.extend({
94
+ module_name: 'j1.adapter.clipboard',
95
+ generated: '{{site.time}}'
96
+ }, options);
97
+
98
+ // -----------------------------------------------------------------------
99
+ // globals
100
+ // -----------------------------------------------------------------------
101
+ _this = j1.adapter.clipboard;
102
+ logger = log4javascript.getLogger('j1.adapter.clipboard');
103
+ logText = 'initialization: started';
104
+ logger.info(logText);
105
+
106
+ // initialize ClipboardJS if page is loaded
107
+ var dependencies_met_j1_finished = setInterval(function() {
108
+ if ( j1.getState() == 'finished' ) {
109
+ logText = 'create clipboard';
110
+ logger.info(logText);
111
+
112
+ clipboardJS = new ClipboardJS('.btn-clipboard', {
113
+ target: function target(trigger) {
114
+ return trigger.parentNode.nextElementSibling;
115
+ }
116
+ });
117
+
118
+ _this.initClipButtons();
119
+ _this.initEventHandler(clipboardJS);
120
+
121
+ clearInterval(dependencies_met_j1_finished);
122
+ logText = 'initialization: finished';
123
+ logger.info(logText);
124
+ }
125
+ }, 25); // END dependencies_met_j1_finished
126
+ },
127
+
128
+ // -------------------------------------------------------------------------
129
+ // initClipboard
130
+ // Create copy-to-clipboard for all pages
131
+ // -------------------------------------------------------------------------
132
+ initClipButtons: function () {
133
+ // insert copy to clipboard button before all elements having a
134
+ // class of ".highlight" assigned to (e.g. Asciidoc source blocks)
135
+ $('.highlight').each(function () {
136
+ // Check if no clipboard should be applied
137
+ var isNoClip = $(this).closest('.noclip');
138
+ if ( isNoClip.length == 0) {
139
+ var btnHtml = '<div class="j1-clipboard"><span class="btn-clipboard j1-tooltip" data-toggle="tooltip" data-placement="left" title="Copy to clipboard">Copy</span></div>';
140
+ $(this).before(btnHtml);
141
+ $('.btn-clipboard').tooltip();
142
+ }
143
+ });
144
+ }, // END initClipboard
145
+
146
+ // -------------------------------------------------------------------------
147
+ // Event handler
148
+ // -------------------------------------------------------------------------
149
+ initEventHandler: function (clipboard) {
150
+ // Manage clipboard events
151
+ clipboard.on('success', function (e) {
152
+ $(e.trigger).attr('title', 'copied!').tooltip('_fixTitle').tooltip('show').attr('title', 'Copy to clipboard').tooltip('_fixTitle');
153
+ var logger = log4javascript.getLogger('j1.initClipboard');
154
+ var logText = 'initialization copy-to-clipboard sucessfull';
155
+ logger.debug(logText);
156
+ /* Cleanup clipped data for trailing numbers */
157
+ var splitted = e.text.split('\n');
158
+ var concat;
159
+ var i;
160
+ for (i=0; i<splitted.length; i++) {
161
+ concat += splitted[i].replace(/^\s+\d+/, '');
162
+ }
163
+ e.clearSelection();
164
+ });
165
+ clipboard.on('error', function (e) {
166
+ var fallbackMsg = /Mac/i.test(navigator.userAgent) ? 'press \u2318 to copy' : 'press ctrl-c to copy';
167
+ logger = log4javascript.getLogger('j1.initClipboard');
168
+ logText = 'initialization copy-to-clipboard failed, fallback used.';
169
+ logger.warn(logText);
170
+ $(e.trigger).attr('title', fallbackMsg).tooltip('_fixTitle').tooltip('show').attr('title', 'copy to clipboard').tooltip('_fixTitle');
171
+ });
172
+ },
173
+
174
+ // -------------------------------------------------------------------------
175
+ // messageHandler
176
+ // Manage messages (paylods) send from other J1 modules
177
+ // -------------------------------------------------------------------------
178
+ messageHandler: function (sender, message) {
179
+ // var json_message = JSON.stringify(message, undefined, 2); // multiline
180
+ var json_message = JSON.stringify(message);
181
+
182
+ logText = 'received message from ' + sender + ': ' + json_message;
183
+ logger.debug(logText);
184
+
185
+ // -----------------------------------------------------------------------
186
+ // Process commands|actions
187
+ // -----------------------------------------------------------------------
188
+ if (message.type === 'command' && message.action === 'module_initialized') {
189
+ //
190
+ // Place handling of command|action here
191
+ //
192
+ logger.info(message.text);
193
+ }
194
+ if (message.type === 'command' && message.action === 'status') {
195
+ logger.info('messageHandler: received - ' + message.action);
196
+ }
197
+
198
+ //
199
+ // Place handling of other command|action here
200
+ //
201
+
202
+ return true;
203
+ }, // END messageHandler
204
+
205
+ // -------------------------------------------------------------------------
206
+ // setState
207
+ // Set the current (processing) state of the module
208
+ // -------------------------------------------------------------------------
209
+ setState: function (stat) {
210
+ j1.adapter.clipboard.state = stat;
211
+ }, // END setState
212
+
213
+ // -------------------------------------------------------------------------
214
+ // getState
215
+ // Returns the current (processing) state of the module
216
+ // -------------------------------------------------------------------------
217
+ getState: function () {
218
+ return j1.adapter.clipboard.state;
219
+ } // END state
220
+
221
+ }; // END return
222
+ })(j1, window);
223
+
224
+ {% endcapture %}
225
+ {% if production %}
226
+ {{ cache | minifyJS }}
227
+ {% else %}
228
+ {{ cache | strip_empty_lines }}
229
+ {% endif %}
230
+ {% assign cache = nil %}
@@ -1,5 +1,5 @@
1
1
  ---
2
- regenerate: false
2
+ regenerate: true
3
3
  ---
4
4
 
5
5
  {% capture cache %}
@@ -31,6 +31,10 @@ regenerate: false
31
31
  {% assign environment = site.environment %}
32
32
  {% assign template_version = site.version %}
33
33
 
34
+ {% assign production = false %}
35
+ {% if environment == 'prod' or environment == 'production' %}
36
+ {% assign production = true %}
37
+ {% endif %}
34
38
 
35
39
  {% comment %} Process YML config data
36
40
  ================================================================================ {% endcomment %}
@@ -66,6 +70,12 @@ regenerate: false
66
70
  # Adapter generated: {{site.time}}
67
71
  # -----------------------------------------------------------------------------
68
72
  */
73
+
74
+ // -----------------------------------------------------------------------------
75
+ // ESLint shimming
76
+ // -----------------------------------------------------------------------------
77
+ /* eslint indent: "off" */
78
+ // -----------------------------------------------------------------------------
69
79
  'use strict';
70
80
 
71
81
  j1.adapter['cookie_consent'] = (function (j1, window) {
@@ -126,7 +136,9 @@ j1.adapter['cookie_consent'] = (function (j1, window) {
126
136
  // -----------------------------------------------------------------------
127
137
  // options loader
128
138
  // -----------------------------------------------------------------------
139
+ /* eslint-disable */
129
140
  moduleOptions = $.extend({}, {{consent_options | replace: '=>', ':' | replace: 'nil', '""'}});
141
+ /* eslint-enable */
130
142
 
131
143
  if (typeof options !== 'undefined') {
132
144
  moduleOptions = j1.mergeData(moduleOptions, settings);
@@ -163,8 +175,9 @@ j1.adapter['cookie_consent'] = (function (j1, window) {
163
175
  // ---------------------------------------------------------------------
164
176
  // data loader
165
177
  // ---------------------------------------------------------------------
166
- logger.info('loading html data for modals');
167
- $.when (j1.xhrData('j1.adapter.cookie_consent', moduleOptions, 'data_loaded'))
178
+ $.when (
179
+ j1.xhrData('j1.adapter.cookie_consent', moduleOptions, 'data_loaded')
180
+ )
168
181
  .then (function (success) {
169
182
  if (success) {
170
183
  logger.info('loading data completed');
@@ -265,5 +278,9 @@ j1.adapter['cookie_consent'] = (function (j1, window) {
265
278
  })(j1, window);
266
279
 
267
280
  {% endcapture %}
268
- {{ cache | strip_empty_lines }}
281
+ {% if production %}
282
+ {{ cache | minifyJS }}
283
+ {% else %}
284
+ {{ cache | strip_empty_lines }}
285
+ {% endif %}
269
286
  {% assign cache = nil %}
@@ -1,5 +1,5 @@
1
1
  ---
2
- regenerate: false
2
+ regenerate: true
3
3
  ---
4
4
 
5
5
  {% capture cache %}
@@ -49,6 +49,10 @@ regenerate: false
49
49
  -------------------------------------------------------------------------------- {% endcomment %}
50
50
  {% assign framer_options = framer_defaults | merge: framer_settings %}
51
51
 
52
+ {% assign production = false %}
53
+ {% if environment == 'prod' or environment == 'production' %}
54
+ {% assign production = true %}
55
+ {% endif %}
52
56
 
53
57
  /*
54
58
  # -----------------------------------------------------------------------------
@@ -71,6 +75,12 @@ regenerate: false
71
75
  # Adapter generated: {{site.time}}
72
76
  # -----------------------------------------------------------------------------
73
77
  */
78
+
79
+ // -----------------------------------------------------------------------------
80
+ // ESLint shimming
81
+ // -----------------------------------------------------------------------------
82
+ /* eslint indent: "off" */
83
+ // -----------------------------------------------------------------------------
74
84
  'use strict';
75
85
 
76
86
  {% comment %} Main
@@ -112,8 +122,9 @@ j1.adapter['framer'] = (function (j1, window) {
112
122
  {% comment %} Load module config from yml data
113
123
  -------------------------------------------------------------------------- {% endcomment %}
114
124
  // Load module DEFAULTS|CONFIG
115
- //
125
+ /* eslint-disable */
116
126
  moduleOptions = $.extend({}, {{framer_options | replace: '=>', ':' | replace: 'nil', '""'}});
127
+ /* eslint-enable */
117
128
 
118
129
  if (typeof settings !== 'undefined') {
119
130
  moduleOptions = j1.mergeData(moduleOptions, settings);
@@ -204,5 +215,9 @@ j1.adapter['framer'] = (function (j1, window) {
204
215
  })(j1, window);
205
216
 
206
217
  {% endcapture %}
207
- {{ cache | strip_empty_lines }}
218
+ {% if production %}
219
+ {{ cache | minifyJS }}
220
+ {% else %}
221
+ {{ cache | strip_empty_lines }}
222
+ {% endif %}
208
223
  {% assign cache = nil %}
@@ -1,5 +1,5 @@
1
1
  ---
2
- regenerate: false
2
+ regenerate: true
3
3
  ---
4
4
 
5
5
  {% capture cache %}
@@ -70,6 +70,11 @@ regenerate: false
70
70
  {% assign customizer_title = customizer_options.title %}
71
71
  {% assign gallery_rowHeight = customizer_options.gallery_settings.rowHeight %}
72
72
 
73
+ {% assign production = false %}
74
+ {% if environment == 'prod' or environment == 'production' %}
75
+ {% assign production = true %}
76
+ {% endif %}
77
+
73
78
  /*
74
79
  # -----------------------------------------------------------------------------
75
80
  # ~/assets/themes/j1/adapter/js/gallery_customizer.js
@@ -86,6 +91,12 @@ regenerate: false
86
91
  # Adapter generated: {{site.time}}
87
92
  # -----------------------------------------------------------------------------
88
93
  */
94
+
95
+ // -----------------------------------------------------------------------------
96
+ // ESLint shimming
97
+ // -----------------------------------------------------------------------------
98
+ /* eslint indent: "off" */
99
+ // -----------------------------------------------------------------------------
89
100
  'use strict';
90
101
 
91
102
  {% comment %} Main
@@ -108,7 +119,7 @@ j1.adapter['gallery_customizer'] = (function (j1, window) {
108
119
  // See: https://stackoverflow.com/questions/359788/how-to-execute-a-javascript-function-when-i-have-its-name-as-a-string
109
120
  //
110
121
  var args = Array.prototype.slice.call(arguments, 2);
111
- var namespaces = functionName.split(".");
122
+ var namespaces = functionName.split('.');
112
123
  var func = namespaces.pop();
113
124
  for(var i = 0; i < namespaces.length; i++) {
114
125
  context = context[namespaces[i]];
@@ -138,8 +149,10 @@ j1.adapter['gallery_customizer'] = (function (j1, window) {
138
149
 
139
150
  {% comment %} Load gallery config from yml data
140
151
  -------------------------------------------------------------------------- {% endcomment %}
152
+ /* eslint-disable */
141
153
  galleryOptions = $.extend({}, {{gallery_options | replace: '=>', ':' | replace: 'nil', '""'}});
142
154
  customizerOptions = $.extend({}, {{customizer_options | replace: '=>', ':' | replace: 'nil', '""'}});
155
+ /* eslint-enable */
143
156
 
144
157
  {% comment %} Set global variables
145
158
  -------------------------------------------------------------------------- {% endcomment %}
@@ -186,7 +199,7 @@ j1.adapter['gallery_customizer'] = (function (j1, window) {
186
199
  if ($formId.length) {
187
200
  var timerid;
188
201
 
189
- $("input[name='rowHeight']").on('input', function (e) {
202
+ $('input[name="rowHeight"]').on('input', function (e) {
190
203
  var value = $(this).val();
191
204
 
192
205
  if (value < imageHeightMin) { return false; }
@@ -272,7 +285,7 @@ j1.adapter['gallery_customizer'] = (function (j1, window) {
272
285
  });
273
286
 
274
287
  $('input:checkbox[name="random"]').on('click', function (e) {
275
- var value = $(this).is(":checked");
288
+ var value = $(this).is(':checked');
276
289
 
277
290
  $instance.justifiedGallery({randomize: value});
278
291
  if(environment === 'development') {
@@ -300,7 +313,7 @@ j1.adapter['gallery_customizer'] = (function (j1, window) {
300
313
  });
301
314
 
302
315
  $('input:checkbox[name="hide_last_row"]').on('click', function (e) {
303
- var value = $(this).is(":checked");
316
+ var value = $(this).is(':checked');
304
317
 
305
318
  if (value == true) {
306
319
  value = 'hide';
@@ -322,10 +335,10 @@ j1.adapter['gallery_customizer'] = (function (j1, window) {
322
335
  $('#rowHeightMax').val(customizerOptions.gallery_settings.maxRowHeight);
323
336
  $('#margins').val(customizerOptions.gallery_settings.margins);
324
337
  $('#border').val(customizerOptions.gallery_settings.border);
325
- $('input:checkbox[name="captions"]').val("on").filter('[value="on"]').prop('checked', customizerOptions.gallery_settings.captions);
326
- $('input:checkbox[name="random"]').val("off").filter('[value="off"]').prop('checked', customizerOptions.gallery_settings.randomize);
327
- $('input:checkbox[name="justify_last_row"]').val("on").filter('[value="on"]').prop('checked', customizerOptions.gallery_settings.justifyLastRow);
328
- $('input:checkbox[name="hide_last_row"]').val("off").filter('[value="off"]').prop('checked', customizerOptions.gallery_settings.hideLastRow);
338
+ $('input:checkbox[name="captions"]').val('on').filter('[value="on"]').prop('checked', customizerOptions.gallery_settings.captions);
339
+ $('input:checkbox[name="random"]').val('off').filter('[value="off"]').prop('checked', customizerOptions.gallery_settings.randomize);
340
+ $('input:checkbox[name="justify_last_row"]').val('on').filter('[value="on"]').prop('checked', customizerOptions.gallery_settings.justifyLastRow);
341
+ $('input:checkbox[name="hide_last_row"]').val('off').filter('[value="off"]').prop('checked', customizerOptions.gallery_settings.hideLastRow);
329
342
 
330
343
  $instance.justifiedGallery({
331
344
  rowHeight: customizerOptions.gallery_settings.rowHeight,
@@ -423,5 +436,9 @@ j1.adapter['gallery_customizer'] = (function (j1, window) {
423
436
  })(j1, window);
424
437
 
425
438
  {% endcapture %}
426
- {{ cache | strip_empty_lines }}
439
+ {% if production %}
440
+ {{ cache | minifyJS }}
441
+ {% else %}
442
+ {{ cache | strip_empty_lines }}
443
+ {% endif %}
427
444
  {% assign cache = nil %}
@@ -1,5 +1,5 @@
1
1
  ---
2
- regenerate: true
2
+ regenerate: true
3
3
  ---
4
4
 
5
5
  {% capture cache %}
@@ -17,8 +17,6 @@ regenerate: true
17
17
  # J1 Template is licensed under the MIT License.
18
18
  # For details, see https://jekyll.one
19
19
  # -----------------------------------------------------------------------------
20
- # TODO: jadams, 2019-01-20: Isolate drawer, switch from BME code
21
- # -----------------------------------------------------------------------------
22
20
  # Test data:
23
21
  # {{ liquid_var | debug }}
24
22
  # -----------------------------------------------------------------------------
@@ -76,6 +74,11 @@ regenerate: true
76
74
 
77
75
  {% assign hideOnReload = modules.themer_options.hideOnReload %}
78
76
 
77
+ {% assign production = false %}
78
+ {% if environment == 'prod' or environment == 'production' %}
79
+ {% assign production = true %}
80
+ {% endif %}
81
+
79
82
  /*
80
83
  # -----------------------------------------------------------------------------
81
84
  # ~/assets/themes/j1/adapter/js/j1_template.js
@@ -96,6 +99,14 @@ regenerate: true
96
99
  # Adapter generated: {{site.time}}
97
100
  # -----------------------------------------------------------------------------
98
101
  */
102
+
103
+ // -----------------------------------------------------------------------------
104
+ // ESLint shimming
105
+ // -----------------------------------------------------------------------------
106
+ /* eslint indent: "off" */
107
+ /* eslint quotes: "off" */
108
+ /* eslint semi: "off" */
109
+ // -----------------------------------------------------------------------------
99
110
  'use strict';
100
111
 
101
112
  var j1 = (function () {
@@ -121,7 +132,7 @@ var j1 = (function () {
121
132
  var user_session_detected;
122
133
 
123
134
  // Connector settings
124
- var translation_enabled = {{template_config.translation.enabled}}
135
+ var translation_enabled = {{template_config.translation.enabled}};
125
136
 
126
137
  // Theme information
127
138
  var themeName;
@@ -155,7 +166,7 @@ var j1 = (function () {
155
166
  'app_session': '{{template_config.cookies.app_session}}',
156
167
  'user_session': '{{template_config.cookies.user_session}}',
157
168
  'user_state': '{{template_config.cookies.user_state}}'
158
- }
169
+ };
159
170
 
160
171
  // user SESSION cookie (initial values)
161
172
  var user_session = {
@@ -202,7 +213,7 @@ var j1 = (function () {
202
213
  // See: https://stackoverflow.com/questions/359788/how-to-execute-a-javascript-function-when-i-have-its-name-as-a-string
203
214
  //
204
215
  var args = Array.prototype.slice.call(arguments, 2);
205
- var namespaces = functionName.split(".");
216
+ var namespaces = functionName.split('.');
206
217
  var func = namespaces.pop();
207
218
  for(var i = 0; i < namespaces.length; i++) {
208
219
  context = context[namespaces[i]];
@@ -216,7 +227,8 @@ var j1 = (function () {
216
227
  return {
217
228
 
218
229
  // -------------------------------------------------------------------------
219
- // Initializer
230
+ // init()
231
+ // initializer
220
232
  // -------------------------------------------------------------------------
221
233
  init: function (options) {
222
234
 
@@ -224,7 +236,7 @@ var j1 = (function () {
224
236
  // global var (function)
225
237
  // -----------------------------------------------------------------------
226
238
  var logger = log4javascript.getLogger('j1.init');
227
- var url = new parseURL(window.location.href)
239
+ var url = new parseURL(window.location.href);
228
240
  var baseUrl = url.origin;
229
241
  var epoch = Math.floor(Date.now()/1000);
230
242
  var timestamp_now = moment.unix(epoch).format('YYYY-MM-DD HH:mm:ss');
@@ -241,39 +253,11 @@ var j1 = (function () {
241
253
  options
242
254
  );
243
255
 
244
- // catch senseless detect url 404 errors (middleware /status)
245
- // See: https://stackoverflow.com/questions/4687235/jquery-get-or-post-to-catch-page-load-error-eg-404
246
- $.ajaxSetup({
247
- // called on `$.get()`, `$.post()`, `$.ajax()`
248
- statusCode : {
249
- // raised on response status code 404
250
- 404 : function (jqxhr, textStatus, errorThrown) {
251
- var interval_count = 0;
252
- var max_count = 10;
253
- var dependencies_met_logger = setInterval(function() {
254
- interval_count += 1;
255
- if ( j1.adapter.logger.getState() == 'finished' ) {
256
- var logger = log4javascript.getLogger('j1.init');
257
- clearInterval(dependencies_met_logger);
258
- if(jqxhr.responseText.indexOf('GET /status') > -1) {
259
- logger.info('no middleware found on url /status: ignored');
260
- logger.info('continue on mode: web');
261
- }
262
- if (interval_count > max_count) {
263
- logger.warn('dependency check failed for module: logger');
264
- logger.warn('continue on initializer unchecked');
265
- j1.adapter.navigator.init();
266
- }
267
- }
268
- }, 25);
269
- }
270
- }
271
- });
272
-
273
256
  // -----------------------------------------------------------------------
274
- // Session ON_CLOSE event
275
- // Update user STATE cookie|Remove user SESSION cookie on window CLOSE
276
- // See: https://stackoverflow.com/questions/3888902/detect-browser-or-tab-closing
257
+ // session ON_CLOSE event
258
+ // wrapup if ALL browser windows get closed. Update user STATE
259
+ // cookie on window CLOSE.
260
+ // see: https://stackoverflow.com/questions/3888902/detect-browser-or-tab-closing
277
261
  // -----------------------------------------------------------------------
278
262
  window.addEventListener('beforeunload', function (event) {
279
263
  var cookie_names = j1.getCookieNames();
@@ -289,23 +273,15 @@ var j1 = (function () {
289
273
  user_state.session_active = false;
290
274
  user_state.last_session_ts = timestamp_now;
291
275
 
292
- // DANGEROUS (??): delete user session in browser using MULTI_TAB!
293
- // if (j1.existsCookie(cookie_names.user_session)) {
294
- // var bla = cookie_names.user_session;
295
- // j1.deleteCookie(cookie_names.user_session)
296
- // }
297
-
298
276
  j1.writeCookie({
299
277
  name: cookie_user_state_name,
300
278
  data: user_state,
301
279
  expires: 365
302
280
  });
303
-
304
-
305
281
  });
306
282
 
307
283
  // -----------------------------------------------------------------------
308
- // Initialize|Load (existing) user cookies
284
+ // initialize|load (existing) user cookies
309
285
  // -----------------------------------------------------------------------
310
286
  user_session.created = timestamp_now;
311
287
  user_session.timestamp = timestamp_now;
@@ -332,7 +308,7 @@ var j1 = (function () {
332
308
  expires: 365
333
309
  });
334
310
 
335
- // Detect middleware (mode 'app') and update user session cookie
311
+ // detect middleware (mode 'app') and update user session cookie
336
312
  // -----------------------------------------------------------------------
337
313
  // if (user_session.mode === 'na' || user_session.mode === 'app') {
338
314
  if (user_session.mode === 'na') {
@@ -342,7 +318,10 @@ var j1 = (function () {
342
318
 
343
319
  baseUrl = url.origin;
344
320
 
345
- $.when ($.ajax(ep_status))
321
+ // see: https://stackoverflow.com/questions/3709597/wait-until-all-jquery-ajax-requests-are-done
322
+ $.when (
323
+ $.ajax(ep_status)
324
+ )
346
325
  .then(function(data) {
347
326
  var logger = log4javascript.getLogger('j1.init');
348
327
  user_session = j1.readCookie(cookie_names.user_session);
@@ -386,153 +365,84 @@ var j1 = (function () {
386
365
  logger.info('page is being initialized');
387
366
  }
388
367
 
368
+ state = 'started';
369
+ logger.info('state: ' + state);
370
+ logger.info('page is being initialized');
371
+
372
+ if ( settings.scrollbar === 'false' ) {
373
+ $('body').addClass('hide-scrollbar');
374
+ $('html').addClass('hide-scrollbar-moz');
375
+ }
376
+
377
+ logger.info('read user state from cookie');
378
+ user_session = j1.readCookie(cookie_names.user_session);
379
+
380
+ // process|update user state cookie
381
+ themeName = user_session.theme_name;
382
+ themeCss = user_session.theme_css;
383
+ themeExtensionCss = user_session.theme_extension_css;
384
+
385
+ // save last page access
386
+ // see: https://stackoverflow.com/questions/3528324/how-to-get-the-previous-url-in-javascript
387
+ // see: https://developer.mozilla.org/de/docs/Web/API/Window/history
388
+ //
389
+ user_session.timestamp = timestamp_now;
390
+ referrer = new parseURL(document.referrer);
391
+ current_page = window.location.pathname;
392
+ user_session.requested_page = current_page;
393
+ user_session.previous_page = referrer.search === '' ?
394
+ (referrer.pathname === '' ? current_page : referrer.pathname) :
395
+ (user_session.previous_page === '' || user_session.previous_page === 'na'
396
+ ? '/'
397
+ : user_session.previous_page
398
+ );
399
+
400
+ // calculate last 'pager' if any
401
+ if (rePager.test(user_session.previous_page)) {
402
+ last_pager = user_session.previous_page;
403
+ user_session.last_pager = last_pager;
404
+ } else {
405
+ last_pager = user_session.last_pager;
406
+ }
407
+
408
+ logger.info('update user session cookie');
409
+ j1.writeCookie({
410
+ name: cookie_names.user_session,
411
+ data: user_session
412
+ });
413
+
389
414
  {% comment %} Deferred data loads
390
415
  See: https://stackoverflow.com/questions/3709597/wait-until-all-jquery-ajax-requests-are-done
391
416
  Load J1 Template data objects 'asychronously'
392
417
  -------------------------------------------------------------------------- {% endcomment %}
418
+ // initialize page resources for global modules
419
+ // (asynchronous, should be rewitten to xhrData)
420
+ j1.initBanner(settings);
421
+ j1.initPanel(settings);
422
+ j1.initFooter(settings);
423
+
424
+ state = 'running';
425
+ logger.info('state: ' + state);
426
+ logger.info(logText);
427
+
428
+ user_session.timestamp = timestamp_now;
429
+ j1.writeCookie({
430
+ name: cookie_names.user_session,
431
+ data: user_session
432
+ });
393
433
 
394
434
  // -----------------------------------------------------------------------
395
- // data loader (should be rewitten to xhrData() )
435
+ // additional BS helpers from j1.core
396
436
  // -----------------------------------------------------------------------
397
- $.when (
398
- j1.getColorData(colors_data_path),
399
- j1.getFontSizeData(font_size_data_path),
400
- j1.getMessageCatalog(message_catalog_data_path))
401
- .done (function(colorData, fontSizes, messageCatalog, runtime) {
402
- j1.colors = colorData[0];
403
- j1.fonts = fontSizes[0];
404
-
405
- // set logger for callback|anonymous
406
- //
407
- var logger = log4javascript.getLogger('j1.init');
408
-
409
- logText = j1.getMessage('info', 'getState', 'text');
410
- logText = logText + j1.getMessage('info', 'getState', 'data_objects');
411
- logText = logText + j1.getMessage('info', 'getState', 'finished');
412
- j1.logger('j1.init', 'info', logText);
413
-
414
- logText = j1.getMessage('info', 'setState', 'text');
415
- logText = logText + j1.getMessage('info', 'setState', 'started');
416
- j1.logger('j1.init', 'info', logText);
417
- executeFunctionByName('j1.setState', window, state);
418
-
419
- // set logger for callback|anonymous
420
- var logger = log4javascript.getLogger('j1.init');
421
-
422
- if ( settings.scrollbar === 'false' ) {
423
- $('body').addClass( 'hide-scrollbar' )
424
- $('html').addClass( 'hide-scrollbar-moz' )
425
- }
426
-
427
- logger.info('read user state from cookie');
428
- user_session = j1.readCookie(cookie_names.user_session);
429
-
430
- // process|update UserState
431
- //
432
- themeName = user_session.theme_name;
433
- themeCss = user_session.theme_css;
434
- themeExtensionCss = user_session.theme_extension_css;
435
-
436
- // save last page access
437
- // See: https://stackoverflow.com/questions/3528324/how-to-get-the-previous-url-in-javascript
438
- // See: https://developer.mozilla.org/de/docs/Web/API/Window/history
439
- //
440
- user_session.timestamp = timestamp_now;
441
- referrer = new parseURL(document.referrer);
442
- current_page = window.location.pathname;
443
- user_session.requested_page = current_page;
444
- user_session.previous_page = referrer.search === '' ?
445
- (referrer.pathname === '' ? current_page : referrer.pathname) :
446
- (user_session.previous_page === '' || user_session.previous_page === 'na'
447
- ? '/'
448
- : user_session.previous_page
449
- );
450
-
451
- // calculate last 'pager' if any
452
- //
453
- if (rePager.test(user_session.previous_page)) {
454
- last_pager = user_session.previous_page;
455
- user_session.last_pager = last_pager;
456
- } else {
457
- last_pager = user_session.last_pager;
458
- }
437
+ j1.core.bsFormClearButton();
459
438
 
460
- logger.info('update user session cookie');
461
- j1.writeCookie({
462
- name: cookie_names.user_session,
463
- data: user_session
464
- });
465
-
466
- // ---------------------------------------------------------------------
467
- // Initialize page resources for global modules (sequential asynchronous)
468
- // (should be rewitten to xhrData() )
469
- // ---------------------------------------------------------------------
470
- $.when (
471
- j1.initBanner(settings),
472
- j1.initPanel(settings),
473
- j1.initFooter(settings) )
474
- .then (function (initBanner_response, initPanel_response, initFooter_response) {
475
- var logger = log4javascript.getLogger('j1.init');
476
-
477
- // Wait for LAST thenable (footer) in chain finishes
478
- var footerLoaded = setInterval(function() {
479
- if ( j1.getState() == 'footer_loaded') {
480
- // clear interval checking
481
- clearInterval(footerLoaded);
482
- logger.info('loading data completed');
483
-
484
- // Continue to run initializers
485
- //
486
- state = j1.getMessage('info', 'setState', 'running');
487
- logText = j1.getMessage('info', 'setState', 'text');
488
- logText = logText + j1.getMessage('info', 'setState', 'running');
489
- j1.logger('j1.init', 'info', logText);
490
-
491
- user_session.timestamp = timestamp_now;
492
- j1.writeCookie({
493
- name: cookie_names.user_session,
494
- data: user_session
495
- });
496
-
497
- // ---------------------------------------------------------------
498
- // Finalize|Display page (sequential asynchronous)
499
- // NOTE:
500
- // jadams 2019-01-20: for MDB, enabled only drawer, switch
501
- // and ripples
502
- // ---------------------------------------------------------------
503
- $.when (
504
- j1.initMDB(settings),
505
- j1.initClipboard(settings))
506
- .then (function () {
507
- j1.displayPage();
508
- })
509
- .catch(function(error) {
510
- var logger = log4javascript.getLogger('j1.init');
511
- json_data = JSON.stringify(error, undefined, 2);
512
- logText = 'deferred: ' + json_data;
513
- logger.error(logText);
514
- });
515
- }
516
- }, 25); // END 'footerLoaded'
517
- }) // END load global modules
518
- .catch(function(error) {
519
- var logger = log4javascript.getLogger('j1.init');
520
- json_data = JSON.stringify(error, undefined, 2);
521
- logText = 'deferred: ' + json_data;
522
- logger.error(logText);
523
- });
524
- }) // END load global data objects
525
- .catch(function(error) {
526
- var logger = log4javascript.getLogger('j1.init');
527
- json_data = JSON.stringify(error, undefined, 2);
528
- logText = 'deferred: ' + json_data;
529
- logger.error(logText);
530
- });
439
+ // finalize and display page
440
+ j1.displayPage();
531
441
 
532
442
  }, // END init
533
443
 
534
444
  // -------------------------------------------------------------------------
535
- // initBanner
445
+ // initBanner()
536
446
  // AJAX fetcher to load and place all banner used for a page
537
447
  // -------------------------------------------------------------------------
538
448
  initBanner: function (options) {
@@ -581,30 +491,14 @@ var j1 = (function () {
581
491
  {% assign key = item[0] %}
582
492
  {% assign value = item[1] %}
583
493
 
584
- {% if key and debug %} item:value {{key}}:{{value}} {% endif %}
494
+ {% if key and debug %} item:value {{key}}:{{value}} {% endif %}
585
495
 
586
496
  {% if key == 'id' %} {% assign id = value %} {% endif %}
587
497
  {% if key == 'enabled' %} {% assign enabled = value %} {% endif %}
588
- {% if key == 'background_color_1' %} {% assign background_color_1 = value %} {% endif %}
589
- {% if key == 'background_color_2' %} {% assign background_color_2 = value %} {% endif %}
590
498
  {% endfor %}
591
499
  {% endfor %}
592
500
 
593
501
  {% if id and enabled %}
594
- {% comment %} Add CSS styles for current banner to section <HEAD>
595
- -------------------------------------------------------------------- {% endcomment %}
596
- {% if background_color_1 and background_color_2 %}
597
- var banner_backround_style = '';
598
- // Initialze banner background gradient/colors
599
- banner_backround_style += "<style> .{{id}}-background { ";
600
- banner_backround_style += "background-image: -webkit-gradient(linear, left top, left bottom, from( " +j1.setColorData('{{background_color_1}}')+ " ), to( " +j1.setColorData('{{background_color_2}}')+ " ));";
601
- banner_backround_style += "background-image: -webkit-linear-gradient(top, " +j1.setColorData('{{background_color_1}}')+ " 0%, " +j1.setColorData('{{background_color_2}}')+ " 100%);";
602
- banner_backround_style += "background-image: -o-linear-gradient(top, " +j1.setColorData('{{background_color_1}}')+ " 0%, " +j1.setColorData('{{background_color_2}}')+ " 100%);";
603
- banner_backround_style += "background-image: linear-gradient(to bottom, " +j1.setColorData('{{background_color_1}}')+ " 0%, " +j1.setColorData('{{background_color_2}}')+ " 100%);";
604
- banner_backround_style += 'filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="' +j1.setColorData('{{background_color_1}}')+ '", endColorstr="' +j1.setColorData('{{background_color_2}}')+ '", GradientType=0); ';
605
- banner_backround_style += "} </style>";
606
- $('head').append( banner_backround_style );
607
- {% endif %}
608
502
 
609
503
  {% comment %} Register current banner
610
504
  -------------------------------------------------------------------- {% endcomment %}
@@ -617,8 +511,6 @@ var j1 = (function () {
617
511
  ---------------------------------------------------------------------- {% endcomment %}
618
512
  {% assign id = nil %}
619
513
  {% assign enabled = nil %}
620
- {% assign background_color_1 = nil %}
621
- {% assign background_color_2 = nil %}
622
514
  {% assign banner_config = nil %}
623
515
 
624
516
  {% endfor %} {% comment %} END banner_config {% endcomment %}
@@ -650,7 +542,7 @@ var j1 = (function () {
650
542
  }, // END initBanner
651
543
 
652
544
  // -------------------------------------------------------------------------
653
- // initPanel
545
+ // initPanel()
654
546
  // AJAX fetcher to load and place all panel used for a page
655
547
  // -------------------------------------------------------------------------
656
548
  // ToDo:
@@ -723,7 +615,7 @@ var j1 = (function () {
723
615
 
724
616
  if ( panel.length ) {
725
617
  for (var i in panel) {
726
- var id = "#" + panel[i];
618
+ var id = '#' + panel[i];
727
619
  var selector = $(id);
728
620
  if ( selector.length ) {
729
621
  logText = 'loading panel on id: ' +panel[i];
@@ -741,7 +633,7 @@ var j1 = (function () {
741
633
  }, // END initPanel
742
634
 
743
635
  // -------------------------------------------------------------------------
744
- // initFooter
636
+ // initFooter()
745
637
  // AJAX fetcher to load and place the footer used for a page
746
638
  // -------------------------------------------------------------------------
747
639
  initFooter: function ( options ) {
@@ -759,7 +651,7 @@ var j1 = (function () {
759
651
 
760
652
  state = 'footer_loaded';
761
653
  logger.info('set state for module ' + mod + ': ' + state);
762
- executeFunctionByName(mod + '.setState', window, state)
654
+ executeFunctionByName(mod + '.setState', window, state);
763
655
 
764
656
  logText = 'initialization finished';
765
657
  logger.info(logText);
@@ -787,77 +679,20 @@ var j1 = (function () {
787
679
  return true;
788
680
  }, // END initFooter
789
681
 
790
- // -------------------------------------------------------------------------
791
- // initClipboard
792
- // Create copy-to-clipboard for all pages
793
- // -------------------------------------------------------------------------
794
- initClipboard: function ( options ) {
795
- var logger = log4javascript.getLogger('j1.initClipboard');
796
-
797
- logText = 'initialization started';
798
- logger.info(logText);
799
-
800
- // insert copy to clipboard button before all elements having a
801
- // class of ".highlight" assigned to (e.g. Asciidoc source blocks)
802
- $('.highlight').each(function () {
803
- // Check if no clipboard should be applied
804
- var isNoClip = $(this).closest('.noclip');
805
- if ( isNoClip.length == 0) {
806
- var btnHtml = '<div class="j1-clipboard"><span class="btn-clipboard j1-tooltip" data-toggle="tooltip" data-placement="left" title="Copy to clipboard">Copy</span></div>';
807
- var bumms = $(this).closest('.noclip');
808
- $(this).before(btnHtml);
809
- $('.btn-clipboard').tooltip();
810
- }
811
- });
812
- var clipboard = new Clipboard( '.btn-clipboard', {
813
- target: function target(trigger) {
814
- return trigger.parentNode.nextElementSibling;
815
- }
816
- });
817
-
818
- // Manage clipboard events
819
- clipboard.on('success', function (e) {
820
- $(e.trigger).attr('title', 'copied!').tooltip('_fixTitle').tooltip('show').attr('title', 'Copy to clipboard').tooltip('_fixTitle');
821
- var logger = log4javascript.getLogger('j1.initClipboard');
822
- var logText = 'initialization copy-to-clipboard sucessfull';
823
- logger.debug(logText);
824
- /* Cleanup clipped data for trailing numbers */
825
- var splitted = e.text.split('\n');
826
- var concat;
827
- var i;
828
- for (i=0; i<splitted.length; i++) {
829
- concat += splitted[i].replace(/^\s+\d+/, '');
830
- }
831
- e.clearSelection();
832
- });
833
- clipboard.on('error', function (e) {
834
- var fallbackMsg = /Mac/i.test(navigator.userAgent) ? 'press \u2318 to copy' : 'press ctrl-c to copy';
835
- logger = log4javascript.getLogger('j1.initClipboard');
836
- logText = 'initialization copy-to-clipboard failed, fallback used.';
837
- logger.warn(logText);
838
- $(e.trigger).attr('title', fallbackMsg).tooltip('_fixTitle').tooltip('show').attr('title', 'copy to clipboard').tooltip('_fixTitle');
839
- });
840
-
841
- logText = 'initialization finished';
842
- logger.info(logText);
843
-
844
- return true;
845
- }, // END initClipboard
846
-
847
682
  // -------------------------------------------------------------------------
848
683
  // displayPage
849
- // Show the page after timeout of {{hideOnReload}} ms
684
+ // show the page after timeout of {{flickerTimeout}} ms
850
685
  // -------------------------------------------------------------------------
851
686
  // NOTE:
852
687
  // jadams, 2019-08-21: for unknown reason, the user state data
853
- // (read from cookie) seems not coorect (or loaded too late).
688
+ // (read from cookie) seems not correct (or loaded too late).
854
689
  // To make correct data sure for APP mode, a status request is done
855
690
  // to load the current state from the middleware (skipped in WEB mode)
856
691
  // -------------------------------------------------------------------------
857
692
  displayPage: function (options) {
858
693
  var logger = log4javascript.getLogger('j1.displayPage');
859
694
  var flickerTimeout = {{template_config.flicker_timeout}};
860
- var url = new parseURL(window.location.href)
695
+ var url = new parseURL(window.location.href);
861
696
  var baseUrl = url.origin;
862
697
  var ep_status = baseUrl + '/status' + '?page=' + window.location.pathname;
863
698
  var user_session = j1.readCookie(cookie_names.user_session);
@@ -869,7 +704,6 @@ var j1 = (function () {
869
704
  var appDetected;
870
705
  var categoryAllowed;
871
706
 
872
-
873
707
  logger.info('finalize page');
874
708
  j1.setCss();
875
709
 
@@ -892,7 +726,8 @@ var j1 = (function () {
892
726
  providerPermissions = user_session.provider_permissions;
893
727
  categoryAllowed = providerPermissions.includes(user_session.page_permission);
894
728
 
895
- // Make sure that protected pages are ALWAYS checked for permissions
729
+ // check protected pages (applies for APP only)
730
+ // make sure that protected pages are ALWAYS checked for permissions
896
731
  // -------------------------------------------------------------------
897
732
  if (
898
733
  j1.authEnabled() &&
@@ -910,10 +745,14 @@ var j1 = (function () {
910
745
  }
911
746
  } // END check protected pages
912
747
 
748
+ // show the page delayed
913
749
  setTimeout (function() {
914
- // Display page
750
+ // display page
915
751
  $('#no_flicker').css('display', 'block');
916
752
 
753
+ // bind MDB services to current page
754
+ j1.initMDB();
755
+
917
756
  // show|hide cookie icon
918
757
  if (user_state.cookies_accepted === 'accepted') {
919
758
  // show cookie icon
@@ -942,19 +781,19 @@ var j1 = (function () {
942
781
  if (user_session.authenticated === 'true') {
943
782
  // set signout
944
783
  logger.info('show signout icon');
945
- $('#navLinkSignInOut').attr("data-target","#modalOmniSignOut");
946
- $('#iconSignInOut').removeClass( "mdi-login" ).addClass( "mdi-logout" );
784
+ $('#navLinkSignInOut').attr('data-target','#modalOmniSignOut');
785
+ $('#iconSignInOut').removeClass('mdi-login').addClass('mdi-logout');
947
786
  } else {
948
787
  // set signin
949
788
  logger.info('show signin icon');
950
- $('#navLinkSignInOut').attr("data-target","#modalOmniSignIn");
951
- $('#iconSignInOut').removeClass( "mdi-logout" ).addClass( "mdi-login" );
789
+ $('#navLinkSignInOut').attr('data-target','#modalOmniSignIn');
790
+ $('#iconSignInOut').removeClass('mdi-logout').addClass('mdi-login');
952
791
  }
953
792
  logger.info('authentication detected as: ' + user_session.authenticated);
954
793
  $('#quickLinksSignInOutButton').css('display', 'block');
955
794
  }
956
795
 
957
- // If the page requested contains an anchor element,
796
+ // if the page requested contains an anchor element,
958
797
  // do a smooth scroll to
959
798
  j1.scrollTo();
960
799
 
@@ -981,89 +820,90 @@ var j1 = (function () {
981
820
  logger.info(logText);
982
821
 
983
822
  }, flickerTimeout);
984
- });
985
- // END APP mode
986
- } else {
987
- // web mode
823
+ }); // END APP mode
824
+ } else { // web mode
825
+ // show the page delayed
988
826
  setTimeout (function() {
989
- // Display page
827
+ // display page
990
828
  $('#no_flicker').css('display', 'block');
991
- logger.info('mode detected: web');
992
- logger.info('hide signin icon');
993
- $('#quickLinksSignInOutButton').css('display', 'none');
829
+ logger.info('mode detected: web');
830
+ logger.info('hide signin icon');
831
+ $('#quickLinksSignInOutButton').css('display', 'none');
994
832
 
995
- user_session.current_page = current_url.pathname;
996
- j1.writeCookie({
833
+ user_session.current_page = current_url.pathname;
834
+ j1.writeCookie({
997
835
  name: cookie_names.user_session,
998
836
  data: user_session
999
- });
1000
-
1001
- // show|hide translator icon
1002
- if (translation_enabled) {
1003
- logger.info('translator detected: google');
1004
- logger.info('initialize language selector');
1005
- $('.goog-te-combo').addClass('form-control');
1006
- }
1007
-
1008
- // show|hide cookie icon
1009
- if (user_state.cookies_accepted === 'accepted') {
1010
- // Display cookie icon
1011
- logText = 'show cookie icon';
1012
- logger.info(logText);
1013
- $('#quickLinksCookieButton').css('display', 'block');
1014
- } else {
1015
- logText = 'hide cookie icon';
1016
- logger.info(logText);
1017
- // Display cookie icon
1018
- $('#quickLinksCookieButton').css('display', 'none');
1019
- }
837
+ });
1020
838
 
1021
- // If the page requested contains an anchor element,
1022
- // do a smooth scroll to
1023
- j1.scrollTo();
839
+ // show|hide translator icon
840
+ if (translation_enabled) {
841
+ logger.info('translator detected: google');
842
+ logger.info('initialize language selector');
843
+ $('.goog-te-combo').addClass('form-control');
844
+ }
1024
845
 
1025
- if (user_session.previous_page !== user_session.current_page) {
1026
- logText = 'page change detected';
1027
- logger.info(logText);
1028
- logText = 'previous page: ' + user_session.previous_page;
1029
- logger.info(logText);
1030
- logText = 'current page: ' + user_session.current_page;
1031
- logger.info(logText);
1032
- }
846
+ // show|hide cookie icon
847
+ if (user_state.cookies_accepted === 'accepted') {
848
+ // Display cookie icon
849
+ logText = 'show cookie icon';
850
+ logger.info(logText);
851
+ $('#quickLinksCookieButton').css('display', 'block');
852
+ } else {
853
+ logText = 'hide cookie icon';
854
+ logger.info(logText);
855
+ // Display cookie icon
856
+ $('#quickLinksCookieButton').css('display', 'none');
857
+ }
1033
858
 
1034
- // update sidebar for changed consent|theme data
1035
- logger.info('update sidebar');
1036
- user_state = j1.readCookie(cookie_names.user_state);
1037
- current_user_data = j1.mergeData(user_session, user_state);
1038
- j1.core.navigator.updateSidebar(current_user_data);
859
+ // If the page requested contains an anchor element,
860
+ // do a smooth scroll to
861
+ j1.scrollTo();
1039
862
 
1040
- // Set|Log status
1041
- state = 'finished';
1042
- logText = 'state: ' + state;
863
+ if (user_session.previous_page !== user_session.current_page) {
864
+ logText = 'page change detected';
1043
865
  logger.info(logText);
1044
- logText = 'page finalized successfully';
866
+ logText = 'previous page: ' + user_session.previous_page;
1045
867
  logger.info(logText);
868
+ logText = 'current page: ' + user_session.current_page;
869
+ logger.info(logText);
870
+ }
871
+
872
+ // update sidebar for changed consent|theme data
873
+ logger.info('update sidebar');
874
+ user_state = j1.readCookie(cookie_names.user_state);
875
+ current_user_data = j1.mergeData(user_session, user_state);
876
+ j1.core.navigator.updateSidebar(current_user_data);
877
+
878
+ // set|log status
879
+ state = 'finished';
880
+ logText = 'state: ' + state;
881
+ logger.info(logText);
882
+ logText = 'page finalized successfully';
883
+ logger.info(logText);
1046
884
 
1047
- }, flickerTimeout);
885
+ }, flickerTimeout);
1048
886
  } // END WEB mode
1049
887
  }, // END displayPage
1050
888
 
1051
889
  // -------------------------------------------------------------------------
1052
- // Initialize BS Material Design
890
+ // initMDB()
891
+ // initialize page for MDB
1053
892
  // -------------------------------------------------------------------------
1054
- // ToDo:
1055
893
  initMDB: function (options) {
1056
- var logger;
1057
-
1058
- logger = log4javascript.getLogger('j1.initMDB');
1059
- logText = 'material design is being started';
1060
- logger.info(logText);
894
+ var dependencies_met_bmd = setInterval(function() {
895
+ if ( j1.adapter.mdb.getState() == 'finished' ) {
896
+ var logger = log4javascript.getLogger('j1.initMDB');
897
+ logText = 'initializing MDB for current page: started';
898
+ logger.info(logText);
1061
899
 
1062
- $('body').bootstrapMaterialDesign();
1063
- //new WOW().init();
900
+ $('body').bootstrapMaterialDesign();
1064
901
 
1065
- var logText = 'initializing material design finished';
1066
- logger.info(logText);
902
+ logText = 'initializing MDB for current page: finished';
903
+ logger.info(logText);
904
+ clearInterval(dependencies_met_bmd);
905
+ }
906
+ }, 25);
1067
907
  }, // END initMDB
1068
908
 
1069
909
  // -------------------------------------------------------------------------
@@ -1071,9 +911,10 @@ var j1 = (function () {
1071
911
  // -------------------------------------------------------------------------
1072
912
 
1073
913
  // -------------------------------------------------------------------------
1074
- // Merge two objects (properties) and returns the resulting object
1075
- // TODO: Improve comment, give synopsis and example
1076
- // See: https://stackoverflow.com/questions/43109229/merge-default-options-containing-object-with-json-object
914
+ // mergeData()
915
+ // merge two objects (properties) and returns the resulting object
916
+ // see: https://stackoverflow.com/questions/43109229/merge-default-options-containing-object-with-json-object
917
+ // TODO: Improve comment, give synopsis and example
1077
918
  // -------------------------------------------------------------------------
1078
919
  mergeData: function () {
1079
920
  var a = [].slice.call(arguments), o = a.shift();
@@ -1087,35 +928,39 @@ var j1 = (function () {
1087
928
  }, // END mergeData
1088
929
 
1089
930
  // -------------------------------------------------------------------------
1090
- // returns the last vistited page
931
+ // getPrevPage()
932
+ // returns the last vistited page
1091
933
  // -------------------------------------------------------------------------
1092
934
  getPrevPage: function () {
1093
935
  return previous_page;
1094
936
  }, // END getPrevPage
1095
937
 
1096
938
  // -------------------------------------------------------------------------
1097
- // returns the preferred language taken form window.navigator
1098
- // See:
1099
- // https://stackoverflow.com/questions/1043339/javascript-for-detecting-browser-language-preference
939
+ // getLanguage()
940
+ // returns the preferred language taken form window.navigator
941
+ // See:
942
+ // https://stackoverflow.com/questions/1043339/javascript-for-detecting-browser-language-preference
1100
943
  // -------------------------------------------------------------------------
1101
944
  getLanguage: function () {
1102
945
  var language = navigator.languages ? navigator.languages[0] : (navigator.language || navigator.userLanguage);
1103
946
  }, // END getLanguage
1104
947
 
1105
948
  // -------------------------------------------------------------------------
1106
- // returns the template version taken from site config (_config.yml)
949
+ // getTemplateVersion()
950
+ // returns the template version taken from site config (_config.yml)
1107
951
  // -------------------------------------------------------------------------
1108
952
  getTemplateVersion: function () {
1109
953
  return '{{template_version}}';
1110
954
  }, // END getTemplateVersion
1111
955
 
1112
956
  // -------------------------------------------------------------------------
957
+ // scrollTo()
1113
958
  // Scrolls smooth to any anchor referenced by an page URL on
1114
959
  // e.g. a page reload. Values for delay|offset are taken from
1115
960
  // TOCCER module
1116
961
  // -------------------------------------------------------------------------
1117
962
  scrollTo: function () {
1118
- var anchor = window.location.href.split("#")[1];
963
+ var anchor = window.location.href.split('#')[1];
1119
964
  var anchor_id = '#' + anchor;
1120
965
  var selector;
1121
966
 
@@ -1140,18 +985,18 @@ var j1 = (function () {
1140
985
  }, // END scrollTo
1141
986
 
1142
987
  // -------------------------------------------------------------------------
1143
- // authEnabled:
988
+ // authEnabled()
1144
989
  // Returns the state of the authentication module
1145
990
  // -------------------------------------------------------------------------
1146
991
  authEnabled: function () {
1147
- var logger = log4javascript.getLogger('j1.authentication');
1148
- var authEnabled = {{authentication_options.j1_auth.enabled}}
992
+ var logger = log4javascript.getLogger('j1.authentication');
993
+ var authEnabled = {{authentication_options.j1_auth.enabled}};
1149
994
 
1150
995
  return authEnabled;
1151
996
  }, // END authEnabled
1152
997
 
1153
998
  // -------------------------------------------------------------------------
1154
- // appDetected:
999
+ // appDetected()
1155
1000
  // Returns true if a web session cookie exists
1156
1001
  // -------------------------------------------------------------------------
1157
1002
  appDetected: function () {
@@ -1170,7 +1015,7 @@ var j1 = (function () {
1170
1015
  }, // END appDetected
1171
1016
 
1172
1017
  // -------------------------------------------------------------------------
1173
- // xhrData:
1018
+ // xhrData()
1174
1019
  // Load data asychronously using XHR on a DIV container
1175
1020
  // specified (from options: xhr_data_path)
1176
1021
  // -------------------------------------------------------------------------
@@ -1199,27 +1044,28 @@ var j1 = (function () {
1199
1044
  };
1200
1045
  };
1201
1046
 
1202
- var id = "#" + options.xhr_container_id;
1047
+ var id = '#' + options.xhr_container_id;
1203
1048
  var selector = $(id);
1204
1049
 
1205
1050
  if ( selector.length ) {
1206
- var modal_html_data_path = options.xhr_data_path + " > *";
1051
+ var modal_html_data_path = options.xhr_data_path + ' > *';
1207
1052
  selector.load( modal_html_data_path, cb_load_closure( mod, id ) );
1208
1053
  return true;
1209
1054
  } else {
1210
- logText = "data not loaded"
1055
+ logText = 'data not loaded';
1211
1056
  logger.warn(logText);
1212
1057
  // Set processing state to 'finished' to complete module load
1213
1058
  state = 'finished';
1214
1059
  logger.info('state: ' + state);
1215
- executeFunctionByName(mod + '.setState', window, state)
1060
+ executeFunctionByName(mod + '.setState', window, state);
1216
1061
  return false;
1217
1062
  }
1218
1063
  }, // END xhrData
1219
1064
 
1220
1065
  // -------------------------------------------------------------------------
1221
- // xhrApi: XMLHttpRequest (XHR) based async server API request
1222
- // Request an REST API at 'url', using verb 'type' of response type 'type'
1066
+ // xhrApi:()
1067
+ // XMLHttpRequest (XHR) based async server API request
1068
+ // Request an REST API at 'url', using verb 'type' of response type 'type'
1223
1069
  // -------------------------------------------------------------------------
1224
1070
  xhrApi: function (url, request_type, data_type) {
1225
1071
  var logger = log4javascript.getLogger('j1.xhrApi');
@@ -1246,236 +1092,7 @@ var j1 = (function () {
1246
1092
  }, // END xhrApi
1247
1093
 
1248
1094
  // -------------------------------------------------------------------------
1249
- // fetchAPI: Fetch (Promise) based async request
1250
- // Returns the current git state collected from /git endpoint
1251
- // -------------------------------------------------------------------------
1252
- fetchAPI: function (params, cbData) {
1253
- var logger = log4javascript.getLogger('j1.fetchAPI');
1254
- var cbData = cbData;
1255
- var parameters = params == '' ? 'all' : params;
1256
- var url = 'http://localhost:41001/gut';
1257
-
1258
- async function callAPI() {
1259
- const URL = url;
1260
- const fetchResult = fetch(URL)
1261
- const response = await fetchResult;
1262
-
1263
- if (response.ok) {
1264
- const jsonData = await response.json();
1265
- json_data = JSON.stringify(jsonData, undefined, 2);
1266
- logText = 'response from fetch received: ' + json_data;
1267
- logger.info(logText);
1268
- //console.log(jsonData);
1269
- } else {
1270
- throw Error(response.statusText);
1271
- // logger.error("Fetch request failed: " + response.statusText);
1272
- }
1273
- }
1274
- callAPI();
1275
-
1276
- return true;
1277
- }, // END fetchAPI
1278
-
1279
- // -------------------------------------------------------------------------
1280
- // getRuntimeData: Returns the j1_runtime data object
1281
- //
1282
- // -------------------------------------------------------------------------
1283
- getRuntimeData: function (data_path) {
1284
- var logger = log4javascript.getLogger('j1.getRuntimeData');
1285
- var logText;
1286
-
1287
- return $.ajax({
1288
- url: data_path,
1289
- success: function (contents) {
1290
- logText = 'data loaded successfully';
1291
- logger.info(logText);
1292
- state = 'runtime_data_loaded_success';
1293
- logger.info('state: ' + state);
1294
- executeFunctionByName('j1.setState', window, state);
1295
- },
1296
- error: function (err) {
1297
- logText = 'runtime data not loaded: ' + err;
1298
- logger.warn(logText);
1299
- state = 'runtime_data_loaded_failed';
1300
- logger.info('state: ' + state);
1301
- executeFunctionByName('j1.setState', window, state)
1302
- return false;
1303
- }
1304
- });
1305
-
1306
- }, // END getRuntimeData
1307
-
1308
- // -------------------------------------------------------------------------
1309
- // getColorData: Returns the j1_colors object
1310
- // Load color definitions from colors_data_path
1311
- // -------------------------------------------------------------------------
1312
- getColorData: function (data_path) {
1313
- var logger = log4javascript.getLogger('j1.getColorData');
1314
- var j1_colors = {};
1315
-
1316
- return $.ajax({
1317
- url: data_path,
1318
- success: function (data) {
1319
- var logText = "color data loaded successfully"
1320
- logger.info(logText);
1321
- state = 'color_data_loaded_success';
1322
- logger.info('state: ' + state);
1323
- executeFunctionByName('j1.setState', window, state);
1324
-
1325
- if (typeof data == 'string') {
1326
- j1_colors = JSON.parse(data);
1327
- }
1328
- if (typeof data == 'object') {
1329
- j1_colors = data;
1330
- }
1331
- },
1332
- error: function (data) {
1333
- var logText = "color data not loaded"
1334
- logger.warn(logText);
1335
- state = 'color_data_loaded_failed';
1336
- logger.info('state: ' + state);
1337
- executeFunctionByName('j1.setState', window, state)
1338
- return false;
1339
- }
1340
- });
1341
-
1342
- }, // END getColorData
1343
-
1344
- // -------------------------------------------------------------------------
1345
- // setColorData:
1346
- //
1347
- // -------------------------------------------------------------------------
1348
- setColorData: function (color) {
1349
-
1350
- if ( typeof color != 'undefined' ) {
1351
- var reHex = /^#[A-Fa-f0-9]+$/;
1352
- var reRGBA = /^rgba/;
1353
- var isHex = color.match(reHex);
1354
- var isRGBA = color.match(reRGBA);
1355
-
1356
- if ( typeof j1.colors[color] != 'undefined' ) {
1357
- return j1.colors[color];
1358
- } else if (isHex) {
1359
- return color;
1360
- } else if (isRGBA) {
1361
- return color;
1362
- } else {
1363
- return false;
1364
- }
1365
- } else {
1366
- return false;
1367
- }
1368
-
1369
- }, // END setColorData
1370
-
1371
- // -------------------------------------------------------------------------
1372
- // getFontSizeData: Returns the j1_font_sizes object
1373
- // Load loadFontSize definitions from font_size_data_path
1374
- // -------------------------------------------------------------------------
1375
- getFontSizeData: function (data_path) {
1376
- var logger = log4javascript.getLogger('j1.getFontSizeData');
1377
- var j1_font_sizes = {};
1378
-
1379
- return $.ajax({
1380
- url: data_path,
1381
- success: function (data) {
1382
- var logText = "font size data loaded successfully"
1383
- logger.info(logText);
1384
- state = 'fontsize_data_loaded_success';
1385
- logger.info('state: ' + state);
1386
- executeFunctionByName('j1.setState', window, state);
1387
-
1388
- if (typeof data == 'string') {
1389
- j1_font_sizes = JSON.parse(data);
1390
- }
1391
- if (typeof data == 'object') {
1392
- j1_font_sizes = data;
1393
- }
1394
- },
1395
- error: function (data) {
1396
- var logText = "font size data not loaded"
1397
- logger.warn(logText);
1398
- state = 'fontsize_data_loaded_failed';
1399
- logger.info('state: ' + state);
1400
- executeFunctionByName('j1.setState', window, state)
1401
- return false;
1402
- }
1403
- });
1404
-
1405
- }, // END getFontSizeData
1406
-
1407
- // -------------------------------------------------------------------------
1408
- // getFontSize: Returns the CSS value for a 'logical' fontsize
1409
- // out of the j1_font_sizes object
1410
- // -------------------------------------------------------------------------
1411
- setFontSize: function (size) {
1412
-
1413
- if ( typeof size != 'undefined' ) {
1414
- var reCSS = /\bpx\b|\brem\b|\bem\b|\%|\binherit\b|\binitial\b|\bunset\b/;
1415
- var isCSS = size.match(reCSS);
1416
-
1417
- // if ( typeof j1_font_sizes[size] != "undefined" ) {
1418
- if ( typeof j1.fonts[size] != "undefined" ) {
1419
- return j1.fonts[size];
1420
- } else if (isCSS) {
1421
- return size;
1422
- } else {
1423
- return false;
1424
- }
1425
- } else {
1426
- return false;
1427
- }
1428
-
1429
- }, // END getFontSize
1430
-
1431
- // -------------------------------------------------------------------------
1432
- // loadMessageCatalog
1433
- // Loads the message catalog object
1434
- // -------------------------------------------------------------------------
1435
- getMessageCatalog: function (data_path /*, request_type, data_type*/) {
1436
- var logger = log4javascript.getLogger('j1.loadMessageCatalog');
1437
- var message_catalog = {};
1438
- var type = typeof request_type == 'undefined' || request_type == '' ? 'GET' : request_type;
1439
- var data_type = typeof data_type == 'undefined' || data_type == '' ? 'text' : data_type;
1440
- var messageData;
1441
- var logBase;
1442
- var logText;
1443
- var property;
1444
-
1445
- return $.ajax({
1446
- url: data_path,
1447
- type: type,
1448
- dataType: data_type,
1449
- success: function (data) {
1450
- messageData = yaml.safeLoad(data);
1451
- for (property in messageData) {
1452
- if (messageData.hasOwnProperty(property)) {
1453
- message_catalog[property] = {};
1454
- messageData[property].forEach((element) => {
1455
- var key = Object.keys(element)[0];
1456
- var value = element[Object.keys(element)[0]];
1457
- message_catalog[property][key] = value;
1458
- });
1459
- }
1460
- }
1461
- j1.messages = message_catalog;
1462
- logBase = message_catalog.info.getData.message
1463
- logText = logBase.text + logBase.message_catalog + logBase.finished;
1464
- logger.info(logText);
1465
- },
1466
- error: function(data) {
1467
- var json_data = JSON.stringify(data, undefined, 2);
1468
- logBase = message_catalog.error.getData.message;
1469
- logText = logBase.text + logBase.xhr + ': ' + json_data
1470
- logger.error(logText);
1471
- }
1472
- });
1473
-
1474
- }, // END getMessageCatalog
1475
-
1476
- // -------------------------------------------------------------------------
1477
- // readCookie:
1478
- //
1095
+ // readCookie()
1479
1096
  // -------------------------------------------------------------------------
1480
1097
  readCookie: function (name) {
1481
1098
  var data;
@@ -1497,7 +1114,7 @@ var j1 = (function () {
1497
1114
  }, // END readCookie
1498
1115
 
1499
1116
  // -------------------------------------------------------------------------
1500
- // writeCookie:
1117
+ // writeCookie()
1501
1118
  // Write 'data' to a cookie 'name'. If not exists, the cookie gets
1502
1119
  // created. Returns 'true' if cookie was written, otherwise 'false'.
1503
1120
  //
@@ -1529,8 +1146,8 @@ var j1 = (function () {
1529
1146
  Cookies.set(settings.name, data_encoded);
1530
1147
  }
1531
1148
  } else {
1532
- cookie_data = settings.data
1533
- data_json = JSON.stringify( settings.data );
1149
+ cookie_data = settings.data;
1150
+ data_json = JSON.stringify(settings.data);
1534
1151
  data_encoded = window.btoa(data_json);
1535
1152
  if (settings.expires > 0) {
1536
1153
  Cookies.set(settings.name, data_encoded, { expires: settings.expires });
@@ -1575,13 +1192,13 @@ var j1 = (function () {
1575
1192
  // -------------------------------------------------------------------------
1576
1193
  deleteCookie: function (options) {
1577
1194
  var name = options;
1578
- var all_cookies = document.cookie.split("; ");
1195
+ var all_cookies = document.cookie.split('; ');
1579
1196
 
1580
1197
  if ( name === 'all' ) {
1581
1198
  for (var c = 0; c < all_cookies.length; c++) {
1582
- var d = window.location.hostname.split(".");
1199
+ var d = window.location.hostname.split('.');
1583
1200
  while (d.length > 0) {
1584
- var cookieBase = encodeURIComponent(all_cookies[c].split(";")[0].split("=")[0]) + '=; expires=Thu, 01-Jan-1970 00:00:01 GMT; domain=' + d.join('.') + ' ;path=';
1201
+ var cookieBase = encodeURIComponent(all_cookies[c].split(';')[0].split('=')[0]) + '=; expires=Thu, 01-Jan-1970 00:00:01 GMT; domain=' + d.join('.') + ' ;path=';
1585
1202
  var p = location.pathname.split('/');
1586
1203
  document.cookie = cookieBase + '/';
1587
1204
  while (p.length > 0) {
@@ -1592,7 +1209,7 @@ var j1 = (function () {
1592
1209
  }
1593
1210
  }
1594
1211
  } else {
1595
- document.cookie = name + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT";
1212
+ document.cookie = name + '=;expires=Thu, 01 Jan 1970 00:00:00 GMT';
1596
1213
  }
1597
1214
 
1598
1215
  return true;
@@ -1603,8 +1220,8 @@ var j1 = (function () {
1603
1220
  // -------------------------------------------------------------------------
1604
1221
  existsCookie: function (name) {
1605
1222
  var dc = document.cookie;
1606
- var prefix = name + "=";
1607
- var begin = dc.indexOf("; " + prefix);
1223
+ var prefix = name + '=';
1224
+ var begin = dc.indexOf('; ' + prefix);
1608
1225
  var end = dc.length; // default to end of the string
1609
1226
  var cookieExists = false;
1610
1227
  var cookieContent = '';
@@ -1622,8 +1239,8 @@ var j1 = (function () {
1622
1239
 
1623
1240
  // if ";" is found somewhere after the prefix position then "end" is
1624
1241
  // that position, otherwise it defaults to the end of the string
1625
- if (dc.indexOf(";", begin) !== -1) {
1626
- end = dc.indexOf(";", begin);
1242
+ if (dc.indexOf(';', begin) !== -1) {
1243
+ end = dc.indexOf(';', begin);
1627
1244
  }
1628
1245
 
1629
1246
  cookieContent = decodeURI(dc.substring(begin + prefix.length, end) ).replace(/"/g, '');
@@ -1645,63 +1262,68 @@ var j1 = (function () {
1645
1262
  resolveMacros: function (user_data) {
1646
1263
  var logger = log4javascript.getLogger('j1.resolveMacros');
1647
1264
 
1648
- if (Object.keys(user_data).length) {
1649
- $('[id^=macro-]').each(function() {
1265
+ var sidebarLoaded = setInterval(function() {
1266
+ if ($('#sidebar_mmenu').length) {
1267
+ if (Object.keys(user_data).length) {
1268
+ $('[id^=macro-]').each(function() {
1650
1269
 
1651
- $('#macro-provider').each(function() {
1652
- var $this = $(this);
1653
- var $html = $this.html();
1654
- $this.html($html.replace('??provider', user_data.provider));
1655
- this.href = this.href.replace(/.*\/??provider-site-url/, user_data.provider_site_url);
1656
- });
1657
- $('#macro-user-name').each(function() {
1658
- var $this = $(this);
1659
- var $html = $this.html();
1660
- $this.html($html.replace('??user-name', user_data.user_name));
1661
- this.href = this.href.replace(/.*\/??provider_member_url/, user_data.provider_member_url);
1662
- });
1663
- $('#macro-provider-permissions').each(function() {
1664
- var $this = $(this);
1665
- var $html = $this.html();
1666
- $this.html($html.replace('??provider-permissions', user_data.provider_permissions));
1667
- this.href = this.href.replace(/.*\/??provider_member_url/, user_data.provider_member_url);
1668
- });
1669
- $('#macro-provider-membership').each(function() {
1670
- var $this = $(this);
1671
- var $html = $this.html();
1672
- $this.html($html.replace('??provider-membership', user_data.provider_membership));
1673
- this.href = this.href.replace(/.*\/??provider_member_url/, user_data.provider_member_url);
1674
- });
1675
- $('#macro-cookie-state').each(function() {
1676
- var $this = $(this);
1677
- var $html = $this.html();
1678
- $this.html($html.replace('??cookie-state', user_data.cookies_accepted));
1679
- this.href = this.href.replace(/.*\/??provider_privacy_url/, user_data.provider_privacy_url);
1680
- });
1681
- $('#macro-theme-name').each(function() {
1682
- var $this = $(this);
1683
- var $html = $this.html();
1684
- $this.html($html.replace('??theme-name', user_data.theme_name));
1685
- });
1686
- $('#macro-theme-author').each(function() {
1687
- var $this = $(this);
1688
- var $html = $this.html();
1689
- $this.html($html.replace('??theme-author', user_data.theme_author));
1690
- this.href = this.href.replace(/.*\/??theme-author-url/, user_data.theme_author_url);
1691
- });
1692
- $('#macro-theme-version').each(function() {
1693
- var $this = $(this);
1694
- var $html = $this.html();
1695
- $this.html($html.replace('??theme-version', user_data.theme_version));
1696
- });
1697
-
1698
- });
1699
- return true;
1700
- } else {
1701
- logger.error('no user data provided');
1702
- return false;
1703
- }
1270
+ $('#macro-provider').each(function() {
1271
+ var $this = $(this);
1272
+ var $html = $this.html();
1273
+ $this.html($html.replace('??provider', user_data.provider));
1274
+ this.href = this.href.replace(/.*\/??provider-site-url/, user_data.provider_site_url);
1275
+ });
1276
+ $('#macro-user-name').each(function() {
1277
+ var $this = $(this);
1278
+ var $html = $this.html();
1279
+ $this.html($html.replace('??user-name', user_data.user_name));
1280
+ this.href = this.href.replace(/.*\/??provider_member_url/, user_data.provider_member_url);
1281
+ });
1282
+ $('#macro-provider-permissions').each(function() {
1283
+ var $this = $(this);
1284
+ var $html = $this.html();
1285
+ $this.html($html.replace('??provider-permissions', user_data.provider_permissions));
1286
+ this.href = this.href.replace(/.*\/??provider_member_url/, user_data.provider_member_url);
1287
+ });
1288
+ $('#macro-provider-membership').each(function() {
1289
+ var $this = $(this);
1290
+ var $html = $this.html();
1291
+ $this.html($html.replace('??provider-membership', user_data.provider_membership));
1292
+ this.href = this.href.replace(/.*\/??provider_member_url/, user_data.provider_member_url);
1293
+ });
1294
+ $('#macro-cookie-state').each(function() {
1295
+ var $this = $(this);
1296
+ var $html = $this.html();
1297
+ $this.html($html.replace('??cookie-state', user_data.cookies_accepted));
1298
+ this.href = this.href.replace(/.*\/??provider_privacy_url/, user_data.provider_privacy_url);
1299
+ });
1300
+ $('#macro-theme-name').each(function() {
1301
+ var $this = $(this);
1302
+ var $html = $this.html();
1303
+ $this.html($html.replace('??theme-name', user_data.theme_name));
1304
+ });
1305
+ $('#macro-theme-author').each(function() {
1306
+ var $this = $(this);
1307
+ var $html = $this.html();
1308
+ $this.html($html.replace('??theme-author', user_data.theme_author));
1309
+ this.href = this.href.replace(/.*\/??theme-author-url/, user_data.theme_author_url);
1310
+ });
1311
+ $('#macro-theme-version').each(function() {
1312
+ var $this = $(this);
1313
+ var $html = $this.html();
1314
+ $this.html($html.replace('??theme-version', user_data.theme_version));
1315
+ });
1704
1316
 
1317
+ });
1318
+ clearInterval(sidebarLoaded);
1319
+ return true;
1320
+ } else {
1321
+ logger.error('no user data provided');
1322
+ clearInterval(sidebarLoaded);
1323
+ return false;
1324
+ }
1325
+ }
1326
+ }, 25); // END 'sidebarLoaded'
1705
1327
  }, // END resolveMacros
1706
1328
 
1707
1329
  // -------------------------------------------------------------------------
@@ -1711,48 +1333,54 @@ var j1 = (function () {
1711
1333
  updateMacros: function (user_data) {
1712
1334
  var logger = log4javascript.getLogger('j1.updateMacros');
1713
1335
 
1714
- if (Object.keys(user_data).length) {
1715
- $('[id^=macro-]').each(function() {
1336
+ var sidebarLoaded = setInterval(function() {
1337
+ if ($('#sidebar_mmenu').length) {
1716
1338
 
1717
- $('#macro-provider').each(function() {
1718
- var $this = $(this);
1719
- var $html = $this.html();
1720
- $this.html($html.replace(/Provider:.*/, 'Provider: ' + user_data.provider));
1721
- $('#macro-provider').attr("href", user_data.provider_site_url);
1722
- });
1723
- $('#macro-user-name').each(function() {
1724
- var $this = $(this);
1725
- var $html = $this.html();
1726
- $this.html($html.replace(/User:.*/, 'User: ' + user_data.user_name));
1727
- $('#macro-user-name').attr("href", user_data.provider_member_url);
1728
- });
1729
- $('#macro-provider-permissions').each(function() {
1730
- var $this = $(this);
1731
- var $html = $this.html();
1732
- // $this.html($html.replace(/public|protected|private|blocked/, user_data.provider_permissions));
1733
- $this.html($html.replace(/public.*|protected.*|private.*|blocked.*/, user_data.provider_permissions));
1734
- $('#macro-provider-permissions').attr("href", user_data.provider_member_url);
1735
- });
1736
- $('#macro-provider-membership').each(function() {
1737
- var $this = $(this);
1738
- var $html = $this.html();
1739
- $this.html($html.replace(/guest|member/, user_data.provider_membership));
1740
- $('#macro-provider-membership').attr("href", user_data.provider_member_url);
1741
- });
1742
- $('#macro-cookie-state').each(function() {
1743
- var $this = $(this);
1744
- var $html = $this.html();
1745
- $this.html($html.replace(/accepted|declined|pending/, user_data.cookies_accepted));
1746
- $('#macro-cookie-state').attr("href", user_data.provider_privacy_url);
1747
- });
1339
+ if (Object.keys(user_data).length) {
1340
+ $('[id^=macro-]').each(function() {
1748
1341
 
1749
- });
1750
- return true;
1751
- } else {
1752
- logger.error('no user data provided');
1753
- return false;
1754
- }
1342
+ $('#macro-provider').each(function() {
1343
+ var $this = $(this);
1344
+ var $html = $this.html();
1345
+ $this.html($html.replace(/Provider:.*/, 'Provider: ' + user_data.provider));
1346
+ $('#macro-provider').attr('href', user_data.provider_site_url);
1347
+ });
1348
+ $('#macro-user-name').each(function() {
1349
+ var $this = $(this);
1350
+ var $html = $this.html();
1351
+ $this.html($html.replace(/User:.*/, 'User: ' + user_data.user_name));
1352
+ $('#macro-user-name').attr('href', user_data.provider_member_url);
1353
+ });
1354
+ $('#macro-provider-permissions').each(function() {
1355
+ var $this = $(this);
1356
+ var $html = $this.html();
1357
+ // $this.html($html.replace(/public|protected|private|blocked/, user_data.provider_permissions));
1358
+ $this.html($html.replace(/public.*|protected.*|private.*|blocked.*/, user_data.provider_permissions));
1359
+ $('#macro-provider-permissions').attr('href', user_data.provider_member_url);
1360
+ });
1361
+ $('#macro-provider-membership').each(function() {
1362
+ var $this = $(this);
1363
+ var $html = $this.html();
1364
+ $this.html($html.replace(/guest|member/, user_data.provider_membership));
1365
+ $('#macro-provider-membership').attr('href', user_data.provider_member_url);
1366
+ });
1367
+ $('#macro-cookie-state').each(function() {
1368
+ var $this = $(this);
1369
+ var $html = $this.html();
1370
+ $this.html($html.replace(/accepted|declined|pending/, user_data.cookies_accepted));
1371
+ $('#macro-cookie-state').attr('href', user_data.provider_privacy_url);
1372
+ });
1755
1373
 
1374
+ });
1375
+ clearInterval(sidebarLoaded);
1376
+ return true;
1377
+ } else {
1378
+ logger.error('no user data provided');
1379
+ clearInterval(sidebarLoaded);
1380
+ return false;
1381
+ }
1382
+ }
1383
+ }, 25); // END 'sidebarLoaded'
1756
1384
  }, // END updateMacros
1757
1385
 
1758
1386
  // -------------------------------------------------------------------------
@@ -1760,7 +1388,7 @@ var j1 = (function () {
1760
1388
  // Get a log message from the log message catalog object
1761
1389
  // -------------------------------------------------------------------------
1762
1390
  getMessage: function (level, message, property) {
1763
- var message = j1.messages[level][message]["message"][property];
1391
+ var message = j1.messages[level][message]['message'][property];
1764
1392
 
1765
1393
  return message;
1766
1394
  }, // END getMessage
@@ -1777,49 +1405,6 @@ var j1 = (function () {
1777
1405
  return true;
1778
1406
  }, // END logger
1779
1407
 
1780
- // -------------------------------------------------------------------------
1781
- // getBaseUrl
1782
- // -------------------------------------------------------------------------
1783
- // getBaseUrl: function () {
1784
- // var myUrl = window.location.href;
1785
- // var ua = platform.name.toLowerCase();
1786
- // var reURL = new RegExp('(http[s]?:\/\/)?([^\/]+)(.*)');
1787
- // var baseUrl;
1788
- // //var reGroups;
1789
- //
1790
- // // NOTE: named capture groups NOT supported by FF + IE11
1791
- // // if ( ua === 'chrome' ) {
1792
- // // reURL = new RegExp('(?<prot>http[s]?:\/\/)?(?<host>[^\/]+)(?<path>.*)');
1793
- // // reGroups = myUrl.match(reURL).groups;
1794
- // // baseUrl = reGroups.prot + reGroups.host;
1795
- // // } else {
1796
- // // reURL = new RegExp('(http[s]?:\/\/)?([^\/]+)(.*)');
1797
- // // myUrl.match(reURL);
1798
- // // baseUrl = RegExp.$1 + RegExp.$2 + RegExp.$3;
1799
- // // }
1800
- //
1801
- // myUrl.match(reURL);
1802
- // // baseUrl = RegExp.$1 + RegExp.$2 + RegExp.$3;
1803
- // baseUrl = RegExp.$1 + RegExp.$2;
1804
- //
1805
- // return baseUrl;
1806
- // }, // END getBaseUrl
1807
-
1808
- // -------------------------------------------------------------------------
1809
- // getPath
1810
- // See: https://stackoverflow.com/questions/27745/getting-parts-of-a-url-regex
1811
- // -------------------------------------------------------------------------
1812
- // getPath: function ( myUrl ) {
1813
- // var url = new parseURL(myUrl)
1814
- // // var reURL = new RegExp('(http[s]?:\/\/)?([^\/]+)(.*)');
1815
- // // var path;
1816
- // //
1817
- // // myUrl.match(reURL);
1818
- // path = url.path;
1819
- //
1820
- // return path;
1821
- // }, // END getPath
1822
-
1823
1408
  // -------------------------------------------------------------------------
1824
1409
  // Send message
1825
1410
  // -------------------------------------------------------------------------
@@ -1831,12 +1416,12 @@ var j1 = (function () {
1831
1416
  if ( receiver === 'j1' ) {
1832
1417
  logText = 'send message from ' + sender + ' to' + receiver + ': ' + json_message;
1833
1418
  logger.debug(logText);
1834
- executeFunctionByName('j1' + '.messageHandler', window, sender, message)
1419
+ executeFunctionByName('j1' + '.messageHandler', window, sender, message);
1835
1420
  } else {
1836
1421
  logText = 'send message from ' + sender + ' to ' + receiver + ': ' + json_message;
1837
1422
  logger.debug(logText);
1838
1423
  //executeFunctionByName('j1.' + receiver + '.messageHandler', window, sender, message)
1839
- executeFunctionByName(receiver + '.messageHandler', window, sender, message)
1424
+ executeFunctionByName(receiver + '.messageHandler', window, sender, message);
1840
1425
  }
1841
1426
 
1842
1427
  }, // END sendMessage
@@ -1941,19 +1526,18 @@ var j1 = (function () {
1941
1526
  // -----------------------------------------------------------------------
1942
1527
  $('head').append('<style>.btn-viewer:hover { background-color: ' +bg_primary+ ' !important; }</style>');
1943
1528
 
1944
- // clipboard
1945
- // -----------------------------------------------------------------------
1946
- $('head').append('<style>.btn-clipboard:hover { background-color: ' +bg_primary+ ' !important; }</style>');
1947
-
1948
1529
  // extended modals
1949
1530
  // -----------------------------------------------------------------------
1950
- var tabs_pills_link_color_active = j1.setColorData('md_blue'); // j1.getStyleValue('btn-info', 'background-color');
1951
- var tabs_pills_link_color_hover = j1.setColorData('md_gray_300'); // j1.getStyleValue('btn-secondary', 'background-color');
1531
+ // var tabs_pills_link_color_active = j1.setColorData('md_blue'); // j1.getStyleValue('btn-info', 'background-color');
1532
+ // var tabs_pills_link_color_hover = j1.setColorData('md_gray_300'); // j1.getStyleValue('btn-secondary', 'background-color');
1533
+
1534
+ // var tabs_pills_link_color_active = 'mdi-blue';
1535
+ // var tabs_pills_link_color_hover = 'mdi-gray-300';
1952
1536
 
1953
1537
  // nav module
1954
1538
  // -----------------------------------------------------------------------
1955
- $('head').append('<style>.nav-link:hover { background-color: ' +tabs_pills_link_color_hover+ ' !important; }</style>');
1956
- $('head').append('<style>.nav-link.active { background-color: ' +tabs_pills_link_color_active+ ' !important; }</style>');
1539
+ // $('head').append('<style>.nav-link:hover { background-color: ' +tabs_pills_link_color_hover+ ' !important; }</style>');
1540
+ // $('head').append('<style>.nav-link.active { background-color: ' +tabs_pills_link_color_active+ ' !important; }</style>');
1957
1541
 
1958
1542
  return true;
1959
1543
  }, // END setCss
@@ -1992,14 +1576,13 @@ var j1 = (function () {
1992
1576
  // getUserAgent
1993
1577
  // Return the name of the web browser
1994
1578
  // -------------------------------------------------------------------------
1995
- checkUserAgent: function (ua_name) {
1579
+ checkUserAgent: function () {
1996
1580
  if (navigator.userAgent.search(ua_name) >= 0) {
1997
1581
  return true;
1998
1582
  } else {
1999
1583
  return false;
2000
1584
  }
2001
1585
  }, // END checkUserAgent
2002
-
2003
1586
  // -------------------------------------------------------------------------
2004
1587
  // Return always true (for testing purposes)
2005
1588
  // -------------------------------------------------------------------------
@@ -2023,16 +1606,18 @@ var j1 = (function () {
2023
1606
  window.home();
2024
1607
  } else if (document.all) {
2025
1608
  // for IE
2026
- window.location.href = "about:home";
1609
+ window.location.href = 'about:home';
2027
1610
  } else {
2028
- window.location.href = "about:blank";
1611
+ window.location.href = 'about:blank';
2029
1612
  }
2030
1613
  } // END gohome
2031
-
2032
- } // END j1 (return)
1614
+ }; // END j1 (return)
2033
1615
  }) (j1, window);
2034
1616
 
2035
1617
  {% endcapture %}
2036
-
2037
- {{ cache | strip_empty_lines }}
1618
+ {% if production %}
1619
+ {{ cache | minifyJS }}
1620
+ {% else %}
1621
+ {{ cache | strip_empty_lines }}
1622
+ {% endif %}
2038
1623
  {% assign cache = nil %}