j1-template 2020.0.9 → 2020.0.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_includes/themes/j1/blocks/ads/ad.html +64 -0
- data/_includes/themes/j1/blocks/footer/boxes/about_box.proc +1 -1
- data/_includes/themes/j1/blocks/footer/boxes/links_box.proc +2 -2
- data/_includes/themes/j1/blocks/footer/boxes/news_box.proc +2 -2
- data/_includes/themes/j1/layouts/content_generator_blog_archive.html +3 -2
- data/_includes/themes/j1/layouts/content_generator_collection.html +3 -2
- data/_includes/themes/j1/layouts/content_generator_page.html +26 -25
- data/_includes/themes/j1/layouts/content_generator_post.html +12 -12
- data/_includes/themes/j1/layouts/layout_metadata_generator.html +134 -4
- data/_includes/themes/j1/modules/connectors/ad/custom-provider.html +6 -9
- data/_includes/themes/j1/modules/connectors/ad/google-adsense.html +9 -6
- data/_includes/themes/j1/modules/connectors/ads +3 -6
- data/_includes/themes/j1/modules/navigator/generator.html +0 -1
- data/_includes/themes/j1/modules/navigator/procedures/topsearch.proc +11 -6
- data/_includes/themes/j1/procedures/global/create_word_cloud.proc +5 -2
- data/_includes/themes/j1/procedures/layouts/content_writer.proc +8 -9
- data/_includes/themes/j1/procedures/layouts/module_writer.1.proc +270 -0
- data/_includes/themes/j1/procedures/layouts/module_writer.proc +3 -13
- data/_includes/themes/j1/procedures/posts/collate_timeline.proc +14 -14
- data/_layouts/default.html +76 -65
- data/apps/public/cc/index.adoc +2 -6
- data/assets/data/authclient.html +22 -12
- data/assets/data/banner.html +23 -23
- data/assets/data/carousel.json +30 -21
- data/assets/data/cookiebar.html +277 -0
- data/assets/data/footer.html +14 -7
- data/assets/data/galleries.json +90 -81
- data/assets/data/gallery_customizer.html +20 -11
- data/assets/data/jupyter/notebooks/_html/template.full.head.html +10 -10
- data/assets/data/jupyter/notebooks/_html/visualisation.html +11 -11
- data/assets/data/jupyter/notebooks/html/template.html +7 -7
- data/assets/data/jupyter/notebooks/html/visualisation.ok.html +12 -12
- data/assets/data/mdi_icons.json +55 -1
- data/assets/data/menu.html +16 -9
- data/assets/data/mmenu.html +48 -95
- data/assets/data/mmenu_sidebar.html +40 -44
- data/assets/data/mmenu_toc.html +20 -4
- data/assets/data/panel.html +41 -33
- data/assets/data/quicklinks.html +29 -19
- data/assets/data/search.json +162 -0
- data/assets/data/ssm.html +20 -9
- data/assets/data/themes.json +17 -6
- data/assets/data/twa_v1.json +54 -0
- data/assets/themes/j1/adapter/js/algolia.js +49 -30
- data/assets/themes/j1/adapter/js/attic.js +76 -64
- data/assets/themes/j1/adapter/js/carousel.js +58 -33
- data/assets/themes/j1/adapter/js/clipboard.js +232 -0
- data/assets/themes/j1/adapter/js/cookiebar.js +204 -0
- data/assets/themes/j1/adapter/js/framer.js +45 -22
- data/assets/themes/j1/adapter/js/gallery_customizer.js +238 -250
- data/assets/themes/j1/adapter/js/j1.js +573 -868
- data/assets/themes/j1/adapter/js/{justified_gallery.js → jf_gallery.js} +82 -55
- data/assets/themes/j1/adapter/js/lightbox.js +29 -11
- data/assets/themes/j1/adapter/js/logger.js +25 -10
- data/assets/themes/j1/adapter/js/mdb.js +164 -0
- data/assets/themes/j1/adapter/js/mmenu.js +74 -75
- data/assets/themes/j1/adapter/js/navigator.js +244 -228
- data/assets/themes/j1/adapter/js/searcher.js +40 -16
- data/assets/themes/j1/adapter/js/ssm.js +135 -134
- data/assets/themes/j1/adapter/js/themer.js +78 -102
- data/assets/themes/j1/adapter/js/toccer.js +38 -22
- data/assets/themes/j1/core/css/animate.css +2382 -0
- data/assets/themes/j1/core/css/animate.min.css +7 -0
- data/assets/themes/j1/core/css/fontawesome.css +4415 -0
- data/assets/themes/j1/core/css/fontawesome.min.css +1 -0
- data/assets/themes/j1/core/css/iconify-icons.css +4106 -0
- data/assets/themes/j1/core/css/iconify-icons.min.css +1 -0
- data/assets/themes/j1/core/css/material-design-icons.css +14532 -0
- data/assets/themes/j1/core/css/material-design-icons.min.css +1 -0
- data/assets/themes/j1/core/css/theme_extensions.css +209 -2917
- data/assets/themes/j1/core/css/theme_extensions.min.css +1 -1
- data/assets/themes/j1/core/css/twemoji.css +9485 -0
- data/assets/themes/j1/core/css/twemoji.min.css +1 -0
- data/assets/themes/j1/core/css/uno.css +345 -2929
- data/assets/themes/j1/core/css/uno.min.css +1 -1
- data/assets/themes/j1/core/css/vendor.css +767 -33214
- data/assets/themes/j1/core/css/vendor.min.css +2 -9
- data/assets/themes/j1/core/js/template.js +25 -416
- data/assets/themes/j1/core/js/template.js.map +1 -1
- data/assets/themes/j1/core/js/template.min.js +1 -1
- data/assets/themes/j1/modules/backstretch/js/backstretch.js +1695 -0
- data/assets/themes/j1/modules/backstretch/js/backstretch.min.js +21 -0
- data/assets/themes/j1/modules/backstretch/js/backstretch.min.js.org +1 -0
- data/assets/themes/j1/modules/bmd/css/bootstrap-material-design.css +12177 -0
- data/assets/themes/j1/modules/bmd/css/bootstrap-material-design.min.css +8 -0
- data/assets/themes/j1/modules/bmd/js/bootstrap-material-design.js +6930 -0
- data/assets/themes/j1/modules/bmd/js/bootstrap-material-design.js.map +1 -0
- data/assets/themes/j1/modules/bmd/js/bootstrap-material-design.min.js +1 -0
- data/assets/themes/j1/modules/bootstrap/css/bootstrap.css +10278 -0
- data/assets/themes/j1/modules/bootstrap/css/bootstrap.css.map +1 -0
- data/assets/themes/j1/modules/bootstrap/css/bootstrap.min.css +7 -0
- data/assets/themes/j1/modules/bootstrap/css/bootstrap.min.css.map +1 -0
- data/assets/themes/j1/modules/bootstrap/js/bootstrap.js +4420 -0
- data/assets/themes/j1/modules/bootstrap/js/bootstrap.js.map +1 -0
- data/assets/themes/j1/modules/bootstrap/js/bootstrap.min.js +7 -0
- data/assets/themes/j1/modules/bootstrap/js/bootstrap.min.js.map +1 -0
- data/assets/themes/j1/modules/bsDatepicker/css/datepicker.css +203 -0
- data/assets/themes/j1/modules/bsDatepicker/css/theme/uno.css +235 -0
- data/assets/themes/j1/modules/bsDatepicker/js/datepicker.js +509 -0
- data/assets/themes/j1/modules/bsDatepicker/less/datepicker.less +122 -0
- data/assets/themes/j1/modules/bsThemeSwitcher/js/switcher.js +434 -0
- data/assets/themes/j1/modules/bsThemeSwitcher/js/switcher.min.js +20 -0
- data/assets/themes/j1/{extensions → modules}/carousel/css/carousel.css +1 -1
- data/assets/themes/j1/{extensions → modules}/carousel/css/carousel.min.css +1 -1
- data/assets/themes/j1/{extensions → modules}/carousel/css/carousel_transitions.css +1 -1
- data/assets/themes/j1/{extensions → modules}/carousel/css/carousel_transitions.min.css +1 -1
- data/assets/themes/j1/{extensions → modules}/carousel/css/theme/uno.css +1 -1
- data/assets/themes/j1/{extensions → modules}/carousel/css/theme/uno.min.css +1 -1
- data/assets/themes/j1/{extensions → modules}/carousel/images/ajax-loader.gif +0 -0
- data/assets/themes/j1/{extensions → modules}/carousel/images/grabbing.png +0 -0
- data/assets/themes/j1/{extensions → modules}/carousel/images/owl-logo.png +0 -0
- data/assets/themes/j1/{extensions → modules}/carousel/images/owl.video.play.png +0 -0
- data/assets/themes/j1/{extensions → modules}/carousel/js/carousel.js +0 -0
- data/assets/themes/j1/{extensions → modules}/carousel/js/carousel.min.js +0 -0
- data/assets/themes/j1/modules/clipboard/LICENSE +20 -0
- data/assets/themes/j1/modules/clipboard/css/theme/uno.css +52 -0
- data/assets/themes/j1/modules/clipboard/css/theme/uno.min.css +52 -0
- data/assets/themes/j1/modules/clipboard/js/clipboard.js +975 -0
- data/assets/themes/j1/modules/clipboard/js/clipboard.min.js +7 -0
- data/assets/themes/j1/{extensions/iconify → modules/iconifyAPI}/js/iconify.min.js +0 -0
- data/assets/themes/j1/modules/iframeResizer/LICENSE +21 -0
- data/assets/themes/j1/modules/iframeResizer/examples/frame.absolute.html +127 -0
- data/assets/themes/j1/modules/iframeResizer/examples/frame.content.html +157 -0
- data/assets/themes/j1/modules/iframeResizer/examples/frame.hover.html +68 -0
- data/assets/themes/j1/modules/iframeResizer/examples/frame.nested.html +100 -0
- data/assets/themes/j1/modules/iframeResizer/examples/frame.textarea.html +45 -0
- data/assets/themes/j1/modules/iframeResizer/examples/frame.tolerance.html +113 -0
- data/assets/themes/j1/modules/iframeResizer/examples/index.html +83 -0
- data/assets/themes/j1/modules/iframeResizer/examples/two.html +88 -0
- data/assets/themes/j1/modules/iframeResizer/js/client/iframeResizer.contentWindow.js +1288 -0
- data/assets/themes/j1/modules/iframeResizer/js/client/iframeResizer.contentWindow.map +1 -0
- data/assets/themes/j1/modules/iframeResizer/js/client/iframeResizer.contentWindow.min.js +10 -0
- data/assets/themes/j1/modules/iframeResizer/js/iframeResizer.js +1390 -0
- data/assets/themes/j1/modules/iframeResizer/js/iframeResizer.map +1 -0
- data/assets/themes/j1/modules/iframeResizer/js/iframeResizer.min.js +9 -0
- data/assets/themes/j1/modules/jekyllSearch/js/simple-jekyll-search.js +624 -0
- data/assets/themes/j1/modules/jekyllSearch/js/simple-jekyll-search.min.js +6 -0
- data/assets/themes/j1/modules/jqMouseWheel/README.md +76 -0
- data/assets/themes/j1/modules/jqMouseWheel/js/jquery.mousewheel.js +221 -0
- data/assets/themes/j1/modules/jqMouseWheel/js/jquery.mousewheel.min.js +9 -0
- data/assets/themes/j1/modules/jquery/js/jquery.js +10869 -0
- data/assets/themes/j1/modules/jquery/js/jquery.min.js +2 -0
- data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/LICENSE +0 -0
- data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/README.md +0 -0
- data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/_versions/v3.7.0/css/justifiedGallery.css +0 -0
- data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/_versions/v3.7.0/css/justifiedGallery.min.css +0 -0
- data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/_versions/v3.7.0/css/theme/uno.css +1 -1
- data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/_versions/v3.7.0/js/justifiedGallery.3.7.0.js +0 -0
- data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/_versions/v3.7.0/js/justifiedGallery.js +0 -0
- data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/_versions/v3.7.0/js/justifiedGallery.min.js +0 -0
- data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/_versions/v3.7.0/less/.csslintrc +0 -0
- data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/_versions/v3.7.0/less/justifiedGallery.less +0 -0
- data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/_versions/v4.0.0/css/justifiedGallery.css +0 -0
- data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/_versions/v4.0.0/css/justifiedGallery.min.css +0 -0
- data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/_versions/v4.0.0/css/theme/uno.css +1 -1
- data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/_versions/v4.0.0/js/jquery.justifiedGallery.js +0 -0
- data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/_versions/v4.0.0/js/jquery.justifiedGallery.min.js +0 -0
- data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/css/justifiedGallery.css +0 -0
- data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/css/justifiedGallery.min.css +0 -0
- data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/css/theme/uno.css +1 -1
- data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/css/theme/uno.min.css +1 -1
- data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/js/justifiedGallery.js +0 -0
- data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/js/justifiedGallery.min.js +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/core/lg-fb-comment-box.css +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/core/lg-fb-comment-box.min.css +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/core/lg-transitions.css +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/core/lg-transitions.min.css +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/core/lightgallery.css +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/core/lightgallery.min.css +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/fonts/lg.eot +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/fonts/lg.svg +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/fonts/lg.ttf +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/fonts/lg.woff +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/img/loading.gif +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/img/video-play.png +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/img/vimeo-play.png +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/img/youtube-play.png +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/themes/icons/animation-w.png +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/themes/icons/customize-w.png +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/themes/icons/dynamic-w.png +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/themes/icons/facebook-icon.svg +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/themes/icons/googleplus-icon.svg +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/themes/icons/html5-w.png +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/themes/icons/linked-in.png +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/themes/icons/module-w.png +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/themes/icons/play-button.png +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/themes/icons/responsive-w.png +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/themes/icons/thumb-w.png +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/themes/icons/touch-w.png +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/themes/icons/twitter-icon.svg +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/themes/icons/twitter.png +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/themes/icons/video1-w.png +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/themes/icons/zoom-w.png +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/themes/icons/zoom.png +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/themes/uno.css +1 -1
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/themes/uno.min.css +1 -1
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/js/core/lightgallery.js +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/js/core/lightgallery.min.js +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/js/modules/j1/j1-video.js +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/js/modules/j1/j1-video.min.js +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/js/modules/lg-autoplay.js +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/js/modules/lg-autoplay.min.js +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/js/modules/lg-fullscreen.js +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/js/modules/lg-fullscreen.min.js +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/js/modules/lg-hash.js +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/js/modules/lg-hash.min.js +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/js/modules/lg-pager.js +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/js/modules/lg-pager.min.js +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/js/modules/lg-share.js +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/js/modules/lg-share.min.js +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/js/modules/lg-thumbnail.js +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/js/modules/lg-thumbnail.min.js +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/js/modules/lg-video.js +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/js/modules/lg-video.min.js +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/js/modules/lg-zoom.js +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/js/modules/lg-zoom.min.js +0 -0
- data/assets/themes/j1/modules/lightbox/LICENSE +22 -0
- data/assets/themes/j1/modules/lightbox/css/lightbox.css +224 -0
- data/assets/themes/j1/modules/lightbox/css/lightbox.min.css +21 -0
- data/assets/themes/j1/modules/lightbox/css/theme/uno.css +25 -0
- data/assets/themes/j1/modules/lightbox/css/theme/uno.min.css +26 -0
- data/{lib/starter_web/assets/images/modules/lightbox → assets/themes/j1/modules/lightbox/images}/close.png +0 -0
- data/{lib/starter_web/assets/images/modules/lightbox → assets/themes/j1/modules/lightbox/images}/loading.gif +0 -0
- data/{lib/starter_web/assets/images/modules/lightbox → assets/themes/j1/modules/lightbox/images}/next.png +0 -0
- data/{lib/starter_web/assets/images/modules/lightbox → assets/themes/j1/modules/lightbox/images}/prev.png +0 -0
- data/assets/themes/j1/modules/lightbox/js/lightbox.js +583 -0
- data/assets/themes/j1/modules/lightbox/js/lightbox.min.js +35 -0
- data/assets/themes/j1/modules/mmenuLight/css/mmenu.css +392 -0
- data/assets/themes/j1/modules/mmenuLight/css/mmenu.min.css +393 -0
- data/assets/themes/j1/modules/mmenuLight/css/theme/uno.css +178 -0
- data/assets/themes/j1/modules/mmenuLight/css/theme/uno.min.css +170 -0
- data/assets/themes/j1/modules/mmenuLight/js/mmenu.js +563 -0
- data/assets/themes/j1/modules/mmenuLight/js/mmenu.min.js +30 -0
- data/assets/themes/j1/modules/noUISlider/LICENSE +13 -0
- data/assets/themes/j1/modules/noUISlider/css/nouislider.css +260 -0
- data/assets/themes/j1/modules/noUISlider/css/nouislider.min.css +1 -0
- data/assets/themes/j1/modules/noUISlider/js/nouislider.js +2312 -0
- data/assets/themes/j1/modules/noUISlider/js/nouislider.min.js +3 -0
- data/assets/themes/j1/modules/polyfills/js/msie.js +140 -0
- data/assets/themes/j1/modules/popper/js/popper.js +2623 -0
- data/assets/themes/j1/modules/popper/js/popper.js.map +1 -0
- data/assets/themes/j1/modules/popper/js/popper.min.js +4 -0
- data/assets/themes/j1/modules/popper/js/popper.min.js.map +1 -0
- data/assets/themes/j1/{extensions → modules}/rouge/css/base16.dark/theme.css +0 -0
- data/assets/themes/j1/{extensions → modules}/rouge/css/base16.light/theme.css +0 -0
- data/assets/themes/j1/{extensions → modules}/rouge/css/base16.monokai.dark/theme.css +0 -0
- data/assets/themes/j1/{extensions → modules}/rouge/css/base16.monokai.light/theme.css +0 -0
- data/assets/themes/j1/{extensions → modules}/rouge/css/base16.monokai/theme.css +0 -0
- data/assets/themes/j1/{extensions → modules}/rouge/css/base16.solarized.dark/theme.css +0 -0
- data/assets/themes/j1/{extensions → modules}/rouge/css/base16.solarized.light/theme.css +0 -0
- data/assets/themes/j1/{extensions → modules}/rouge/css/base16.solarized/theme.css +0 -0
- data/assets/themes/j1/{extensions → modules}/rouge/css/base16/theme.css +0 -0
- data/assets/themes/j1/{extensions → modules}/rouge/css/colorful/theme.css +0 -0
- data/assets/themes/j1/{extensions → modules}/rouge/css/github/theme.css +0 -0
- data/assets/themes/j1/{extensions → modules}/rouge/css/gruvbox.dark/theme.css +0 -0
- data/assets/themes/j1/{extensions → modules}/rouge/css/gruvbox.light/theme.css +0 -0
- data/assets/themes/j1/{extensions → modules}/rouge/css/gruvbox/theme.css +0 -0
- data/assets/themes/j1/{extensions → modules}/rouge/css/igorpro/theme.css +0 -0
- data/assets/themes/j1/{extensions → modules}/rouge/css/molokai/theme.css +0 -0
- data/assets/themes/j1/{extensions → modules}/rouge/css/monokai.sublime/theme.css +0 -0
- data/assets/themes/j1/{extensions → modules}/rouge/css/monokai/theme.css +0 -0
- data/assets/themes/j1/{extensions → modules}/rouge/css/pastie/theme.css +0 -0
- data/assets/themes/j1/{extensions → modules}/rouge/css/thankful_eyes/theme.css +0 -0
- data/assets/themes/j1/{extensions → modules}/rouge/css/tulip/theme.css +0 -0
- data/assets/themes/j1/modules/tocbot/css/theme/uno.css +89 -0
- data/assets/themes/j1/modules/tocbot/css/theme/uno.min.css +89 -0
- data/assets/themes/j1/modules/tocbot/css/tocbot.css +75 -0
- data/assets/themes/j1/modules/tocbot/css/tocbot.min.css +19 -0
- data/assets/themes/j1/modules/tocbot/js/tocbot.js +19 -0
- data/assets/themes/j1/modules/tocbot/js/tocbot.min.js +19 -0
- data/assets/themes/j1/modules/twemoji/js/LICENSE +21 -0
- data/assets/themes/j1/modules/twemoji/js/picker/LICENSE +21 -0
- data/assets/themes/j1/modules/twemoji/js/picker/twemoji-picker.js +275 -0
- data/assets/themes/j1/modules/twemoji/js/picker/twemoji-picker.min.js +275 -0
- data/assets/themes/j1/modules/twemoji/js/twemoji.js +589 -0
- data/assets/themes/j1/modules/twemoji/js/twemoji.min.js +25 -0
- data/assets/themes/j1/modules/util/js/js.cookie.js +163 -0
- data/assets/themes/j1/modules/util/js/lite-url.js +203 -0
- data/assets/themes/j1/modules/util/js/lite-url.min.js +7 -0
- data/assets/themes/j1/{extensions/log4javascript/log4javascript.min.js → modules/util/js/log4javascript.js} +0 -2
- data/assets/themes/j1/modules/util/js/platform.js +1260 -0
- data/assets/themes/j1/{extensions → modules}/videojs/css/themes/city.css +0 -0
- data/assets/themes/j1/{extensions → modules}/videojs/css/themes/city.min.css +0 -0
- data/assets/themes/j1/{extensions → modules}/videojs/css/themes/fantasy.css +0 -0
- data/assets/themes/j1/{extensions → modules}/videojs/css/themes/fantasy.min.css +0 -0
- data/assets/themes/j1/{extensions → modules}/videojs/css/themes/forest.css +0 -0
- data/assets/themes/j1/{extensions → modules}/videojs/css/themes/forest.min.css +0 -0
- data/assets/themes/j1/{extensions → modules}/videojs/css/themes/sea.css +0 -0
- data/assets/themes/j1/{extensions → modules}/videojs/css/themes/sea.min.css +0 -0
- data/assets/themes/j1/{extensions → modules}/videojs/css/video-js.css +0 -0
- data/assets/themes/j1/{extensions → modules}/videojs/css/video-js.min.css +0 -0
- data/assets/themes/j1/{extensions → modules}/videojs/js/video.js +0 -0
- data/assets/themes/j1/{extensions → modules}/videojs/js/video.min.js +0 -0
- data/assets/themes/j1/{extensions → modules}/vimeo/froogaloop/js/froogaloop2.min.js +0 -0
- data/assets/themes/j1/{extensions → modules}/vimeo/player/js/player.js +0 -0
- data/assets/themes/j1/{extensions → modules}/vimeo/player/js/player.js.map +0 -0
- data/assets/themes/j1/{extensions → modules}/vimeo/player/js/player.min.js +0 -0
- data/assets/themes/j1/{extensions → modules}/vimeo/player/js/player.min.js.map +0 -0
- data/lib/j1/version.rb +1 -1
- data/lib/starter_web/Gemfile +16 -10
- data/lib/starter_web/_config.yml +11 -10
- data/lib/starter_web/_data/_defaults/resources.yml +13 -13
- data/lib/starter_web/_data/blocks/banner.yml +23 -31
- data/lib/starter_web/_data/blocks/footer.yml +10 -3
- data/lib/starter_web/_data/blocks/panel.yml +21 -21
- data/lib/starter_web/_data/layouts/default.yml +10 -0
- data/lib/starter_web/_data/layouts/home.yml +7 -7
- data/lib/starter_web/_data/layouts/page.yml +15 -16
- data/lib/starter_web/_data/modules/advertising.yml +48 -0
- data/lib/starter_web/_data/modules/attics.yml +3 -39
- data/lib/starter_web/_data/modules/cookiebar.yml +2 -2
- data/lib/starter_web/_data/modules/defaults/attics.yml +17 -16
- data/lib/starter_web/_data/modules/defaults/cookie_consent.yml +75 -12
- data/lib/starter_web/_data/modules/defaults/cookiebar.yml +101 -50
- data/lib/starter_web/_data/modules/defaults/jekyll_search.yml +9 -9
- data/lib/starter_web/_data/modules/defaults/navigator.yml +56 -21
- data/lib/starter_web/_data/modules/jekyll_search.yml +3 -21
- data/lib/starter_web/_data/modules/navigator.yml +1 -1
- data/lib/starter_web/_data/modules/navigator_menu.yml +3 -0
- data/lib/starter_web/_data/modules/themer.yml +10 -11
- data/lib/starter_web/_data/resources.yml +379 -174
- data/lib/starter_web/_data/template_settings.yml +118 -6
- data/lib/starter_web/_plugins/asciidoctor-extensions/banner.rb +43 -0
- data/lib/starter_web/_plugins/asciidoctor-extensions/fab-icon-inline.rb +1 -1
- data/lib/starter_web/_plugins/asciidoctor-extensions/fas-icon-inline.rb +2 -2
- data/lib/starter_web/_plugins/asciidoctor-extensions/iconify-icon-inline.rb +2 -2
- data/lib/starter_web/_plugins/asciidoctor-extensions/mdi-icon-inline.rb +2 -2
- data/lib/starter_web/_plugins/asciidoctor-extensions/panel.rb +43 -0
- data/lib/starter_web/_plugins/asciidoctor-extensions/twitter-emoji-inline.rb +2 -2
- data/lib/starter_web/_plugins/{asciidoctor-extensions/lorem-inline.rb → lorem-inline.rb} +0 -0
- data/lib/starter_web/_plugins/minifyJS.rb +54 -0
- data/lib/starter_web/_plugins/{uglify.rb → minifyJSON.rb} +15 -9
- data/lib/starter_web/assets/images/modules/attics/aditya-joshi-1920x1280.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/admin-dashboard-bootstrap-1280x600.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/alex-holyoake-1920x1280.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/anaya-katlego-1920x1280.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/antonella-lombardi-1920x1280.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/antonino-visalli-1920x1280.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/banner/admin-dashboard-bootstrap-1280x800-bw.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/banner/docker-1280x600-bw.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/banner/jekyll.1200x600-bw.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/banner/library-1920x800-bw.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/banner/signpost-1920x800-bw.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/banner/water-journal-1280x600.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/banner/write-1280x600-bw.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/brandon-mowinkel-1920x1280.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/building-blocks-1920x1280-bw.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/cookies-1920x1200-bw.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/daniel-jensen-1920x1280.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/giammarco-boscaro-1920x1280.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/go-up-1920x1280-bw.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/ian-schneider-1920x1280.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/ideas-start-here-1920x1280-bw.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/jason-rosewell-1920x1280.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/jessica-ruscello-1920x1280.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/lianhao-1920x1280.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/library-1920x1280-bw.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/matthaeus-1920x1280.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/nousnou-iwasaki-1920x1280.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/premium-1920x1280-bw.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/robert-v-ruggiero-1920x1280.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/romain-vignes-1920x1280.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/runner-1920x1200-bw.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/spider-web-1920x1200-bw.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/the-place-1920x1280-bw.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/welcome-1920x1280-bw.webp +0 -0
- data/lib/starter_web/assets/images/modules/carousel/cats/cat-1.jpg +0 -0
- data/lib/starter_web/assets/images/modules/carousel/mega_cities/andreas-brucker_b.jpg +0 -0
- data/lib/starter_web/assets/images/modules/carousel/mega_cities/denys-nevozhai-1_b.jpg +0 -0
- data/lib/starter_web/assets/images/modules/carousel/mega_cities/denys-nevozhai-2_b.jpg +0 -0
- data/lib/starter_web/assets/images/modules/carousel/mega_cities/luca-bravo_b.jpg +0 -0
- data/lib/starter_web/assets/images/modules/carousel/mega_cities/thomas-tucker_b.jpg +0 -0
- data/lib/starter_web/assets/images/modules/gallery/mega_cities/banter-snaps_b.jpg +0 -0
- data/lib/starter_web/assets/images/modules/gallery/mega_cities/denys-nevozhai-1_b.jpg +0 -0
- data/lib/starter_web/assets/images/modules/gallery/mega_cities/denys-nevozhai-2-bw.jpg +0 -0
- data/lib/starter_web/assets/images/modules/gallery/mega_cities/denys-nevozhai-2_b.jpg +0 -0
- data/lib/starter_web/assets/images/modules/gallery/mega_cities/emmad-mazhari_b.jpg +0 -0
- data/lib/starter_web/assets/images/modules/gallery/mega_cities/ethan-brooke_b.jpg +0 -0
- data/lib/starter_web/assets/images/modules/gallery/mega_cities/federico-rizzarelli_b.jpg +0 -0
- data/lib/starter_web/assets/images/modules/gallery/mega_cities/gints-gailis_b.jpg +0 -0
- data/lib/starter_web/assets/images/modules/gallery/mega_cities/johan-mouchet_b.jpg +0 -0
- data/lib/starter_web/assets/images/modules/gallery/mega_cities/luca-bravo_b.jpg +0 -0
- data/lib/starter_web/assets/images/modules/gallery/mega_cities/oskars-sylwan_b.jpg +0 -0
- data/lib/starter_web/assets/images/modules/gallery/mega_cities/steven-diaz_b.jpg +0 -0
- data/lib/starter_web/assets/images/modules/gallery/mega_cities/thomas-tucker-bw.jpg +0 -0
- data/lib/starter_web/assets/images/modules/gallery/mega_cities/thomas-tucker_b.jpg +0 -0
- data/lib/starter_web/assets/images/pages/roundtrip/bootstrap-1920x1000-bw.webp +0 -0
- data/lib/starter_web/assets/images/pages/roundtrip/cards-1920x1280-bw.webp +0 -0
- data/lib/starter_web/assets/images/pages/roundtrip/emojies-1920x1280-bw.webp +0 -0
- data/lib/starter_web/assets/images/pages/roundtrip/icon-fonts-1920x1280-bw.webp +0 -0
- data/lib/starter_web/assets/images/pages/roundtrip/images-1920x1280-bw.webp +0 -0
- data/lib/starter_web/assets/images/pages/roundtrip/puzzle-1920x1280-bw.webp +0 -0
- data/lib/starter_web/assets/images/pages/roundtrip/tables-1920x1280-bw.webp +0 -0
- data/lib/starter_web/assets/images/pages/roundtrip/themes-1920x1280-bw.webp +0 -0
- data/lib/starter_web/assets/images/pages/roundtrip/typography-1920x1280-bw.webp +0 -0
- data/lib/starter_web/assets/videos/headers/still/underground-broadway.webp +0 -0
- data/lib/starter_web/assets/videos/headers/still/victoria-oskolovich-on-vimeo.webp +0 -0
- data/lib/starter_web/collections/posts/public/featured/_posts/0000-00-00-welcome-to-j1-template.adoc.erb +5 -6
- data/lib/starter_web/collections/posts/public/featured/_posts/2018-05-01-confusion-about-base-url.adoc +2 -2
- data/lib/starter_web/collections/posts/public/featured/_posts/2019-05-01-top-open-source-static-site-generators.adoc +19 -19
- data/lib/starter_web/collections/posts/public/featured/_posts/2019-06-01-about-cookies.adoc +38 -42
- data/lib/starter_web/collections/posts/public/series/_posts/2018-11-01-docker-using-shared-folders.adoc +4 -7
- data/lib/starter_web/collections/posts/public/wikipedia/_posts/2016-11-20-minneapolis.adoc +1 -3
- data/lib/starter_web/collections/posts/public/wikipedia/_posts/2016-11-24-narcisse-snake-dens.adoc +3 -3
- data/lib/starter_web/collections/posts/public/wikipedia/_posts/2016-11-26-columbia-river.adoc +4 -4
- data/lib/starter_web/index.html +11 -10
- data/lib/starter_web/package.json +1 -1
- data/lib/starter_web/pages/public/about/about_site.adoc +1 -1
- data/lib/starter_web/pages/public/about/become_a_patron.adoc +1 -1
- data/lib/starter_web/pages/public/blog/navigator/archive.html +24 -18
- data/lib/starter_web/pages/public/blog/navigator/archive/categoryview.html +39 -34
- data/lib/starter_web/pages/public/blog/navigator/archive/dateview.html +43 -30
- data/lib/starter_web/pages/public/blog/navigator/archive/tagview.html +29 -29
- data/lib/starter_web/pages/public/blog/navigator/index.html +3 -3
- data/lib/starter_web/pages/public/learn/examples/floating_ad.adoc +221 -0
- data/lib/starter_web/pages/public/learn/{floating_sidebar.adoc → examples/floating_div.adoc} +60 -50
- data/lib/starter_web/pages/public/learn/kickstarter/web_in_a_day/000_includes/parts.asciidoc +1 -1
- data/lib/starter_web/pages/public/learn/kickstarter/web_in_a_day/100_meet_and_greet_jekyll.adoc +9 -4
- data/lib/starter_web/pages/public/learn/roundtrip/000_bs_tour.1.asciidoc +1 -2
- data/lib/starter_web/pages/public/learn/roundtrip/000_bs_tour.adoc +1 -2
- data/lib/starter_web/pages/public/learn/roundtrip/000_bs_tour_api.adoc +18 -20
- data/lib/starter_web/pages/public/learn/roundtrip/000_includes/attributes.asciidoc +1 -1
- data/lib/starter_web/pages/public/learn/roundtrip/000_includes/documents/410_table_3_column.asciidoc +1 -1
- data/lib/starter_web/pages/public/learn/roundtrip/000_includes/documents/419_advanced_modals_html.asciidoc +5 -5
- data/lib/starter_web/pages/public/learn/roundtrip/100_present_images.adoc +3 -3
- data/lib/starter_web/pages/public/learn/roundtrip/100_present_videos.adoc +2 -2
- data/lib/starter_web/pages/public/learn/roundtrip/200_typography.adoc +8 -4
- data/lib/starter_web/pages/public/learn/roundtrip/300_icon_fonts.adoc +37 -46
- data/lib/starter_web/pages/public/learn/roundtrip/400_asciidoc_extensions.adoc +3 -3
- data/lib/starter_web/pages/public/learn/roundtrip/410_bs_modals_extentions.adoc +10 -11
- data/lib/starter_web/pages/public/learn/roundtrip/420_responsive_tables_extensions.adoc +40 -40
- data/lib/starter_web/pages/public/learn/roundtrip/500_themes.adoc +20 -22
- data/lib/starter_web/pages/public/learn/roundtrip/510_mdb_preview/000_includes/attributes.asciidoc +69 -0
- data/lib/starter_web/pages/public/learn/roundtrip/510_mdb_preview/000_includes/documents/100_buttons.asciidoc +170 -0
- data/lib/starter_web/pages/public/learn/roundtrip/510_mdb_preview/mdb_previewer.adoc +52 -0
- data/lib/starter_web/pages/public/learn/vtutorials/000_includes/attributes.asciidoc +3 -3
- data/lib/starter_web/pages/public/learn/vtutorials/000_includes/documents/410_table_3_column.asciidoc +1 -1
- data/lib/starter_web/pages/public/learn/vtutorials/000_includes/documents/419_advanced_modals_html.asciidoc +5 -5
- data/lib/starter_web/pages/public/learn/whats_up.adoc +3 -3
- data/lib/starter_web/pages/public/legal/en/000_copyright.adoc +1 -1
- data/lib/starter_web/pages/public/legal/en/100_impress.adoc +1 -1
- data/lib/starter_web/pages/public/legal/en/300_privacy.adoc +1 -1
- data/lib/starter_web/pages/public/panels/intro_panel/panel.adoc +55 -49
- data/lib/starter_web/pages/public/previewer/000_includes/tables/mdi_icons/100_absolute_sizes.asciidoc +1 -1
- data/lib/starter_web/pages/public/previewer/000_includes/tables/mdi_icons/110_bs_grid_sizes.asciidoc +1 -1
- data/lib/starter_web/pages/public/previewer/000_includes/tables/mdi_icons/120_relative_sizes.asciidoc +1 -41
- data/lib/starter_web/pages/public/previewer/000_includes/tables/mdi_icons/200_rotate.asciidoc +1 -1
- data/lib/starter_web/pages/public/previewer/000_includes/tables/mdi_icons/300_flip.asciidoc +1 -1
- data/lib/starter_web/pages/public/previewer/000_includes/tables/mdi_icons/400_spin_pulsed.asciidoc +1 -1
- data/lib/starter_web/pages/public/previewer/000_includes/tables/mdi_icons/500_bw_color_palette.asciidoc +1 -1
- data/lib/starter_web/pages/public/previewer/000_includes/tables/mdi_icons/510_bs_color_palette.asciidoc +1 -1
- data/lib/starter_web/pages/public/previewer/000_includes/tables/mdi_icons/600_md_color_palette.asciidoc +1 -1
- data/lib/starter_web/pages/public/previewer/000_includes/tables/mdi_icons/601_md_color_palette_indigo.asciidoc +1 -1
- data/lib/starter_web/pages/public/previewer/000_includes/tables/mdi_icons/602_md_color_palette_pink.asciidoc +1 -1
- data/lib/starter_web/pages/public/previewer/000_includes/tables/twitter_emoji/100_bs_sizes.asciidoc +1 -1
- data/lib/starter_web/pages/public/previewer/000_includes/tables/twitter_emoji/100_relative_sizes.asciidoc +1 -1
- data/lib/starter_web/pages/public/previewer/000_includes/tables/twitter_emoji/200_rotate.asciidoc +1 -1
- data/lib/starter_web/pages/public/previewer/000_includes/tables/twitter_emoji/300_flip.asciidoc +1 -1
- data/lib/starter_web/pages/public/previewer/000_includes/tables/twitter_emoji/400_spin_pulsed.asciidoc +1 -1
- data/lib/starter_web/pages/public/previewer/bootstrap_theme.adoc +674 -865
- data/lib/starter_web/pages/public/previewer/iframer.adoc +18 -16
- data/lib/starter_web/pages/public/previewer/justified_gallery.html +1 -1
- data/lib/starter_web/pages/public/previewer/mdi_icons_preview.adoc +1 -1
- data/lib/starter_web/pages/public/previewer/twitter_emoji_preview.adoc +3 -3
- data/lib/starter_web/pages/public/site_search.adoc +1 -1
- data/lib/starter_web/utilsrv/_defaults/package.json +1 -1
- data/lib/starter_web/utilsrv/package.json +1 -1
- metadata +294 -208
- data/assets/data/colors.json +0 -42
- data/assets/data/cookie_consent.html +0 -223
- data/assets/data/font_sizes.json +0 -42
- data/assets/data/messages.yml +0 -131
- data/assets/data/search.yml +0 -131
- data/assets/themes/j1/adapter/js/cookie_consent.js +0 -269
- data/assets/themes/j1/core/css/custom.scss +0 -28
- data/assets/themes/j1/core/css/globals.css +0 -14523
- data/assets/themes/j1/core/css/globals.min.css +0 -1
- data/assets/themes/j1/core/css/uno.scss +0 -28
- data/assets/themes/j1/core/css/vendor.scss +0 -28
- data/assets/themes/j1/extensions/iframe_resizer/examples/frame.absolute.html +0 -86
- data/assets/themes/j1/extensions/iframe_resizer/examples/frame.content.html +0 -58
- data/assets/themes/j1/extensions/iframe_resizer/examples/frame.hover.html +0 -51
- data/assets/themes/j1/extensions/iframe_resizer/examples/frame.nested.html +0 -68
- data/assets/themes/j1/extensions/iframe_resizer/examples/frame.textarea.html +0 -46
- data/assets/themes/j1/extensions/iframe_resizer/examples/frame.tolerance.html +0 -79
- data/assets/themes/j1/extensions/iframe_resizer/examples/index.html +0 -70
- data/assets/themes/j1/extensions/iframe_resizer/examples/two.html +0 -71
- data/assets/themes/j1/extensions/iframe_resizer/js/client/iframeResizer.contentWindow.js +0 -1104
- data/assets/themes/j1/extensions/iframe_resizer/js/client/iframeResizer.contentWindow.map +0 -1
- data/assets/themes/j1/extensions/iframe_resizer/js/client/iframeResizer.contentWindow.min.js +0 -10
- data/assets/themes/j1/extensions/log4javascript/log4javascript.js +0 -5826
- data/lib/starter_web/_data/modules/cookie_consent.yml +0 -128
- data/lib/starter_web/assets/images/modules/attics/aditya-joshi-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/admin-dashboard-bootstrap-1280x600.png +0 -0
- data/lib/starter_web/assets/images/modules/attics/alex-holyoake-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/anaya-katlego-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/antonella-lombardi-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/antonino-visalli-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/banner/admin-dashboard-bootstrap-1280x800-bw.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/banner/docker-1280x600-bw.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/banner/jekyll.1200x600-bw.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/banner/library-1920x800-bw.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/banner/signpost-1920x800-bw.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/banner/water-journal-1280x600.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/banner/write-1280x600-bw.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/brandon-mowinkel-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/building-blocks-1920x1280-bw.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/cookies-1920x1200-bw.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/daniel-jensen-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/giammarco-boscaro-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/go-up-1920x1280-bw.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/ian-schneider-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/ideas-start-here-1920x1280-bw.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/jason-rosewell-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/jessica-ruscello-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/lianhao-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/library-1920x1280-bw.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/mae-mu-Vf9gbsLZyf0-unsplash.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/mae-mue-1920x1280-v.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/mae-mue-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/matthaeus-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/nousnou-iwasaki-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/premium-1920x1280-bw.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/robert-v-ruggiero-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/romain-vignes-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/runner-1920x1200-bw.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/spider-web-1920x1200-bw.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/the-place-1920x1280-bw.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/welcome-1920x1280-bw.jpg +0 -0
- data/lib/starter_web/assets/images/pages/roundtrip/bootstrap-1920x1000-bw.jpg +0 -0
- data/lib/starter_web/assets/images/pages/roundtrip/cards-1920x1280-bw.jpg +0 -0
- data/lib/starter_web/assets/images/pages/roundtrip/emojies-1920x1280-bw.jpg +0 -0
- data/lib/starter_web/assets/images/pages/roundtrip/icon-fonts-1920x1280-bw.jpg +0 -0
- data/lib/starter_web/assets/images/pages/roundtrip/images-1920x1280-bw.jpg +0 -0
- data/lib/starter_web/assets/images/pages/roundtrip/puzzle-1920x1280-bw.jpg +0 -0
- data/lib/starter_web/assets/images/pages/roundtrip/tables-1920x1280-bw.jpg +0 -0
- data/lib/starter_web/assets/images/pages/roundtrip/themes-1920x1280-bw.jpg +0 -0
- data/lib/starter_web/assets/images/pages/roundtrip/typography-1920x1280-bw.jpg +0 -0
- data/lib/starter_web/assets/videos/headers/still/underground-broadway.png +0 -0
- data/lib/starter_web/assets/videos/headers/still/victoria-oskolovich-on-vimeo.png +0 -0
@@ -1,5 +1,5 @@
|
|
1
1
|
---
|
2
|
-
regenerate:
|
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
|
-
//
|
230
|
+
// init()
|
231
|
+
// initializer
|
220
232
|
// -------------------------------------------------------------------------
|
221
233
|
init: function (options) {
|
222
234
|
|
@@ -224,11 +236,16 @@ var j1 = (function () {
|
|
224
236
|
// global var (function)
|
225
237
|
// -----------------------------------------------------------------------
|
226
238
|
var logger = log4javascript.getLogger('j1.init');
|
227
|
-
var url = new
|
239
|
+
var url = new liteURL(window.location.href);
|
228
240
|
var baseUrl = url.origin;
|
229
|
-
|
230
|
-
|
241
|
+
// var epoch = Math.floor(Date.now()/1000);
|
242
|
+
// var timestamp_now = moment.unix(epoch).format('YYYY-MM-DD HH:mm:ss');
|
243
|
+
var date = new Date();
|
244
|
+
var timestamp_now = date.toISOString();
|
231
245
|
var curr_state = 'started';
|
246
|
+
// var date = new Date();
|
247
|
+
// var my_timestamp = date.toISOString();
|
248
|
+
|
232
249
|
|
233
250
|
// -----------------------------------------------------------------------
|
234
251
|
// options loader
|
@@ -241,46 +258,27 @@ var j1 = (function () {
|
|
241
258
|
options
|
242
259
|
);
|
243
260
|
|
244
|
-
//
|
245
|
-
//
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
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
|
-
});
|
261
|
+
// -----------------------------------------------------------------------
|
262
|
+
// status settings
|
263
|
+
// save status into the adapter object for (later) global access
|
264
|
+
// -----------------------------------------------------------------------
|
265
|
+
j1['xhrDataState'] = {};
|
266
|
+
j1['xhrDOMState'] = {};
|
272
267
|
|
273
268
|
// -----------------------------------------------------------------------
|
274
|
-
//
|
275
|
-
//
|
276
|
-
//
|
269
|
+
// session ON_CLOSE event
|
270
|
+
// wrapup if ALL browser windows get closed. Update user STATE
|
271
|
+
// cookie on window CLOSE.
|
272
|
+
// see: https://stackoverflow.com/questions/3888902/detect-browser-or-tab-closing
|
277
273
|
// -----------------------------------------------------------------------
|
278
274
|
window.addEventListener('beforeunload', function (event) {
|
279
275
|
var cookie_names = j1.getCookieNames();
|
280
276
|
var cookie_user_state_name = cookie_names.user_state;
|
281
277
|
var cookie_user_session_name = cookie_names.user_session;
|
282
|
-
|
283
|
-
|
278
|
+
// var epoch = Math.floor(Date.now()/1000);
|
279
|
+
// var timestamp_now = moment.unix(epoch).format('YYYY-MM-DD HH:mm:ss');
|
280
|
+
var date = new Date();
|
281
|
+
var timestamp_now = date.toISOString();
|
284
282
|
var user_state = j1.readCookie(cookie_user_state_name);
|
285
283
|
var ep_status;
|
286
284
|
var url;
|
@@ -289,23 +287,15 @@ var j1 = (function () {
|
|
289
287
|
user_state.session_active = false;
|
290
288
|
user_state.last_session_ts = timestamp_now;
|
291
289
|
|
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
290
|
j1.writeCookie({
|
299
291
|
name: cookie_user_state_name,
|
300
292
|
data: user_state,
|
301
293
|
expires: 365
|
302
294
|
});
|
303
|
-
|
304
|
-
|
305
295
|
});
|
306
296
|
|
307
297
|
// -----------------------------------------------------------------------
|
308
|
-
//
|
298
|
+
// initialize|load (existing) user cookies
|
309
299
|
// -----------------------------------------------------------------------
|
310
300
|
user_session.created = timestamp_now;
|
311
301
|
user_session.timestamp = timestamp_now;
|
@@ -332,17 +322,20 @@ var j1 = (function () {
|
|
332
322
|
expires: 365
|
333
323
|
});
|
334
324
|
|
335
|
-
//
|
325
|
+
// detect middleware (mode 'app') and update user session cookie
|
336
326
|
// -----------------------------------------------------------------------
|
337
327
|
// if (user_session.mode === 'na' || user_session.mode === 'app') {
|
338
328
|
if (user_session.mode === 'na') {
|
339
|
-
var url = new
|
329
|
+
var url = new liteURL(window.location.href);
|
340
330
|
var ep_status = baseUrl + '/status' + '?page=' + window.location.pathname;
|
341
331
|
var detectTimeout = 50;
|
342
332
|
|
343
333
|
baseUrl = url.origin;
|
344
334
|
|
345
|
-
|
335
|
+
// see: https://stackoverflow.com/questions/3709597/wait-until-all-jquery-ajax-requests-are-done
|
336
|
+
$.when (
|
337
|
+
$.ajax(ep_status)
|
338
|
+
)
|
346
339
|
.then(function(data) {
|
347
340
|
var logger = log4javascript.getLogger('j1.init');
|
348
341
|
user_session = j1.readCookie(cookie_names.user_session);
|
@@ -380,166 +373,102 @@ var j1 = (function () {
|
|
380
373
|
logger.info('state: ' + j1.getState());
|
381
374
|
}, detectTimeout);
|
382
375
|
});
|
383
|
-
} else {
|
376
|
+
} else { // app mode
|
384
377
|
state = 'started';
|
385
378
|
logger.info('state: ' + state);
|
386
379
|
logger.info('page is being initialized');
|
387
380
|
}
|
388
381
|
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
-------------------------------------------------------------------------- {% endcomment %}
|
382
|
+
// jadams: for testing only
|
383
|
+
// display page
|
384
|
+
// $('#no_flicker').css('display', 'block');
|
393
385
|
|
394
|
-
|
395
|
-
|
396
|
-
|
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
|
-
}
|
386
|
+
state = 'started';
|
387
|
+
logger.info('state: ' + state);
|
388
|
+
logger.info('page is being initialized');
|
426
389
|
|
427
|
-
|
428
|
-
|
390
|
+
if ( settings.scrollbar === 'false' ) {
|
391
|
+
$('body').addClass('hide-scrollbar');
|
392
|
+
$('html').addClass('hide-scrollbar-moz');
|
393
|
+
}
|
429
394
|
|
430
|
-
|
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
|
-
}
|
395
|
+
logger.info('read user state from cookie');
|
396
|
+
user_session = j1.readCookie(cookie_names.user_session);
|
459
397
|
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
});
|
398
|
+
// process|update user state cookie
|
399
|
+
themeName = user_session.theme_name;
|
400
|
+
themeCss = user_session.theme_css;
|
401
|
+
themeExtensionCss = user_session.theme_extension_css;
|
465
402
|
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
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
|
-
});
|
403
|
+
// save last page access
|
404
|
+
// see: https://stackoverflow.com/questions/3528324/how-to-get-the-previous-url-in-javascript
|
405
|
+
// see: https://developer.mozilla.org/de/docs/Web/API/Window/history
|
406
|
+
//
|
407
|
+
user_session.timestamp = timestamp_now;
|
408
|
+
referrer = new liteURL(document.referrer);
|
409
|
+
current_page = window.location.pathname;
|
410
|
+
user_session.requested_page = current_page;
|
411
|
+
user_session.previous_page = referrer.search === '' ?
|
412
|
+
(referrer.pathname === '' ? current_page : referrer.pathname) :
|
413
|
+
(user_session.previous_page === '' || user_session.previous_page === 'na'
|
414
|
+
? '/'
|
415
|
+
: user_session.previous_page
|
416
|
+
);
|
417
|
+
|
418
|
+
// calculate last 'pager' if any
|
419
|
+
if (rePager.test(user_session.previous_page)) {
|
420
|
+
last_pager = user_session.previous_page;
|
421
|
+
user_session.last_pager = last_pager;
|
422
|
+
} else {
|
423
|
+
last_pager = user_session.last_pager;
|
424
|
+
}
|
496
425
|
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
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);
|
426
|
+
// jadams: for testing only
|
427
|
+
// display page
|
428
|
+
//$('#no_flicker').css('display', 'block');
|
429
|
+
|
430
|
+
logger.info('update user session cookie');
|
431
|
+
j1.writeCookie({
|
432
|
+
name: cookie_names.user_session,
|
433
|
+
data: user_session
|
434
|
+
});
|
435
|
+
|
436
|
+
// initialize page resources for blocks
|
437
|
+
// (asynchronous, should be rewitten to xhrData)
|
438
|
+
j1.initBanner(settings);
|
439
|
+
j1.initPanel(settings);
|
440
|
+
j1.initFooter(settings);
|
441
|
+
|
442
|
+
state = 'running';
|
443
|
+
logger.info('state: ' + state);
|
444
|
+
logger.info(logText);
|
445
|
+
|
446
|
+
user_session.timestamp = timestamp_now;
|
447
|
+
j1.writeCookie({
|
448
|
+
name: cookie_names.user_session,
|
449
|
+
data: user_session
|
530
450
|
});
|
531
451
|
|
452
|
+
// -----------------------------------------------------------------------
|
453
|
+
// additional BS helpers from j1.core
|
454
|
+
// -----------------------------------------------------------------------
|
455
|
+
j1.core.bsFormClearButton();
|
456
|
+
|
457
|
+
// finalize and display page
|
458
|
+
j1.displayPage();
|
459
|
+
|
532
460
|
}, // END init
|
533
461
|
|
534
462
|
// -------------------------------------------------------------------------
|
535
|
-
// initBanner
|
463
|
+
// initBanner()
|
536
464
|
// AJAX fetcher to load and place all banner used for a page
|
537
465
|
// -------------------------------------------------------------------------
|
538
466
|
initBanner: function (options) {
|
539
|
-
var logger
|
540
|
-
var banner
|
541
|
-
var bannerOptions
|
542
|
-
var mod
|
467
|
+
var logger = log4javascript.getLogger('j1.initBanner');
|
468
|
+
var banner = [];
|
469
|
+
var bannerOptions = [];
|
470
|
+
var mod = 'j1';
|
471
|
+
var logText;
|
543
472
|
|
544
473
|
{% comment %}
|
545
474
|
Closure to pass additional data (e.g. #banner_id) to AJAX load callback
|
@@ -548,12 +477,19 @@ var j1 = (function () {
|
|
548
477
|
var cb_load_closure = function(banner_id) {
|
549
478
|
return function ( responseTxt, statusTxt, xhr ) {
|
550
479
|
if ( statusTxt == 'success' ) {
|
480
|
+
var logger = log4javascript.getLogger('j1.xhrData');
|
551
481
|
logText = 'loading banner completed on id: ' +banner_id;
|
482
|
+
$(banner_id).addClass("mutated");
|
552
483
|
logger.info(logText);
|
484
|
+
j1.setXhrDataState(banner_id, statusTxt);
|
485
|
+
j1.setXhrDomState(banner_id, statusTxt);
|
486
|
+
logger.info('XHR data loaded in the DOM: ' + banner_id);
|
553
487
|
}
|
554
488
|
if ( statusTxt == 'error' ) {
|
555
489
|
logText = 'loading banner failed on id: ' +banner_id+ ', error: ' + xhr.status + ': ' + xhr.statusText;
|
556
490
|
logger.error(logText);
|
491
|
+
j1.setXhrDataState(banner_id, statusTxt);
|
492
|
+
j1.setXhrDomState(banner_id, statusTxt);
|
557
493
|
// Set|Log status
|
558
494
|
state = 'failed';
|
559
495
|
logger.error('state: ' + state);
|
@@ -581,30 +517,14 @@ var j1 = (function () {
|
|
581
517
|
{% assign key = item[0] %}
|
582
518
|
{% assign value = item[1] %}
|
583
519
|
|
584
|
-
{% if key and debug %} item:value {{key}}:{{value}}
|
520
|
+
{% if key and debug %} item:value {{key}}:{{value}} {% endif %}
|
585
521
|
|
586
522
|
{% if key == 'id' %} {% assign id = value %} {% endif %}
|
587
523
|
{% 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
524
|
{% endfor %}
|
591
525
|
{% endfor %}
|
592
526
|
|
593
527
|
{% 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
528
|
|
609
529
|
{% comment %} Register current banner
|
610
530
|
-------------------------------------------------------------------- {% endcomment %}
|
@@ -617,8 +537,6 @@ var j1 = (function () {
|
|
617
537
|
---------------------------------------------------------------------- {% endcomment %}
|
618
538
|
{% assign id = nil %}
|
619
539
|
{% assign enabled = nil %}
|
620
|
-
{% assign background_color_1 = nil %}
|
621
|
-
{% assign background_color_2 = nil %}
|
622
540
|
{% assign banner_config = nil %}
|
623
541
|
|
624
542
|
{% endfor %} {% comment %} END banner_config {% endcomment %}
|
@@ -638,39 +556,51 @@ var j1 = (function () {
|
|
638
556
|
logText = 'loading banner on id: ' +banner[i];
|
639
557
|
logger.info(logText);
|
640
558
|
var banner_data_path = '{{banner_data_path}} ' + id + ' > *';
|
641
|
-
selector.load(
|
559
|
+
selector.load(banner_data_path, cb_load_closure(id));
|
642
560
|
}
|
643
|
-
}
|
561
|
+
} // END for
|
644
562
|
} else {
|
645
563
|
logText = 'no banner found in site';
|
646
564
|
logger.info(logText);
|
565
|
+
return false;
|
647
566
|
}
|
648
|
-
|
649
567
|
return true;
|
650
568
|
}, // END initBanner
|
651
569
|
|
652
570
|
// -------------------------------------------------------------------------
|
653
|
-
// initPanel
|
571
|
+
// initPanel()
|
654
572
|
// AJAX fetcher to load and place all panel used for a page
|
655
573
|
// -------------------------------------------------------------------------
|
656
574
|
// ToDo:
|
657
575
|
initPanel: function ( options ) {
|
658
|
-
var logger
|
659
|
-
var panel
|
660
|
-
var mod
|
576
|
+
var logger = log4javascript.getLogger('j1.initPanel');
|
577
|
+
var panel = [];
|
578
|
+
var mod = 'j1';
|
579
|
+
var logText;
|
661
580
|
|
662
581
|
{% comment %} Closure to pass additional data (e.g. panel_id) to AJAX load callback
|
663
582
|
See: http://stackoverflow.com/questions/939032/jquery-pass-more-parameters-into-callback
|
664
583
|
-------------------------------------------------------------------------- {% endcomment %}
|
584
|
+
|
585
|
+
{% comment %} NOTE
|
586
|
+
strategy for MutationObserver callbacks to monitor DOM changes
|
587
|
+
needs to be checked if multiple containers are chenaged in a row
|
588
|
+
-------------------------------------------------------------------------- {% endcomment %}
|
665
589
|
var cb_load_closure = function(panel_id) {
|
666
590
|
return function ( responseTxt, statusTxt, xhr ) {
|
591
|
+
var logger = log4javascript.getLogger('j1.xhrData');
|
667
592
|
if ( statusTxt == 'success' ) {
|
668
593
|
logText = 'loading panel completed on id: ' +panel_id;
|
669
594
|
logger.info(logText);
|
595
|
+
j1.setXhrDataState(panel_id, statusTxt);
|
596
|
+
j1.setXhrDomState(panel_id, statusTxt);
|
597
|
+
logger.info('XHR data loaded in the DOM: ' + panel_id);
|
670
598
|
}
|
671
599
|
if ( statusTxt == 'error' ) {
|
672
600
|
logText = 'loading panel failed on id: ' +panel_id+ ', error ' + xhr.status + ': ' + xhr.statusText;
|
673
601
|
logger.error(logText);
|
602
|
+
j1.setXhrDataState(panel_id, statusTxt);
|
603
|
+
j1.setXhrDomState(panel_id, statusTxt);
|
674
604
|
// Set|Log status
|
675
605
|
state = 'Error';
|
676
606
|
logger.error('state: ' + state);
|
@@ -721,45 +651,52 @@ var j1 = (function () {
|
|
721
651
|
{% endfor %} {% comment %} END panel_config {% endcomment %}
|
722
652
|
{% endfor %} {% comment %} END panel_config_settings {% endcomment %}
|
723
653
|
|
724
|
-
if (
|
654
|
+
if (panel.length) {
|
725
655
|
for (var i in panel) {
|
726
|
-
var id =
|
656
|
+
var id = '#' + panel[i];
|
727
657
|
var selector = $(id);
|
728
658
|
if ( selector.length ) {
|
729
659
|
logText = 'loading panel on id: ' +panel[i];
|
730
660
|
logger.info(logText);
|
731
661
|
var panel_data_path = '{{panel_data_path}} ' + id + ' > *';
|
732
|
-
selector.load(
|
662
|
+
selector.load(panel_data_path, cb_load_closure(id));
|
733
663
|
}
|
734
|
-
}
|
664
|
+
} // END for
|
735
665
|
} else {
|
736
666
|
logText = 'no panel found in site';
|
737
667
|
logger.info(logText);
|
668
|
+
return false;
|
738
669
|
}
|
739
|
-
|
740
670
|
return true;
|
741
671
|
}, // END initPanel
|
742
672
|
|
743
673
|
// -------------------------------------------------------------------------
|
744
|
-
// initFooter
|
674
|
+
// initFooter()
|
745
675
|
// AJAX fetcher to load and place the footer used for a page
|
746
676
|
// -------------------------------------------------------------------------
|
747
677
|
initFooter: function ( options ) {
|
748
|
-
var logger
|
749
|
-
var mod
|
678
|
+
var logger = log4javascript.getLogger('j1.initFooter');
|
679
|
+
var mod = 'j1';
|
680
|
+
var logText;
|
750
681
|
|
751
|
-
logText = '
|
682
|
+
logText = 'loading footer started';
|
752
683
|
logger.info(logText);
|
753
684
|
|
754
685
|
var cb_load_closure = function(footer_id) {
|
755
686
|
return function ( responseTxt, statusTxt, xhr ) {
|
687
|
+
var logger = log4javascript.getLogger('j1.xhrData');
|
756
688
|
if ( statusTxt == 'success' ) {
|
757
689
|
logText = 'footer loaded successfully on id: ' + footer_id;
|
758
690
|
logger.info(logText);
|
691
|
+
$(footer_id).addClass("mutated");
|
692
|
+
j1.setXhrDataState(footer_id, statusTxt);
|
693
|
+
j1.setXhrDomState(footer_id, statusTxt);
|
694
|
+
logger.info('XHR data loaded in the DOM: ' + footer_id);
|
759
695
|
|
760
|
-
state
|
761
|
-
|
762
|
-
|
696
|
+
// jadams, 2020-07-21: intermediate state DISABLED
|
697
|
+
// state = 'footer_loaded';
|
698
|
+
// logger.info('set state for module ' + mod + ': ' + state);
|
699
|
+
// executeFunctionByName(mod + '.setState', window, state);
|
763
700
|
|
764
701
|
logText = 'initialization finished';
|
765
702
|
logger.info(logText);
|
@@ -767,6 +704,9 @@ var j1 = (function () {
|
|
767
704
|
if ( statusTxt == 'error' ) {
|
768
705
|
logText = 'loading footer failed on id: ' +footer_id+ ', error ' + xhr.status + ': ' + xhr.statusText;
|
769
706
|
logger.error(logText);
|
707
|
+
j1.setXhrDataState(footer_id, statusTxt);
|
708
|
+
j1.setXhrDomState(footer_id, statusTxt);
|
709
|
+
|
770
710
|
// Set|Log status
|
771
711
|
state = 'failed';
|
772
712
|
logger.error('state: ' + state);
|
@@ -780,101 +720,49 @@ var j1 = (function () {
|
|
780
720
|
var selector = $(id);
|
781
721
|
if ( selector.length ) {
|
782
722
|
var footer_data_path = '{{footer_data_path}}';
|
783
|
-
|
784
|
-
|
723
|
+
selector.load(footer_data_path, cb_load_closure(id));
|
724
|
+
} else {
|
725
|
+
logText = 'data not loaded';
|
726
|
+
logger.warn(logText);
|
727
|
+
j1.setXhrDataState(id, 'not loaded');
|
728
|
+
j1.setXhrDomState(id, 'pending');
|
729
|
+
return false;
|
785
730
|
}
|
786
|
-
|
787
731
|
return true;
|
788
732
|
}, // END initFooter
|
789
733
|
|
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
734
|
// -------------------------------------------------------------------------
|
848
735
|
// displayPage
|
849
|
-
//
|
736
|
+
// show the page after timeout of {{flickerTimeout}} ms
|
850
737
|
// -------------------------------------------------------------------------
|
851
738
|
// NOTE:
|
852
739
|
// jadams, 2019-08-21: for unknown reason, the user state data
|
853
|
-
// (read from cookie) seems not
|
740
|
+
// (read from cookie) seems not correct (or loaded too late).
|
854
741
|
// To make correct data sure for APP mode, a status request is done
|
855
742
|
// to load the current state from the middleware (skipped in WEB mode)
|
856
743
|
// -------------------------------------------------------------------------
|
857
744
|
displayPage: function (options) {
|
858
745
|
var logger = log4javascript.getLogger('j1.displayPage');
|
859
746
|
var flickerTimeout = {{template_config.flicker_timeout}};
|
860
|
-
var url = new
|
747
|
+
var url = new liteURL(window.location.href);
|
861
748
|
var baseUrl = url.origin;
|
862
749
|
var ep_status = baseUrl + '/status' + '?page=' + window.location.pathname;
|
863
750
|
var user_session = j1.readCookie(cookie_names.user_session);
|
864
751
|
var user_state = j1.readCookie(cookie_names.user_state);
|
865
|
-
var current_url = new
|
752
|
+
var current_url = new liteURL(window.location.href);
|
866
753
|
var providerPermissions = {};
|
867
754
|
var provider;
|
868
755
|
var previous_page;
|
869
756
|
var appDetected;
|
870
757
|
var categoryAllowed;
|
871
758
|
|
872
|
-
|
873
759
|
logger.info('finalize page');
|
874
760
|
j1.setCss();
|
875
761
|
|
876
|
-
|
877
|
-
|
762
|
+
logText= 'loading page partials: started';
|
763
|
+
logger.info(logText);
|
764
|
+
|
765
|
+
if (j1.appDetected()) { // app mode
|
878
766
|
logger.info('mode detected: app');
|
879
767
|
|
880
768
|
$.when ($.ajax(ep_status))
|
@@ -892,13 +780,14 @@ var j1 = (function () {
|
|
892
780
|
providerPermissions = user_session.provider_permissions;
|
893
781
|
categoryAllowed = providerPermissions.includes(user_session.page_permission);
|
894
782
|
|
895
|
-
//
|
783
|
+
// check protected pages (applies for APP only)
|
784
|
+
// make sure that protected pages are ALWAYS checked for permissions
|
896
785
|
// -------------------------------------------------------------------
|
897
786
|
if (
|
898
787
|
j1.authEnabled() &&
|
899
788
|
user_session.page_permission !== 'public' &&
|
900
|
-
categoryAllowed === false
|
901
|
-
{
|
789
|
+
categoryAllowed === false
|
790
|
+
){
|
902
791
|
// redirect to middleware|page_authentication
|
903
792
|
if (data.authenticated === 'true') {
|
904
793
|
var ep_post_authentication = baseUrl + '/post_authentication';
|
@@ -910,20 +799,21 @@ var j1 = (function () {
|
|
910
799
|
}
|
911
800
|
} // END check protected pages
|
912
801
|
|
802
|
+
// show the page delayed
|
913
803
|
setTimeout (function() {
|
914
|
-
//
|
804
|
+
// display page
|
915
805
|
$('#no_flicker').css('display', 'block');
|
916
806
|
|
917
|
-
// show|hide cookie icon
|
807
|
+
// show|hide cookie icon (should MOVED to Cookiebar ???)
|
918
808
|
if (user_state.cookies_accepted === 'accepted') {
|
919
|
-
//
|
809
|
+
// Display cookie icon
|
920
810
|
logText = 'show cookie icon';
|
921
811
|
logger.info(logText);
|
922
812
|
$('#quickLinksCookieButton').css('display', 'block');
|
923
813
|
} else {
|
924
814
|
logText = 'hide cookie icon';
|
925
815
|
logger.info(logText);
|
926
|
-
//
|
816
|
+
// Display cookie icon
|
927
817
|
$('#quickLinksCookieButton').css('display', 'none');
|
928
818
|
}
|
929
819
|
|
@@ -942,19 +832,19 @@ var j1 = (function () {
|
|
942
832
|
if (user_session.authenticated === 'true') {
|
943
833
|
// set signout
|
944
834
|
logger.info('show signout icon');
|
945
|
-
$('#navLinkSignInOut').attr(
|
946
|
-
$('#iconSignInOut').removeClass(
|
835
|
+
$('#navLinkSignInOut').attr('data-target','#modalOmniSignOut');
|
836
|
+
$('#iconSignInOut').removeClass('mdi-login').addClass('mdi-logout');
|
947
837
|
} else {
|
948
838
|
// set signin
|
949
839
|
logger.info('show signin icon');
|
950
|
-
$('#navLinkSignInOut').attr(
|
951
|
-
$('#iconSignInOut').removeClass(
|
840
|
+
$('#navLinkSignInOut').attr('data-target','#modalOmniSignIn');
|
841
|
+
$('#iconSignInOut').removeClass('mdi-logout').addClass('mdi-login');
|
952
842
|
}
|
953
843
|
logger.info('authentication detected as: ' + user_session.authenticated);
|
954
844
|
$('#quickLinksSignInOutButton').css('display', 'block');
|
955
845
|
}
|
956
846
|
|
957
|
-
//
|
847
|
+
// if the page requested contains an anchor element,
|
958
848
|
// do a smooth scroll to
|
959
849
|
j1.scrollTo();
|
960
850
|
|
@@ -967,7 +857,7 @@ var j1 = (function () {
|
|
967
857
|
logger.info(logText);
|
968
858
|
}
|
969
859
|
|
970
|
-
// update sidebar for changed
|
860
|
+
// update sidebar for changed theme data
|
971
861
|
logger.info('update sidebar');
|
972
862
|
user_state = j1.readCookie(cookie_names.user_state);
|
973
863
|
current_user_data = j1.mergeData(user_session, user_state);
|
@@ -981,99 +871,85 @@ var j1 = (function () {
|
|
981
871
|
logger.info(logText);
|
982
872
|
|
983
873
|
}, flickerTimeout);
|
984
|
-
});
|
985
|
-
|
986
|
-
|
987
|
-
// web mode
|
874
|
+
}); // END APP mode
|
875
|
+
} else { // web mode
|
876
|
+
// show the page delayed
|
988
877
|
setTimeout (function() {
|
989
|
-
|
878
|
+
j1.setState('finished');
|
879
|
+
logger.info('state: finished');
|
880
|
+
logger.info('page initialization: finished');
|
881
|
+
|
882
|
+
// display page
|
990
883
|
$('#no_flicker').css('display', 'block');
|
991
|
-
|
992
|
-
|
993
|
-
|
884
|
+
logger.info('mode detected: web');
|
885
|
+
logger.info('hide signin icon');
|
886
|
+
$('#quickLinksSignInOutButton').css('display', 'none');
|
994
887
|
|
995
|
-
|
996
|
-
|
888
|
+
user_session.current_page = current_url.pathname;
|
889
|
+
j1.writeCookie({
|
997
890
|
name: cookie_names.user_session,
|
998
891
|
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
|
-
}
|
1020
|
-
|
1021
|
-
// If the page requested contains an anchor element,
|
1022
|
-
// do a smooth scroll to
|
1023
|
-
j1.scrollTo();
|
1024
|
-
|
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
|
-
}
|
892
|
+
});
|
1033
893
|
|
1034
|
-
|
1035
|
-
|
1036
|
-
|
1037
|
-
|
1038
|
-
|
894
|
+
// show|hide translator icon
|
895
|
+
if (translation_enabled) {
|
896
|
+
logger.info('translator detected: google');
|
897
|
+
logger.info('initialize language selector');
|
898
|
+
$('.goog-te-combo').addClass('form-control');
|
899
|
+
}
|
1039
900
|
|
1040
|
-
|
1041
|
-
|
1042
|
-
|
901
|
+
// show|hide cookie icon (should MOVED to Cookiebar ???)
|
902
|
+
if (user_state.cookies_accepted === 'accepted') {
|
903
|
+
// Display cookie icon
|
904
|
+
logText = 'show cookie icon';
|
1043
905
|
logger.info(logText);
|
1044
|
-
|
906
|
+
$('#quickLinksCookieButton').css('display', 'block');
|
907
|
+
} else {
|
908
|
+
logText = 'hide cookie icon';
|
1045
909
|
logger.info(logText);
|
910
|
+
// Display cookie icon
|
911
|
+
$('#quickLinksCookieButton').css('display', 'none');
|
912
|
+
}
|
1046
913
|
|
1047
|
-
|
1048
|
-
|
1049
|
-
|
914
|
+
// If the page requested contains an anchor element,
|
915
|
+
// do a smooth scroll to
|
916
|
+
j1.scrollTo();
|
1050
917
|
|
1051
|
-
|
1052
|
-
|
1053
|
-
|
1054
|
-
|
1055
|
-
|
1056
|
-
|
918
|
+
if (user_session.previous_page !== user_session.current_page) {
|
919
|
+
logText = 'page change detected';
|
920
|
+
logger.info(logText);
|
921
|
+
logText = 'previous page: ' + user_session.previous_page;
|
922
|
+
logger.info(logText);
|
923
|
+
logText = 'current page: ' + user_session.current_page;
|
924
|
+
logger.info(logText);
|
925
|
+
}
|
1057
926
|
|
1058
|
-
|
1059
|
-
|
1060
|
-
|
927
|
+
// update sidebar for changed theme data
|
928
|
+
logger.info('update sidebar');
|
929
|
+
user_state = j1.readCookie(cookie_names.user_state);
|
930
|
+
current_user_data = j1.mergeData(user_session, user_state);
|
931
|
+
j1.core.navigator.updateSidebar(current_user_data);
|
1061
932
|
|
1062
|
-
|
1063
|
-
|
933
|
+
// set|log status
|
934
|
+
state = 'finished';
|
935
|
+
logText = 'state: ' + state;
|
936
|
+
logger.info(logText);
|
937
|
+
logText = 'page finalized successfully';
|
938
|
+
logger.info(logText);
|
1064
939
|
|
1065
|
-
|
1066
|
-
|
1067
|
-
}, // END
|
940
|
+
}, flickerTimeout);
|
941
|
+
} // END WEB mode
|
942
|
+
}, // END displayPage
|
1068
943
|
|
1069
944
|
// -------------------------------------------------------------------------
|
1070
945
|
// Helper functions
|
1071
946
|
// -------------------------------------------------------------------------
|
1072
947
|
|
1073
948
|
// -------------------------------------------------------------------------
|
1074
|
-
//
|
1075
|
-
//
|
1076
|
-
//
|
949
|
+
// mergeData()
|
950
|
+
// merge two objects (properties) and returns the resulting object
|
951
|
+
// see: https://stackoverflow.com/questions/43109229/merge-default-options-containing-object-with-json-object
|
952
|
+
// TODO: Improve comment, give synopsis and example
|
1077
953
|
// -------------------------------------------------------------------------
|
1078
954
|
mergeData: function () {
|
1079
955
|
var a = [].slice.call(arguments), o = a.shift();
|
@@ -1087,35 +963,39 @@ var j1 = (function () {
|
|
1087
963
|
}, // END mergeData
|
1088
964
|
|
1089
965
|
// -------------------------------------------------------------------------
|
1090
|
-
//
|
966
|
+
// getPrevPage()
|
967
|
+
// Returns the last vistited page
|
1091
968
|
// -------------------------------------------------------------------------
|
1092
969
|
getPrevPage: function () {
|
1093
970
|
return previous_page;
|
1094
971
|
}, // END getPrevPage
|
1095
972
|
|
1096
973
|
// -------------------------------------------------------------------------
|
1097
|
-
//
|
1098
|
-
//
|
1099
|
-
//
|
974
|
+
// getLanguage()
|
975
|
+
// Returns the preferred language taken form window.navigator
|
976
|
+
// See:
|
977
|
+
// https://stackoverflow.com/questions/1043339/javascript-for-detecting-browser-language-preference
|
1100
978
|
// -------------------------------------------------------------------------
|
1101
979
|
getLanguage: function () {
|
1102
980
|
var language = navigator.languages ? navigator.languages[0] : (navigator.language || navigator.userLanguage);
|
1103
981
|
}, // END getLanguage
|
1104
982
|
|
1105
983
|
// -------------------------------------------------------------------------
|
1106
|
-
//
|
984
|
+
// getTemplateVersion()
|
985
|
+
// Returns the template version taken from site config (_config.yml)
|
1107
986
|
// -------------------------------------------------------------------------
|
1108
987
|
getTemplateVersion: function () {
|
1109
988
|
return '{{template_version}}';
|
1110
989
|
}, // END getTemplateVersion
|
1111
990
|
|
1112
991
|
// -------------------------------------------------------------------------
|
992
|
+
// scrollTo()
|
1113
993
|
// Scrolls smooth to any anchor referenced by an page URL on
|
1114
994
|
// e.g. a page reload. Values for delay|offset are taken from
|
1115
995
|
// TOCCER module
|
1116
996
|
// -------------------------------------------------------------------------
|
1117
997
|
scrollTo: function () {
|
1118
|
-
var anchor = window.location.href.split(
|
998
|
+
var anchor = window.location.href.split('#')[1];
|
1119
999
|
var anchor_id = '#' + anchor;
|
1120
1000
|
var selector;
|
1121
1001
|
|
@@ -1140,18 +1020,18 @@ var j1 = (function () {
|
|
1140
1020
|
}, // END scrollTo
|
1141
1021
|
|
1142
1022
|
// -------------------------------------------------------------------------
|
1143
|
-
// authEnabled
|
1023
|
+
// authEnabled()
|
1144
1024
|
// Returns the state of the authentication module
|
1145
1025
|
// -------------------------------------------------------------------------
|
1146
1026
|
authEnabled: function () {
|
1147
|
-
var logger
|
1148
|
-
var authEnabled = {{authentication_options.j1_auth.enabled}}
|
1027
|
+
var logger = log4javascript.getLogger('j1.authentication');
|
1028
|
+
var authEnabled = {{authentication_options.j1_auth.enabled}};
|
1149
1029
|
|
1150
1030
|
return authEnabled;
|
1151
1031
|
}, // END authEnabled
|
1152
1032
|
|
1153
1033
|
// -------------------------------------------------------------------------
|
1154
|
-
// appDetected
|
1034
|
+
// appDetected()
|
1155
1035
|
// Returns true if a web session cookie exists
|
1156
1036
|
// -------------------------------------------------------------------------
|
1157
1037
|
appDetected: function () {
|
@@ -1170,312 +1050,102 @@ var j1 = (function () {
|
|
1170
1050
|
}, // END appDetected
|
1171
1051
|
|
1172
1052
|
// -------------------------------------------------------------------------
|
1173
|
-
// xhrData
|
1174
|
-
// Load data asychronously using XHR on
|
1175
|
-
// specified
|
1053
|
+
// xhrData()
|
1054
|
+
// Load data asychronously using XHR|jQuery on an HTML element (e.g. <div>)
|
1055
|
+
// specified by xhr_container_id, xhr_data_path (options)
|
1176
1056
|
// -------------------------------------------------------------------------
|
1177
|
-
xhrData: function (
|
1178
|
-
var logger
|
1179
|
-
var
|
1057
|
+
xhrData: function (options, mod, status) {
|
1058
|
+
var logger = log4javascript.getLogger('j1.xhrData');
|
1059
|
+
var selector = $('#' + options.xhr_container_id);
|
1060
|
+
var state = status;
|
1061
|
+
var observer_options = {
|
1062
|
+
attributes: false,
|
1063
|
+
childList: true,
|
1064
|
+
characterData: false,
|
1065
|
+
subtree: true
|
1066
|
+
};
|
1067
|
+
var observer;
|
1180
1068
|
var logText;
|
1181
1069
|
|
1182
1070
|
var cb_load_closure = function(mod, id) {
|
1183
1071
|
return function (responseTxt, statusTxt, xhr) {
|
1072
|
+
var logger = log4javascript.getLogger('j1.xhrData');
|
1184
1073
|
if ( statusTxt === 'success' ) {
|
1185
|
-
|
1186
|
-
|
1187
|
-
|
1188
|
-
|
1074
|
+
// jadams, 2020-07-21: intermediate state should DISABLED
|
1075
|
+
// if (state) {
|
1076
|
+
// logger.info('set state for ' +mod+ ' to: ' + state);
|
1077
|
+
// executeFunctionByName(mod + '.setState', window, state);
|
1078
|
+
// }
|
1079
|
+
j1.setXhrDataState(id, statusTxt);
|
1080
|
+
j1.setXhrDomState(id, 'pending');
|
1081
|
+
|
1189
1082
|
logText = 'data loaded successfully on id: ' +id;
|
1190
1083
|
logger.info(logText);
|
1084
|
+
state = true;
|
1191
1085
|
}
|
1192
1086
|
if ( statusTxt === 'error' ) {
|
1193
|
-
|
1194
|
-
|
1195
|
-
|
1196
|
-
|
1197
|
-
|
1087
|
+
// jadams, 2020-07-21: to be checked why id could be UNDEFINED
|
1088
|
+
if (typeof(id) != "undefined") {
|
1089
|
+
state = 'failed';
|
1090
|
+
logger.info('set state for ' +mod+ ' to: ' + state);
|
1091
|
+
// jadams, 2020-07-21: intermediate state should DISABLED
|
1092
|
+
// executeFunctionByName(mod + '.setState', window, state);
|
1093
|
+
j1.setXhrDataState(id, statusTxt);
|
1094
|
+
j1.setXhrDomState(id, 'pending');
|
1095
|
+
logText = 'loading data failed on id: ' +id+ ', error ' + xhr.status + ': ' + xhr.statusText;
|
1096
|
+
logger.error(logText);
|
1097
|
+
state = false;
|
1098
|
+
}
|
1198
1099
|
}
|
1199
1100
|
};
|
1200
1101
|
};
|
1201
|
-
|
1202
|
-
var id =
|
1203
|
-
var selector = $(id);
|
1204
|
-
|
1205
|
-
|
1206
|
-
|
1207
|
-
|
1208
|
-
|
1209
|
-
|
1210
|
-
|
1211
|
-
|
1212
|
-
|
1213
|
-
|
1214
|
-
|
1215
|
-
|
1216
|
-
|
1217
|
-
|
1218
|
-
|
1219
|
-
|
1220
|
-
|
1221
|
-
|
1222
|
-
|
1223
|
-
|
1224
|
-
|
1225
|
-
|
1226
|
-
|
1227
|
-
var data_type = typeof data_type == 'undefined' || data_type == '' ? 'json' : data_type;
|
1228
|
-
|
1229
|
-
return $.ajax({
|
1230
|
-
url: url,
|
1231
|
-
type: type,
|
1232
|
-
dataType: data_type,
|
1233
|
-
success: function(data) {
|
1234
|
-
if (typeof data == 'string') {
|
1235
|
-
return JSON.parse(data);
|
1236
|
-
}
|
1237
|
-
if (typeof data == 'object') {
|
1238
|
-
return data;
|
1239
|
-
}
|
1240
|
-
},
|
1241
|
-
error: function(error) {
|
1242
|
-
logger.error('xhr request failed: ' + error.statusText);
|
1243
|
-
}
|
1244
|
-
});
|
1245
|
-
|
1246
|
-
}, // END xhrApi
|
1247
|
-
|
1248
|
-
// -------------------------------------------------------------------------
|
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;
|
1102
|
+
// see: https://stackoverflow.com/questions/20420577/detect-added-element-to-dom-with-mutation-observer
|
1103
|
+
var id = '#' + options.xhr_container_id;
|
1104
|
+
var $selector = $(id);
|
1105
|
+
if ( $selector.length ) {
|
1106
|
+
var html_data_path = options.xhr_data_path + ' > *';
|
1107
|
+
$selector.load( html_data_path, cb_load_closure( mod, id ) );
|
1108
|
+
|
1109
|
+
var MutationObserver = window.MutationObserver || window.WebKitMutationObserver;
|
1110
|
+
var xhrObserver = new MutationObserver (mutationHandler);
|
1111
|
+
var obsConfig = {
|
1112
|
+
childList: true,
|
1113
|
+
characterData: false,
|
1114
|
+
attributes: false,
|
1115
|
+
subtree: false };
|
1116
|
+
|
1117
|
+
selector.each(function(){
|
1118
|
+
xhrObserver.observe(this, obsConfig);
|
1119
|
+
} );
|
1120
|
+
|
1121
|
+
function mutationHandler (mutationRecords) {
|
1122
|
+
mutationRecords.forEach ( function (mutation) {
|
1123
|
+
if (mutation.addedNodes.length) {
|
1124
|
+
logger.info('XHR data loaded in the DOM: ' + id);
|
1125
|
+
j1.setXhrDomState(id, 'success');
|
1126
|
+
}
|
1127
|
+
});
|
1364
1128
|
}
|
1365
1129
|
} else {
|
1366
|
-
|
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"
|
1130
|
+
// jadams, 2020-07-21: To be clarified why a id is "undefined"
|
1131
|
+
if (id != '#undefined') {
|
1132
|
+
logText = 'data not loaded on id:' + id;
|
1397
1133
|
logger.warn(logText);
|
1398
|
-
|
1134
|
+
j1.setXhrDataState(id, 'not loaded');
|
1135
|
+
j1.setXhrDomState(id, 'not loaded');
|
1136
|
+
// Set processing state to 'finished' to complete module load
|
1137
|
+
state = 'finished';
|
1399
1138
|
logger.info('state: ' + state);
|
1400
|
-
|
1401
|
-
|
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;
|
1139
|
+
// jadams, 2020-07-21: intermediate state should DISABLED
|
1140
|
+
// executeFunctionByName(mod + '.setState', window, state);
|
1141
|
+
state = false;
|
1424
1142
|
}
|
1425
|
-
} else {
|
1426
|
-
return false;
|
1427
1143
|
}
|
1428
|
-
|
1429
|
-
}, // END
|
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
|
1144
|
+
return state;
|
1145
|
+
}, // END xhrData
|
1475
1146
|
|
1476
1147
|
// -------------------------------------------------------------------------
|
1477
|
-
// readCookie
|
1478
|
-
//
|
1148
|
+
// readCookie()
|
1479
1149
|
// -------------------------------------------------------------------------
|
1480
1150
|
readCookie: function (name) {
|
1481
1151
|
var data;
|
@@ -1497,7 +1167,7 @@ var j1 = (function () {
|
|
1497
1167
|
}, // END readCookie
|
1498
1168
|
|
1499
1169
|
// -------------------------------------------------------------------------
|
1500
|
-
// writeCookie
|
1170
|
+
// writeCookie()
|
1501
1171
|
// Write 'data' to a cookie 'name'. If not exists, the cookie gets
|
1502
1172
|
// created. Returns 'true' if cookie was written, otherwise 'false'.
|
1503
1173
|
//
|
@@ -1511,26 +1181,29 @@ var j1 = (function () {
|
|
1511
1181
|
};
|
1512
1182
|
var settings = $.extend(defaults, options);
|
1513
1183
|
|
1514
|
-
|
1515
|
-
|
1184
|
+
// var epoch = Math.floor(Date.now()/1000);
|
1185
|
+
// var timestamp_now = moment.unix(epoch).format('YYYY-MM-DD HH:mm:ss');
|
1186
|
+
var date = new Date();
|
1187
|
+
var timestamp_now = date.toISOString();
|
1516
1188
|
var cookie_data = {};
|
1517
1189
|
var data_json;
|
1518
1190
|
var data_encoded;
|
1519
1191
|
|
1520
1192
|
if (j1.existsCookie(settings.name)) {
|
1521
|
-
cookie_data
|
1522
|
-
cookie_data.timestamp =
|
1523
|
-
cookie_data
|
1524
|
-
data_json
|
1525
|
-
data_encoded
|
1193
|
+
cookie_data = j1.readCookie(settings.name);
|
1194
|
+
cookie_data.timestamp = timestamp_now;
|
1195
|
+
cookie_data = j1.mergeData(cookie_data, settings.data);
|
1196
|
+
data_json = JSON.stringify( cookie_data );
|
1197
|
+
data_encoded = window.btoa(data_json);
|
1198
|
+
|
1526
1199
|
if (settings.expires > 0) {
|
1527
1200
|
Cookies.set(settings.name, data_encoded, { expires: settings.expires });
|
1528
1201
|
} else {
|
1529
1202
|
Cookies.set(settings.name, data_encoded);
|
1530
1203
|
}
|
1531
1204
|
} else {
|
1532
|
-
cookie_data = settings.data
|
1533
|
-
data_json = JSON.stringify(
|
1205
|
+
cookie_data = settings.data;
|
1206
|
+
data_json = JSON.stringify(settings.data);
|
1534
1207
|
data_encoded = window.btoa(data_json);
|
1535
1208
|
if (settings.expires > 0) {
|
1536
1209
|
Cookies.set(settings.name, data_encoded, { expires: settings.expires });
|
@@ -1575,13 +1248,13 @@ var j1 = (function () {
|
|
1575
1248
|
// -------------------------------------------------------------------------
|
1576
1249
|
deleteCookie: function (options) {
|
1577
1250
|
var name = options;
|
1578
|
-
var all_cookies = document.cookie.split(
|
1251
|
+
var all_cookies = document.cookie.split('; ');
|
1579
1252
|
|
1580
1253
|
if ( name === 'all' ) {
|
1581
1254
|
for (var c = 0; c < all_cookies.length; c++) {
|
1582
|
-
var d = window.location.hostname.split(
|
1255
|
+
var d = window.location.hostname.split('.');
|
1583
1256
|
while (d.length > 0) {
|
1584
|
-
var cookieBase = encodeURIComponent(all_cookies[c].split(
|
1257
|
+
var cookieBase = encodeURIComponent(all_cookies[c].split(';')[0].split('=')[0]) + '=; expires=Thu, 01-Jan-1970 00:00:01 GMT; domain=' + d.join('.') + ' ;path=';
|
1585
1258
|
var p = location.pathname.split('/');
|
1586
1259
|
document.cookie = cookieBase + '/';
|
1587
1260
|
while (p.length > 0) {
|
@@ -1592,7 +1265,7 @@ var j1 = (function () {
|
|
1592
1265
|
}
|
1593
1266
|
}
|
1594
1267
|
} else {
|
1595
|
-
document.cookie = name +
|
1268
|
+
document.cookie = name + '=;expires=Thu, 01 Jan 1970 00:00:00 GMT';
|
1596
1269
|
}
|
1597
1270
|
|
1598
1271
|
return true;
|
@@ -1603,8 +1276,8 @@ var j1 = (function () {
|
|
1603
1276
|
// -------------------------------------------------------------------------
|
1604
1277
|
existsCookie: function (name) {
|
1605
1278
|
var dc = document.cookie;
|
1606
|
-
var prefix = name +
|
1607
|
-
var begin = dc.indexOf(
|
1279
|
+
var prefix = name + '=';
|
1280
|
+
var begin = dc.indexOf('; ' + prefix);
|
1608
1281
|
var end = dc.length; // default to end of the string
|
1609
1282
|
var cookieExists = false;
|
1610
1283
|
var cookieContent = '';
|
@@ -1622,8 +1295,8 @@ var j1 = (function () {
|
|
1622
1295
|
|
1623
1296
|
// if ";" is found somewhere after the prefix position then "end" is
|
1624
1297
|
// that position, otherwise it defaults to the end of the string
|
1625
|
-
if (dc.indexOf(
|
1626
|
-
end = dc.indexOf(
|
1298
|
+
if (dc.indexOf(';', begin) !== -1) {
|
1299
|
+
end = dc.indexOf(';', begin);
|
1627
1300
|
}
|
1628
1301
|
|
1629
1302
|
cookieContent = decodeURI(dc.substring(begin + prefix.length, end) ).replace(/"/g, '');
|
@@ -1645,63 +1318,68 @@ var j1 = (function () {
|
|
1645
1318
|
resolveMacros: function (user_data) {
|
1646
1319
|
var logger = log4javascript.getLogger('j1.resolveMacros');
|
1647
1320
|
|
1648
|
-
|
1649
|
-
$('
|
1321
|
+
var sidebarLoaded = setInterval(function() {
|
1322
|
+
if ($('#sidebar_mmenu').length) {
|
1323
|
+
if (Object.keys(user_data).length) {
|
1324
|
+
$('[id^=macro-]').each(function() {
|
1650
1325
|
|
1651
|
-
|
1652
|
-
|
1653
|
-
|
1654
|
-
|
1655
|
-
|
1656
|
-
|
1657
|
-
|
1658
|
-
|
1659
|
-
|
1660
|
-
|
1661
|
-
|
1662
|
-
|
1663
|
-
|
1664
|
-
|
1665
|
-
|
1666
|
-
|
1667
|
-
|
1668
|
-
|
1669
|
-
|
1670
|
-
|
1671
|
-
|
1672
|
-
|
1673
|
-
|
1674
|
-
|
1675
|
-
|
1676
|
-
|
1677
|
-
|
1678
|
-
|
1679
|
-
|
1680
|
-
|
1681
|
-
|
1682
|
-
|
1683
|
-
|
1684
|
-
|
1685
|
-
|
1686
|
-
|
1687
|
-
|
1688
|
-
|
1689
|
-
|
1690
|
-
|
1691
|
-
|
1692
|
-
|
1693
|
-
|
1694
|
-
|
1695
|
-
|
1696
|
-
|
1697
|
-
|
1698
|
-
});
|
1699
|
-
return true;
|
1700
|
-
} else {
|
1701
|
-
logger.error('no user data provided');
|
1702
|
-
return false;
|
1703
|
-
}
|
1326
|
+
$('#macro-provider').each(function() {
|
1327
|
+
var $this = $(this);
|
1328
|
+
var $html = $this.html();
|
1329
|
+
$this.html($html.replace('??provider', user_data.provider));
|
1330
|
+
this.href = this.href.replace(/.*\/??provider-site-url/, user_data.provider_site_url);
|
1331
|
+
});
|
1332
|
+
$('#macro-user-name').each(function() {
|
1333
|
+
var $this = $(this);
|
1334
|
+
var $html = $this.html();
|
1335
|
+
$this.html($html.replace('??user-name', user_data.user_name));
|
1336
|
+
this.href = this.href.replace(/.*\/??provider_member_url/, user_data.provider_member_url);
|
1337
|
+
});
|
1338
|
+
$('#macro-provider-permissions').each(function() {
|
1339
|
+
var $this = $(this);
|
1340
|
+
var $html = $this.html();
|
1341
|
+
$this.html($html.replace('??provider-permissions', user_data.provider_permissions));
|
1342
|
+
this.href = this.href.replace(/.*\/??provider_member_url/, user_data.provider_member_url);
|
1343
|
+
});
|
1344
|
+
$('#macro-provider-membership').each(function() {
|
1345
|
+
var $this = $(this);
|
1346
|
+
var $html = $this.html();
|
1347
|
+
$this.html($html.replace('??provider-membership', user_data.provider_membership));
|
1348
|
+
this.href = this.href.replace(/.*\/??provider_member_url/, user_data.provider_member_url);
|
1349
|
+
});
|
1350
|
+
$('#macro-cookie-state').each(function() {
|
1351
|
+
var $this = $(this);
|
1352
|
+
var $html = $this.html();
|
1353
|
+
$this.html($html.replace('??cookie-state', user_data.cookies_accepted));
|
1354
|
+
this.href = this.href.replace(/.*\/??provider_privacy_url/, user_data.provider_privacy_url);
|
1355
|
+
});
|
1356
|
+
$('#macro-theme-name').each(function() {
|
1357
|
+
var $this = $(this);
|
1358
|
+
var $html = $this.html();
|
1359
|
+
$this.html($html.replace('??theme-name', user_data.theme_name));
|
1360
|
+
});
|
1361
|
+
$('#macro-theme-author').each(function() {
|
1362
|
+
var $this = $(this);
|
1363
|
+
var $html = $this.html();
|
1364
|
+
$this.html($html.replace('??theme-author', user_data.theme_author));
|
1365
|
+
this.href = this.href.replace(/.*\/??theme-author-url/, user_data.theme_author_url);
|
1366
|
+
});
|
1367
|
+
$('#macro-theme-version').each(function() {
|
1368
|
+
var $this = $(this);
|
1369
|
+
var $html = $this.html();
|
1370
|
+
$this.html($html.replace('??theme-version', user_data.theme_version));
|
1371
|
+
});
|
1704
1372
|
|
1373
|
+
});
|
1374
|
+
clearInterval(sidebarLoaded);
|
1375
|
+
return true;
|
1376
|
+
} else {
|
1377
|
+
logger.error('no user data provided');
|
1378
|
+
clearInterval(sidebarLoaded);
|
1379
|
+
return false;
|
1380
|
+
}
|
1381
|
+
}
|
1382
|
+
}, 25); // END 'sidebarLoaded'
|
1705
1383
|
}, // END resolveMacros
|
1706
1384
|
|
1707
1385
|
// -------------------------------------------------------------------------
|
@@ -1711,48 +1389,54 @@ var j1 = (function () {
|
|
1711
1389
|
updateMacros: function (user_data) {
|
1712
1390
|
var logger = log4javascript.getLogger('j1.updateMacros');
|
1713
1391
|
|
1714
|
-
|
1715
|
-
$('
|
1392
|
+
var sidebarLoaded = setInterval(function() {
|
1393
|
+
if ($('#sidebar_mmenu').length) {
|
1716
1394
|
|
1717
|
-
|
1718
|
-
|
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
|
-
});
|
1395
|
+
if (Object.keys(user_data).length) {
|
1396
|
+
$('[id^=macro-]').each(function() {
|
1748
1397
|
|
1749
|
-
|
1750
|
-
|
1751
|
-
|
1752
|
-
|
1753
|
-
|
1754
|
-
|
1398
|
+
$('#macro-provider').each(function() {
|
1399
|
+
var $this = $(this);
|
1400
|
+
var $html = $this.html();
|
1401
|
+
$this.html($html.replace(/Provider:.*/, 'Provider: ' + user_data.provider));
|
1402
|
+
$('#macro-provider').attr('href', user_data.provider_site_url);
|
1403
|
+
});
|
1404
|
+
$('#macro-user-name').each(function() {
|
1405
|
+
var $this = $(this);
|
1406
|
+
var $html = $this.html();
|
1407
|
+
$this.html($html.replace(/User:.*/, 'User: ' + user_data.user_name));
|
1408
|
+
$('#macro-user-name').attr('href', user_data.provider_member_url);
|
1409
|
+
});
|
1410
|
+
$('#macro-provider-permissions').each(function() {
|
1411
|
+
var $this = $(this);
|
1412
|
+
var $html = $this.html();
|
1413
|
+
// $this.html($html.replace(/public|protected|private|blocked/, user_data.provider_permissions));
|
1414
|
+
$this.html($html.replace(/public.*|protected.*|private.*|blocked.*/, user_data.provider_permissions));
|
1415
|
+
$('#macro-provider-permissions').attr('href', user_data.provider_member_url);
|
1416
|
+
});
|
1417
|
+
$('#macro-provider-membership').each(function() {
|
1418
|
+
var $this = $(this);
|
1419
|
+
var $html = $this.html();
|
1420
|
+
$this.html($html.replace(/guest|member/, user_data.provider_membership));
|
1421
|
+
$('#macro-provider-membership').attr('href', user_data.provider_member_url);
|
1422
|
+
});
|
1423
|
+
$('#macro-cookie-state').each(function() {
|
1424
|
+
var $this = $(this);
|
1425
|
+
var $html = $this.html();
|
1426
|
+
$this.html($html.replace(/accepted|declined|pending/, user_data.cookies_accepted));
|
1427
|
+
$('#macro-cookie-state').attr('href', user_data.provider_privacy_url);
|
1428
|
+
});
|
1755
1429
|
|
1430
|
+
});
|
1431
|
+
clearInterval(sidebarLoaded);
|
1432
|
+
return true;
|
1433
|
+
} else {
|
1434
|
+
logger.error('no user data provided');
|
1435
|
+
clearInterval(sidebarLoaded);
|
1436
|
+
return false;
|
1437
|
+
}
|
1438
|
+
}
|
1439
|
+
}, 25); // END 'sidebarLoaded'
|
1756
1440
|
}, // END updateMacros
|
1757
1441
|
|
1758
1442
|
// -------------------------------------------------------------------------
|
@@ -1760,7 +1444,7 @@ var j1 = (function () {
|
|
1760
1444
|
// Get a log message from the log message catalog object
|
1761
1445
|
// -------------------------------------------------------------------------
|
1762
1446
|
getMessage: function (level, message, property) {
|
1763
|
-
var message = j1.messages[level][message][
|
1447
|
+
var message = j1.messages[level][message]['message'][property];
|
1764
1448
|
|
1765
1449
|
return message;
|
1766
1450
|
}, // END getMessage
|
@@ -1777,49 +1461,6 @@ var j1 = (function () {
|
|
1777
1461
|
return true;
|
1778
1462
|
}, // END logger
|
1779
1463
|
|
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
1464
|
// -------------------------------------------------------------------------
|
1824
1465
|
// Send message
|
1825
1466
|
// -------------------------------------------------------------------------
|
@@ -1831,12 +1472,12 @@ var j1 = (function () {
|
|
1831
1472
|
if ( receiver === 'j1' ) {
|
1832
1473
|
logText = 'send message from ' + sender + ' to' + receiver + ': ' + json_message;
|
1833
1474
|
logger.debug(logText);
|
1834
|
-
executeFunctionByName('j1' + '.messageHandler', window, sender, message)
|
1475
|
+
executeFunctionByName('j1' + '.messageHandler', window, sender, message);
|
1835
1476
|
} else {
|
1836
1477
|
logText = 'send message from ' + sender + ' to ' + receiver + ': ' + json_message;
|
1837
1478
|
logger.debug(logText);
|
1838
1479
|
//executeFunctionByName('j1.' + receiver + '.messageHandler', window, sender, message)
|
1839
|
-
executeFunctionByName(receiver + '.messageHandler', window, sender, message)
|
1480
|
+
executeFunctionByName(receiver + '.messageHandler', window, sender, message);
|
1840
1481
|
}
|
1841
1482
|
|
1842
1483
|
}, // END sendMessage
|
@@ -1869,7 +1510,7 @@ var j1 = (function () {
|
|
1869
1510
|
|
1870
1511
|
// -------------------------------------------------------------------------
|
1871
1512
|
// getStyleValue:
|
1872
|
-
//
|
1513
|
+
// Returns the value of a style from a css class definition
|
1873
1514
|
// example: j1.getStyleValue('bg-primary', 'background-color')
|
1874
1515
|
getStyleValue: function (className, style) {
|
1875
1516
|
var elementId = 'test-' + className,
|
@@ -1941,58 +1582,93 @@ var j1 = (function () {
|
|
1941
1582
|
// -----------------------------------------------------------------------
|
1942
1583
|
$('head').append('<style>.btn-viewer:hover { background-color: ' +bg_primary+ ' !important; }</style>');
|
1943
1584
|
|
1944
|
-
// clipboard
|
1945
|
-
// -----------------------------------------------------------------------
|
1946
|
-
$('head').append('<style>.btn-clipboard:hover { background-color: ' +bg_primary+ ' !important; }</style>');
|
1947
|
-
|
1948
1585
|
// extended modals
|
1949
1586
|
// -----------------------------------------------------------------------
|
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');
|
1587
|
+
// var tabs_pills_link_color_active = j1.setColorData('md_blue'); // j1.getStyleValue('btn-info', 'background-color');
|
1588
|
+
// var tabs_pills_link_color_hover = j1.setColorData('md_gray_300'); // j1.getStyleValue('btn-secondary', 'background-color');
|
1589
|
+
|
1590
|
+
// var tabs_pills_link_color_active = 'mdi-blue';
|
1591
|
+
// var tabs_pills_link_color_hover = 'mdi-gray-300';
|
1952
1592
|
|
1953
1593
|
// nav module
|
1954
1594
|
// -----------------------------------------------------------------------
|
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>');
|
1595
|
+
// $('head').append('<style>.nav-link:hover { background-color: ' +tabs_pills_link_color_hover+ ' !important; }</style>');
|
1596
|
+
// $('head').append('<style>.nav-link.active { background-color: ' +tabs_pills_link_color_active+ ' !important; }</style>');
|
1957
1597
|
|
1958
1598
|
return true;
|
1959
1599
|
}, // END setCss
|
1960
1600
|
|
1961
1601
|
// -------------------------------------------------------------------------
|
1962
|
-
//
|
1602
|
+
// setState()
|
1603
|
+
// Set the current (processing) state of the module
|
1963
1604
|
// -------------------------------------------------------------------------
|
1964
1605
|
setState: function (stat) {
|
1965
|
-
state= stat;
|
1966
|
-
//j1.state stat;
|
1606
|
+
state = stat;
|
1967
1607
|
}, // end setState
|
1968
1608
|
|
1969
1609
|
// -------------------------------------------------------------------------
|
1970
|
-
//
|
1610
|
+
// getState()
|
1611
|
+
// Returns the current (processing) state of the module
|
1971
1612
|
// -------------------------------------------------------------------------
|
1972
1613
|
getState: function () {
|
1973
|
-
// return j1.state;
|
1974
1614
|
return state;
|
1975
1615
|
}, // end getState
|
1976
1616
|
|
1977
1617
|
// -------------------------------------------------------------------------
|
1978
|
-
//
|
1618
|
+
// setXhrDataState()
|
1619
|
+
// Set the final (loading) state of an element (partial) loaded via Xhr
|
1620
|
+
// -------------------------------------------------------------------------
|
1621
|
+
setXhrDataState: function (obj, stat) {
|
1622
|
+
j1.xhrDataState[obj] = stat;
|
1623
|
+
}, // END setXhrDataState
|
1624
|
+
|
1625
|
+
// -------------------------------------------------------------------------
|
1626
|
+
// getXhrDataState()
|
1627
|
+
// Returns the final (loading) state of an element (partial) loaded via Xhr
|
1628
|
+
// -------------------------------------------------------------------------
|
1629
|
+
getXhrDataState: function (obj) {
|
1630
|
+
return j1.xhrDataState[obj];
|
1631
|
+
}, // END getXhrDataState
|
1632
|
+
|
1633
|
+
// -------------------------------------------------------------------------
|
1634
|
+
// setXhrDomState()
|
1635
|
+
// Set the state of an element loaded via Xhr that is
|
1636
|
+
// successfully added to the DOM
|
1637
|
+
// -------------------------------------------------------------------------
|
1638
|
+
setXhrDomState: function (obj, stat) {
|
1639
|
+
j1.xhrDOMState[obj] = stat;
|
1640
|
+
}, // END setXhrDomState
|
1641
|
+
|
1642
|
+
// -------------------------------------------------------------------------
|
1643
|
+
// getXhrDataState()
|
1644
|
+
// Returns the state of an element loaded via Xhr that is
|
1645
|
+
// successfully added to the DOM
|
1646
|
+
// -------------------------------------------------------------------------
|
1647
|
+
getXhrDOMState: function (obj) {
|
1648
|
+
return j1.xhrDOMState[obj];
|
1649
|
+
}, // END getXhrDOMState
|
1650
|
+
|
1651
|
+
// -------------------------------------------------------------------------
|
1652
|
+
// setMode()
|
1653
|
+
// Set the current mode of the site (web|app)
|
1979
1654
|
// -------------------------------------------------------------------------
|
1980
1655
|
setMode: function (mod) {
|
1981
1656
|
mode = mod;
|
1982
1657
|
}, // END setMode
|
1983
1658
|
|
1984
1659
|
// -------------------------------------------------------------------------
|
1985
|
-
//
|
1660
|
+
// getMode()
|
1661
|
+
// Returns the current mode of the site (web|app)
|
1986
1662
|
// -------------------------------------------------------------------------
|
1987
1663
|
getMode: function () {
|
1988
1664
|
return mode;
|
1989
1665
|
}, // END getMode
|
1990
1666
|
|
1991
1667
|
// -------------------------------------------------------------------------
|
1992
|
-
//
|
1993
|
-
//
|
1668
|
+
// checkUserAgent()
|
1669
|
+
// Returns the name (UA) of the web browser
|
1994
1670
|
// -------------------------------------------------------------------------
|
1995
|
-
checkUserAgent: function (
|
1671
|
+
checkUserAgent: function () {
|
1996
1672
|
if (navigator.userAgent.search(ua_name) >= 0) {
|
1997
1673
|
return true;
|
1998
1674
|
} else {
|
@@ -2001,21 +1677,38 @@ var j1 = (function () {
|
|
2001
1677
|
}, // END checkUserAgent
|
2002
1678
|
|
2003
1679
|
// -------------------------------------------------------------------------
|
2004
|
-
//
|
1680
|
+
// checkUserAgent()
|
1681
|
+
// Returns the name (UA) of the web browser
|
1682
|
+
// -------------------------------------------------------------------------
|
1683
|
+
generateId: function (length) {
|
1684
|
+
var result = '';
|
1685
|
+
var characters = 'abcdefghijklmnopqrstuvwxyz0123456789';
|
1686
|
+
var charactersLength = characters.length;
|
1687
|
+
for ( var i = 0; i < length; i++ ) {
|
1688
|
+
result += characters.charAt(Math.floor(Math.random() * charactersLength));
|
1689
|
+
}
|
1690
|
+
return result;
|
1691
|
+
}, // END checkUserAgent
|
1692
|
+
|
1693
|
+
// -------------------------------------------------------------------------
|
1694
|
+
// getTrue()
|
1695
|
+
// Returns always true (for testing purposes)
|
2005
1696
|
// -------------------------------------------------------------------------
|
2006
1697
|
getTrue: function () {
|
2007
1698
|
return true;
|
2008
1699
|
}, // END isTrue
|
2009
1700
|
|
2010
1701
|
// -------------------------------------------------------------------------
|
2011
|
-
//
|
1702
|
+
// getFalse()
|
1703
|
+
// Returns always false (for testing purposes)
|
2012
1704
|
// -------------------------------------------------------------------------
|
2013
1705
|
getFalse: function () {
|
2014
1706
|
return false;
|
2015
1707
|
}, // END isTrue
|
2016
1708
|
|
2017
1709
|
// -------------------------------------------------------------------------
|
2018
|
-
//
|
1710
|
+
// goHome()
|
1711
|
+
// Redirect current page to the browser homepage
|
2019
1712
|
// -------------------------------------------------------------------------
|
2020
1713
|
goHome: function () {
|
2021
1714
|
// most browsers
|
@@ -2023,16 +1716,28 @@ var j1 = (function () {
|
|
2023
1716
|
window.home();
|
2024
1717
|
} else if (document.all) {
|
2025
1718
|
// for IE
|
2026
|
-
window.location.href =
|
1719
|
+
window.location.href = 'about:home';
|
2027
1720
|
} else {
|
2028
|
-
window.location.href =
|
1721
|
+
window.location.href = 'about:blank';
|
2029
1722
|
}
|
2030
|
-
} // END gohome
|
1723
|
+
}, // END gohome
|
2031
1724
|
|
2032
|
-
|
1725
|
+
// -------------------------------------------------------------------------
|
1726
|
+
// goBack()
|
1727
|
+
// Redirect current page to last visited page (referrer)
|
1728
|
+
// -------------------------------------------------------------------------
|
1729
|
+
goBack: function () {
|
1730
|
+
// where visitor has come from
|
1731
|
+
window.location.href = document.referrer;
|
1732
|
+
} // END goBack
|
1733
|
+
|
1734
|
+
}; // END j1 (return)
|
2033
1735
|
}) (j1, window);
|
2034
1736
|
|
2035
1737
|
{% endcapture %}
|
2036
|
-
|
2037
|
-
{{ cache |
|
1738
|
+
{% if production %}
|
1739
|
+
{{ cache | minifyJS }}
|
1740
|
+
{% else %}
|
1741
|
+
{{ cache | strip_empty_lines }}
|
1742
|
+
{% endif %}
|
2038
1743
|
{% assign cache = nil %}
|