j1-template 2020.0.13 → 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/footer/boxes/about_box.proc +1 -1
- data/_includes/themes/j1/blocks/footer/boxes/links_box.proc +1 -1
- data/_includes/themes/j1/blocks/footer/boxes/news_box.proc +2 -2
- data/_includes/themes/j1/layouts/content_generator_page.html +23 -23
- data/_includes/themes/j1/modules/navigator/procedures/topsearch.proc +1 -1
- 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 +10 -10
- data/_layouts/default.html +60 -54
- data/apps/public/cc/index.adoc +2 -6
- data/assets/data/authclient.html +5 -5
- data/assets/data/banner.html +2 -2
- data/assets/data/{cookie_consent.html → cookiebar.html} +76 -50
- data/assets/data/footer.html +1 -3
- data/assets/data/gallery_customizer.html +3 -3
- 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/menu.html +3 -3
- data/assets/data/mmenu.html +3 -3
- data/assets/data/mmenu_sidebar.html +2 -2
- data/assets/data/mmenu_toc.html +2 -2
- data/assets/data/panel.html +18 -17
- data/assets/data/quicklinks.html +17 -17
- data/assets/data/search.json +81 -80
- data/assets/data/ssm.html +2 -2
- data/assets/data/twa_v1.json +6978 -6980
- data/assets/themes/j1/adapter/js/algolia.js +16 -14
- data/assets/themes/j1/adapter/js/attic.js +25 -33
- data/assets/themes/j1/adapter/js/carousel.js +15 -11
- data/assets/themes/j1/adapter/js/clipboard.js +19 -17
- data/assets/themes/j1/adapter/js/cookiebar.js +204 -0
- data/assets/themes/j1/adapter/js/framer.js +27 -19
- data/assets/themes/j1/adapter/js/gallery_customizer.js +219 -248
- data/assets/themes/j1/adapter/js/j1.js +273 -153
- data/assets/themes/j1/adapter/js/jf_gallery.js +21 -20
- data/assets/themes/j1/adapter/js/lightbox.js +9 -8
- data/assets/themes/j1/adapter/js/logger.js +2 -4
- data/assets/themes/j1/adapter/js/mdb.js +27 -30
- data/assets/themes/j1/adapter/js/mmenu.js +47 -51
- data/assets/themes/j1/adapter/js/navigator.js +153 -123
- data/assets/themes/j1/adapter/js/searcher.js +18 -12
- data/assets/themes/j1/adapter/js/ssm.js +82 -82
- data/assets/themes/j1/adapter/js/themer.js +72 -78
- data/assets/themes/j1/adapter/js/toccer.js +11 -9
- 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 +99 -1697
- 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 +128 -1680
- data/assets/themes/j1/core/css/uno.min.css +1 -1
- data/assets/themes/j1/core/css/vendor.css +767 -33164
- data/assets/themes/j1/core/css/vendor.min.css +2 -9
- data/assets/themes/j1/core/js/template.js +26 -347
- 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/{extensions → modules}/bsDatepicker/css/datepicker.css +1 -1
- data/assets/themes/j1/{extensions → modules}/bsDatepicker/css/theme/uno.css +1 -1
- data/assets/themes/j1/{extensions → modules}/bsDatepicker/js/datepicker.js +1 -1
- data/assets/themes/j1/{extensions → modules}/bsDatepicker/less/datepicker.less +0 -0
- data/assets/themes/j1/{extensions → modules}/bsThemeSwitcher/js/switcher.js +19 -10
- data/assets/themes/j1/{extensions → modules}/bsThemeSwitcher/js/switcher.min.js +1 -1
- 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/{extensions → modules}/clipboard/LICENSE +0 -0
- data/assets/themes/j1/{extensions → modules}/clipboard/css/theme/uno.css +1 -1
- data/assets/themes/j1/{extensions → modules}/clipboard/css/theme/uno.min.css +1 -1
- data/assets/themes/j1/{extensions → modules}/clipboard/js/clipboard.js +0 -0
- data/assets/themes/j1/{extensions → modules}/clipboard/js/clipboard.min.js +0 -0
- data/assets/themes/j1/{extensions → modules}/iconifyAPI/js/iconify.min.js +0 -0
- data/assets/themes/j1/{extensions → modules}/iframeResizer/LICENSE +0 -0
- data/assets/themes/j1/{extensions → modules}/iframeResizer/examples/frame.absolute.html +0 -0
- data/assets/themes/j1/{extensions → modules}/iframeResizer/examples/frame.content.html +0 -0
- data/assets/themes/j1/{extensions → modules}/iframeResizer/examples/frame.hover.html +0 -0
- data/assets/themes/j1/{extensions → modules}/iframeResizer/examples/frame.nested.html +0 -0
- data/assets/themes/j1/{extensions → modules}/iframeResizer/examples/frame.textarea.html +0 -0
- data/assets/themes/j1/{extensions → modules}/iframeResizer/examples/frame.tolerance.html +0 -0
- data/assets/themes/j1/{extensions → modules}/iframeResizer/examples/index.html +0 -0
- data/assets/themes/j1/{extensions → modules}/iframeResizer/examples/two.html +0 -0
- data/assets/themes/j1/{extensions → modules}/iframeResizer/js/client/iframeResizer.contentWindow.js +0 -0
- data/assets/themes/j1/{extensions → modules}/iframeResizer/js/client/iframeResizer.contentWindow.map +0 -0
- data/assets/themes/j1/{extensions → modules}/iframeResizer/js/client/iframeResizer.contentWindow.min.js +0 -0
- data/assets/themes/j1/{extensions → modules}/iframeResizer/js/iframeResizer.js +0 -0
- data/assets/themes/j1/{extensions → modules}/iframeResizer/js/iframeResizer.map +0 -0
- data/assets/themes/j1/{extensions → modules}/iframeResizer/js/iframeResizer.min.js +0 -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/{extensions → modules}/jqMouseWheel/README.md +0 -0
- data/assets/themes/j1/{extensions → modules}/jqMouseWheel/js/jquery.mousewheel.js +0 -0
- data/assets/themes/j1/{extensions → modules}/jqMouseWheel/js/jquery.mousewheel.min.js +0 -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 → modules}/justifiedGallery/LICENSE +0 -0
- data/assets/themes/j1/{extensions → modules}/justifiedGallery/README.md +0 -0
- data/assets/themes/j1/{extensions → modules}/justifiedGallery/_versions/v3.7.0/css/justifiedGallery.css +0 -0
- data/assets/themes/j1/{extensions → modules}/justifiedGallery/_versions/v3.7.0/css/justifiedGallery.min.css +0 -0
- data/assets/themes/j1/{extensions/justifiedGallery/_versions/v4.0.0 → modules/justifiedGallery/_versions/v3.7.0}/css/theme/uno.css +1 -1
- data/assets/themes/j1/{extensions → modules}/justifiedGallery/_versions/v3.7.0/js/justifiedGallery.3.7.0.js +0 -0
- data/assets/themes/j1/{extensions → modules}/justifiedGallery/_versions/v3.7.0/js/justifiedGallery.js +0 -0
- data/assets/themes/j1/{extensions → modules}/justifiedGallery/_versions/v3.7.0/js/justifiedGallery.min.js +0 -0
- data/assets/themes/j1/{extensions → modules}/justifiedGallery/_versions/v3.7.0/less/.csslintrc +0 -0
- data/assets/themes/j1/{extensions → modules}/justifiedGallery/_versions/v3.7.0/less/justifiedGallery.less +0 -0
- data/assets/themes/j1/{extensions → modules}/justifiedGallery/_versions/v4.0.0/css/justifiedGallery.css +0 -0
- data/assets/themes/j1/{extensions → modules}/justifiedGallery/_versions/v4.0.0/css/justifiedGallery.min.css +0 -0
- data/assets/themes/j1/{extensions/justifiedGallery/_versions/v3.7.0 → modules/justifiedGallery/_versions/v4.0.0}/css/theme/uno.css +1 -1
- data/assets/themes/j1/{extensions → modules}/justifiedGallery/_versions/v4.0.0/js/jquery.justifiedGallery.js +0 -0
- data/assets/themes/j1/{extensions → modules}/justifiedGallery/_versions/v4.0.0/js/jquery.justifiedGallery.min.js +0 -0
- data/assets/themes/j1/{extensions → modules}/justifiedGallery/css/justifiedGallery.css +0 -0
- data/assets/themes/j1/{extensions → modules}/justifiedGallery/css/justifiedGallery.min.css +0 -0
- data/assets/themes/j1/{extensions → modules}/justifiedGallery/css/theme/uno.css +1 -1
- data/assets/themes/j1/{extensions → modules}/justifiedGallery/css/theme/uno.min.css +1 -1
- data/assets/themes/j1/{extensions → modules}/justifiedGallery/js/justifiedGallery.js +0 -0
- data/assets/themes/j1/{extensions → modules}/justifiedGallery/js/justifiedGallery.min.js +0 -0
- data/assets/themes/j1/{extensions → modules}/lightGallery/css/core/lg-fb-comment-box.css +0 -0
- data/assets/themes/j1/{extensions → modules}/lightGallery/css/core/lg-fb-comment-box.min.css +0 -0
- data/assets/themes/j1/{extensions → modules}/lightGallery/css/core/lg-transitions.css +0 -0
- data/assets/themes/j1/{extensions → modules}/lightGallery/css/core/lg-transitions.min.css +0 -0
- data/assets/themes/j1/{extensions → modules}/lightGallery/css/core/lightgallery.css +0 -0
- data/assets/themes/j1/{extensions → modules}/lightGallery/css/core/lightgallery.min.css +0 -0
- data/assets/themes/j1/{extensions → modules}/lightGallery/css/fonts/lg.eot +0 -0
- data/assets/themes/j1/{extensions → modules}/lightGallery/css/fonts/lg.svg +0 -0
- data/assets/themes/j1/{extensions → modules}/lightGallery/css/fonts/lg.ttf +0 -0
- data/assets/themes/j1/{extensions → modules}/lightGallery/css/fonts/lg.woff +0 -0
- data/assets/themes/j1/{extensions → modules}/lightGallery/css/img/loading.gif +0 -0
- data/assets/themes/j1/{extensions → modules}/lightGallery/css/img/video-play.png +0 -0
- data/assets/themes/j1/{extensions → modules}/lightGallery/css/img/vimeo-play.png +0 -0
- data/assets/themes/j1/{extensions → modules}/lightGallery/css/img/youtube-play.png +0 -0
- data/assets/themes/j1/{extensions → modules}/lightGallery/css/themes/icons/animation-w.png +0 -0
- data/assets/themes/j1/{extensions → modules}/lightGallery/css/themes/icons/customize-w.png +0 -0
- data/assets/themes/j1/{extensions → modules}/lightGallery/css/themes/icons/dynamic-w.png +0 -0
- data/assets/themes/j1/{extensions → modules}/lightGallery/css/themes/icons/facebook-icon.svg +0 -0
- data/assets/themes/j1/{extensions → modules}/lightGallery/css/themes/icons/googleplus-icon.svg +0 -0
- data/assets/themes/j1/{extensions → modules}/lightGallery/css/themes/icons/html5-w.png +0 -0
- data/assets/themes/j1/{extensions → modules}/lightGallery/css/themes/icons/linked-in.png +0 -0
- data/assets/themes/j1/{extensions → modules}/lightGallery/css/themes/icons/module-w.png +0 -0
- data/assets/themes/j1/{extensions → modules}/lightGallery/css/themes/icons/play-button.png +0 -0
- data/assets/themes/j1/{extensions → modules}/lightGallery/css/themes/icons/responsive-w.png +0 -0
- data/assets/themes/j1/{extensions → modules}/lightGallery/css/themes/icons/thumb-w.png +0 -0
- data/assets/themes/j1/{extensions → modules}/lightGallery/css/themes/icons/touch-w.png +0 -0
- data/assets/themes/j1/{extensions → modules}/lightGallery/css/themes/icons/twitter-icon.svg +0 -0
- data/assets/themes/j1/{extensions → modules}/lightGallery/css/themes/icons/twitter.png +0 -0
- data/assets/themes/j1/{extensions → modules}/lightGallery/css/themes/icons/video1-w.png +0 -0
- data/assets/themes/j1/{extensions → modules}/lightGallery/css/themes/icons/zoom-w.png +0 -0
- data/assets/themes/j1/{extensions → modules}/lightGallery/css/themes/icons/zoom.png +0 -0
- data/assets/themes/j1/{extensions → modules}/lightGallery/css/themes/uno.css +1 -1
- data/assets/themes/j1/{extensions → modules}/lightGallery/css/themes/uno.min.css +1 -1
- data/assets/themes/j1/{extensions → modules}/lightGallery/js/core/lightgallery.js +0 -0
- data/assets/themes/j1/{extensions → modules}/lightGallery/js/core/lightgallery.min.js +0 -0
- data/assets/themes/j1/{extensions → modules}/lightGallery/js/modules/j1/j1-video.js +0 -0
- data/assets/themes/j1/{extensions → modules}/lightGallery/js/modules/j1/j1-video.min.js +0 -0
- data/assets/themes/j1/{extensions → modules}/lightGallery/js/modules/lg-autoplay.js +0 -0
- data/assets/themes/j1/{extensions → modules}/lightGallery/js/modules/lg-autoplay.min.js +0 -0
- data/assets/themes/j1/{extensions → modules}/lightGallery/js/modules/lg-fullscreen.js +0 -0
- data/assets/themes/j1/{extensions → modules}/lightGallery/js/modules/lg-fullscreen.min.js +0 -0
- data/assets/themes/j1/{extensions → modules}/lightGallery/js/modules/lg-hash.js +0 -0
- data/assets/themes/j1/{extensions → modules}/lightGallery/js/modules/lg-hash.min.js +0 -0
- data/assets/themes/j1/{extensions → modules}/lightGallery/js/modules/lg-pager.js +0 -0
- data/assets/themes/j1/{extensions → modules}/lightGallery/js/modules/lg-pager.min.js +0 -0
- data/assets/themes/j1/{extensions → modules}/lightGallery/js/modules/lg-share.js +0 -0
- data/assets/themes/j1/{extensions → modules}/lightGallery/js/modules/lg-share.min.js +0 -0
- data/assets/themes/j1/{extensions → modules}/lightGallery/js/modules/lg-thumbnail.js +0 -0
- data/assets/themes/j1/{extensions → modules}/lightGallery/js/modules/lg-thumbnail.min.js +0 -0
- data/assets/themes/j1/{extensions → modules}/lightGallery/js/modules/lg-video.js +0 -0
- data/assets/themes/j1/{extensions → modules}/lightGallery/js/modules/lg-video.min.js +0 -0
- data/assets/themes/j1/{extensions → modules}/lightGallery/js/modules/lg-zoom.js +0 -0
- data/assets/themes/j1/{extensions → modules}/lightGallery/js/modules/lg-zoom.min.js +0 -0
- data/assets/themes/j1/{extensions → modules}/lightbox/LICENSE +0 -0
- data/assets/themes/j1/{extensions → modules}/lightbox/css/lightbox.css +1 -1
- data/assets/themes/j1/{extensions → modules}/lightbox/css/lightbox.min.css +1 -1
- data/assets/themes/j1/{extensions → modules}/lightbox/css/theme/uno.css +1 -1
- data/assets/themes/j1/{extensions → modules}/lightbox/css/theme/uno.min.css +1 -1
- data/assets/themes/j1/{extensions → modules}/lightbox/images/close.png +0 -0
- data/assets/themes/j1/{extensions → modules}/lightbox/images/loading.gif +0 -0
- data/assets/themes/j1/{extensions → modules}/lightbox/images/next.png +0 -0
- data/assets/themes/j1/{extensions → modules}/lightbox/images/prev.png +0 -0
- data/assets/themes/j1/{extensions → modules}/lightbox/js/lightbox.js +0 -0
- data/assets/themes/j1/{extensions → modules}/lightbox/js/lightbox.min.js +0 -0
- data/assets/themes/j1/{extensions → modules}/mmenuLight/css/mmenu.css +1 -1
- data/assets/themes/j1/{extensions → modules}/mmenuLight/css/mmenu.min.css +0 -0
- data/assets/themes/j1/{extensions/mmenuLight/css/theme/uno.min.css → modules/mmenuLight/css/theme/uno.css} +21 -12
- data/assets/themes/j1/{extensions/mmenuLight/css/theme/uno.css → modules/mmenuLight/css/theme/uno.min.css} +2 -2
- data/assets/themes/j1/modules/mmenuLight/js/mmenu.js +563 -0
- data/assets/themes/j1/{extensions/mmenuLight/js/mmenu.js → modules/mmenuLight/js/mmenu.min.js} +1 -1
- data/assets/themes/j1/{extensions → modules}/noUISlider/LICENSE +0 -0
- data/assets/themes/j1/{extensions → modules}/noUISlider/css/nouislider.css +0 -0
- data/assets/themes/j1/{extensions → modules}/noUISlider/css/nouislider.min.css +0 -0
- data/assets/themes/j1/{extensions → modules}/noUISlider/js/nouislider.js +0 -0
- data/assets/themes/j1/{extensions → modules}/noUISlider/js/nouislider.min.js +0 -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/{extensions → modules}/twemoji/js/LICENSE +0 -0
- data/assets/themes/j1/{extensions → modules}/twemoji/js/picker/LICENSE +0 -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/{extensions → modules}/twemoji/js/twemoji.js +0 -1
- 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/modules/util/js/log4javascript.js +264 -0
- 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 +3 -3
- data/lib/starter_web/Gemfile +10 -10
- data/lib/starter_web/_config.yml +4 -4
- data/lib/starter_web/_data/blocks/banner.yml +2 -2
- data/lib/starter_web/_data/blocks/panel.yml +8 -8
- data/lib/starter_web/_data/modules/attics.yml +1 -1
- data/lib/starter_web/_data/modules/cookiebar.yml +2 -2
- data/lib/starter_web/_data/modules/defaults/attics.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/cookiebar.yml +101 -50
- data/lib/starter_web/_data/modules/navigator_menu.yml +3 -4
- data/lib/starter_web/_data/modules/themer.yml +9 -9
- data/lib/starter_web/_data/resources.yml +247 -170
- data/lib/starter_web/_data/template_settings.yml +11 -10
- data/lib/starter_web/_plugins/asciidoctor-extensions/banner.rb +43 -0
- data/lib/starter_web/_plugins/asciidoctor-extensions/panel.rb +43 -0
- data/lib/starter_web/_plugins/{asciidoctor-extensions/lorem-inline.rb → lorem-inline.rb} +0 -0
- 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/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 +2 -2
- 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/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 +16 -18
- 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/419_advanced_modals_html.asciidoc +3 -3
- data/lib/starter_web/pages/public/learn/roundtrip/100_present_images.adoc +1 -1
- 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 +4 -1
- data/lib/starter_web/pages/public/learn/roundtrip/300_icon_fonts.adoc +3 -3
- data/lib/starter_web/pages/public/learn/roundtrip/400_asciidoc_extensions.adoc +2 -2
- 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 +3 -3
- data/lib/starter_web/pages/public/learn/roundtrip/500_themes.adoc +20 -22
- data/lib/starter_web/pages/public/{previewer/mdb_preview → learn/roundtrip/510_mdb_preview}/000_includes/attributes.asciidoc +0 -0
- data/lib/starter_web/pages/public/{previewer/mdb_preview → learn/roundtrip/510_mdb_preview}/000_includes/documents/100_buttons.asciidoc +0 -0
- data/lib/starter_web/pages/public/{previewer/mdb_preview → learn/roundtrip/510_mdb_preview}/mdb_previewer.adoc +0 -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/419_advanced_modals_html.asciidoc +5 -5
- data/lib/starter_web/pages/public/learn/whats_up.adoc +2 -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 +1 -1
- data/lib/starter_web/pages/public/previewer/bootstrap_theme.adoc +9 -9
- data/lib/starter_web/pages/public/previewer/iframer.adoc +4 -3
- data/lib/starter_web/pages/public/previewer/mdi_icons_preview.adoc +2 -2
- data/lib/starter_web/pages/public/previewer/twitter_emoji_preview.adoc +1 -1
- 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 +284 -241
- data/assets/themes/j1/adapter/js/cookie_consent.js +0 -286
- 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/twemoji/js/picker/twemoji-picker.js +0 -21
- data/assets/themes/j1/extensions/twemoji/js/picker/twemoji-picker.min.js +0 -21
- data/assets/themes/j1/extensions/twemoji/js/twemoji.min.js +0 -25
- data/lib/starter_web/_data/modules/cookie_consent.yml +0 -36
- 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.jpg +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/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
- data/lib/starter_web/pages/public/clear_button.adoc +0 -121
@@ -236,11 +236,16 @@ var j1 = (function () {
|
|
236
236
|
// global var (function)
|
237
237
|
// -----------------------------------------------------------------------
|
238
238
|
var logger = log4javascript.getLogger('j1.init');
|
239
|
-
var url = new
|
239
|
+
var url = new liteURL(window.location.href);
|
240
240
|
var baseUrl = url.origin;
|
241
|
-
|
242
|
-
|
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();
|
243
245
|
var curr_state = 'started';
|
246
|
+
// var date = new Date();
|
247
|
+
// var my_timestamp = date.toISOString();
|
248
|
+
|
244
249
|
|
245
250
|
// -----------------------------------------------------------------------
|
246
251
|
// options loader
|
@@ -253,6 +258,13 @@ var j1 = (function () {
|
|
253
258
|
options
|
254
259
|
);
|
255
260
|
|
261
|
+
// -----------------------------------------------------------------------
|
262
|
+
// status settings
|
263
|
+
// save status into the adapter object for (later) global access
|
264
|
+
// -----------------------------------------------------------------------
|
265
|
+
j1['xhrDataState'] = {};
|
266
|
+
j1['xhrDOMState'] = {};
|
267
|
+
|
256
268
|
// -----------------------------------------------------------------------
|
257
269
|
// session ON_CLOSE event
|
258
270
|
// wrapup if ALL browser windows get closed. Update user STATE
|
@@ -263,8 +275,10 @@ var j1 = (function () {
|
|
263
275
|
var cookie_names = j1.getCookieNames();
|
264
276
|
var cookie_user_state_name = cookie_names.user_state;
|
265
277
|
var cookie_user_session_name = cookie_names.user_session;
|
266
|
-
|
267
|
-
|
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();
|
268
282
|
var user_state = j1.readCookie(cookie_user_state_name);
|
269
283
|
var ep_status;
|
270
284
|
var url;
|
@@ -312,7 +326,7 @@ var j1 = (function () {
|
|
312
326
|
// -----------------------------------------------------------------------
|
313
327
|
// if (user_session.mode === 'na' || user_session.mode === 'app') {
|
314
328
|
if (user_session.mode === 'na') {
|
315
|
-
var url = new
|
329
|
+
var url = new liteURL(window.location.href);
|
316
330
|
var ep_status = baseUrl + '/status' + '?page=' + window.location.pathname;
|
317
331
|
var detectTimeout = 50;
|
318
332
|
|
@@ -359,12 +373,16 @@ var j1 = (function () {
|
|
359
373
|
logger.info('state: ' + j1.getState());
|
360
374
|
}, detectTimeout);
|
361
375
|
});
|
362
|
-
} else {
|
376
|
+
} else { // app mode
|
363
377
|
state = 'started';
|
364
378
|
logger.info('state: ' + state);
|
365
379
|
logger.info('page is being initialized');
|
366
380
|
}
|
367
381
|
|
382
|
+
// jadams: for testing only
|
383
|
+
// display page
|
384
|
+
// $('#no_flicker').css('display', 'block');
|
385
|
+
|
368
386
|
state = 'started';
|
369
387
|
logger.info('state: ' + state);
|
370
388
|
logger.info('page is being initialized');
|
@@ -387,7 +405,7 @@ var j1 = (function () {
|
|
387
405
|
// see: https://developer.mozilla.org/de/docs/Web/API/Window/history
|
388
406
|
//
|
389
407
|
user_session.timestamp = timestamp_now;
|
390
|
-
referrer = new
|
408
|
+
referrer = new liteURL(document.referrer);
|
391
409
|
current_page = window.location.pathname;
|
392
410
|
user_session.requested_page = current_page;
|
393
411
|
user_session.previous_page = referrer.search === '' ?
|
@@ -405,17 +423,17 @@ var j1 = (function () {
|
|
405
423
|
last_pager = user_session.last_pager;
|
406
424
|
}
|
407
425
|
|
426
|
+
// jadams: for testing only
|
427
|
+
// display page
|
428
|
+
//$('#no_flicker').css('display', 'block');
|
429
|
+
|
408
430
|
logger.info('update user session cookie');
|
409
431
|
j1.writeCookie({
|
410
432
|
name: cookie_names.user_session,
|
411
433
|
data: user_session
|
412
434
|
});
|
413
435
|
|
414
|
-
|
415
|
-
See: https://stackoverflow.com/questions/3709597/wait-until-all-jquery-ajax-requests-are-done
|
416
|
-
Load J1 Template data objects 'asychronously'
|
417
|
-
-------------------------------------------------------------------------- {% endcomment %}
|
418
|
-
// initialize page resources for global modules
|
436
|
+
// initialize page resources for blocks
|
419
437
|
// (asynchronous, should be rewitten to xhrData)
|
420
438
|
j1.initBanner(settings);
|
421
439
|
j1.initPanel(settings);
|
@@ -446,10 +464,11 @@ var j1 = (function () {
|
|
446
464
|
// AJAX fetcher to load and place all banner used for a page
|
447
465
|
// -------------------------------------------------------------------------
|
448
466
|
initBanner: function (options) {
|
449
|
-
var logger
|
450
|
-
var banner
|
451
|
-
var bannerOptions
|
452
|
-
var mod
|
467
|
+
var logger = log4javascript.getLogger('j1.initBanner');
|
468
|
+
var banner = [];
|
469
|
+
var bannerOptions = [];
|
470
|
+
var mod = 'j1';
|
471
|
+
var logText;
|
453
472
|
|
454
473
|
{% comment %}
|
455
474
|
Closure to pass additional data (e.g. #banner_id) to AJAX load callback
|
@@ -458,12 +477,19 @@ var j1 = (function () {
|
|
458
477
|
var cb_load_closure = function(banner_id) {
|
459
478
|
return function ( responseTxt, statusTxt, xhr ) {
|
460
479
|
if ( statusTxt == 'success' ) {
|
480
|
+
var logger = log4javascript.getLogger('j1.xhrData');
|
461
481
|
logText = 'loading banner completed on id: ' +banner_id;
|
482
|
+
$(banner_id).addClass("mutated");
|
462
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);
|
463
487
|
}
|
464
488
|
if ( statusTxt == 'error' ) {
|
465
489
|
logText = 'loading banner failed on id: ' +banner_id+ ', error: ' + xhr.status + ': ' + xhr.statusText;
|
466
490
|
logger.error(logText);
|
491
|
+
j1.setXhrDataState(banner_id, statusTxt);
|
492
|
+
j1.setXhrDomState(banner_id, statusTxt);
|
467
493
|
// Set|Log status
|
468
494
|
state = 'failed';
|
469
495
|
logger.error('state: ' + state);
|
@@ -530,14 +556,14 @@ var j1 = (function () {
|
|
530
556
|
logText = 'loading banner on id: ' +banner[i];
|
531
557
|
logger.info(logText);
|
532
558
|
var banner_data_path = '{{banner_data_path}} ' + id + ' > *';
|
533
|
-
selector.load(
|
559
|
+
selector.load(banner_data_path, cb_load_closure(id));
|
534
560
|
}
|
535
|
-
}
|
561
|
+
} // END for
|
536
562
|
} else {
|
537
563
|
logText = 'no banner found in site';
|
538
564
|
logger.info(logText);
|
565
|
+
return false;
|
539
566
|
}
|
540
|
-
|
541
567
|
return true;
|
542
568
|
}, // END initBanner
|
543
569
|
|
@@ -547,22 +573,34 @@ var j1 = (function () {
|
|
547
573
|
// -------------------------------------------------------------------------
|
548
574
|
// ToDo:
|
549
575
|
initPanel: function ( options ) {
|
550
|
-
var logger
|
551
|
-
var panel
|
552
|
-
var mod
|
576
|
+
var logger = log4javascript.getLogger('j1.initPanel');
|
577
|
+
var panel = [];
|
578
|
+
var mod = 'j1';
|
579
|
+
var logText;
|
553
580
|
|
554
581
|
{% comment %} Closure to pass additional data (e.g. panel_id) to AJAX load callback
|
555
582
|
See: http://stackoverflow.com/questions/939032/jquery-pass-more-parameters-into-callback
|
556
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 %}
|
557
589
|
var cb_load_closure = function(panel_id) {
|
558
590
|
return function ( responseTxt, statusTxt, xhr ) {
|
591
|
+
var logger = log4javascript.getLogger('j1.xhrData');
|
559
592
|
if ( statusTxt == 'success' ) {
|
560
593
|
logText = 'loading panel completed on id: ' +panel_id;
|
561
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);
|
562
598
|
}
|
563
599
|
if ( statusTxt == 'error' ) {
|
564
600
|
logText = 'loading panel failed on id: ' +panel_id+ ', error ' + xhr.status + ': ' + xhr.statusText;
|
565
601
|
logger.error(logText);
|
602
|
+
j1.setXhrDataState(panel_id, statusTxt);
|
603
|
+
j1.setXhrDomState(panel_id, statusTxt);
|
566
604
|
// Set|Log status
|
567
605
|
state = 'Error';
|
568
606
|
logger.error('state: ' + state);
|
@@ -613,7 +651,7 @@ var j1 = (function () {
|
|
613
651
|
{% endfor %} {% comment %} END panel_config {% endcomment %}
|
614
652
|
{% endfor %} {% comment %} END panel_config_settings {% endcomment %}
|
615
653
|
|
616
|
-
if (
|
654
|
+
if (panel.length) {
|
617
655
|
for (var i in panel) {
|
618
656
|
var id = '#' + panel[i];
|
619
657
|
var selector = $(id);
|
@@ -621,14 +659,14 @@ var j1 = (function () {
|
|
621
659
|
logText = 'loading panel on id: ' +panel[i];
|
622
660
|
logger.info(logText);
|
623
661
|
var panel_data_path = '{{panel_data_path}} ' + id + ' > *';
|
624
|
-
selector.load(
|
662
|
+
selector.load(panel_data_path, cb_load_closure(id));
|
625
663
|
}
|
626
|
-
}
|
664
|
+
} // END for
|
627
665
|
} else {
|
628
666
|
logText = 'no panel found in site';
|
629
667
|
logger.info(logText);
|
668
|
+
return false;
|
630
669
|
}
|
631
|
-
|
632
670
|
return true;
|
633
671
|
}, // END initPanel
|
634
672
|
|
@@ -637,21 +675,28 @@ var j1 = (function () {
|
|
637
675
|
// AJAX fetcher to load and place the footer used for a page
|
638
676
|
// -------------------------------------------------------------------------
|
639
677
|
initFooter: function ( options ) {
|
640
|
-
var logger
|
641
|
-
var mod
|
678
|
+
var logger = log4javascript.getLogger('j1.initFooter');
|
679
|
+
var mod = 'j1';
|
680
|
+
var logText;
|
642
681
|
|
643
|
-
logText = '
|
682
|
+
logText = 'loading footer started';
|
644
683
|
logger.info(logText);
|
645
684
|
|
646
685
|
var cb_load_closure = function(footer_id) {
|
647
686
|
return function ( responseTxt, statusTxt, xhr ) {
|
687
|
+
var logger = log4javascript.getLogger('j1.xhrData');
|
648
688
|
if ( statusTxt == 'success' ) {
|
649
689
|
logText = 'footer loaded successfully on id: ' + footer_id;
|
650
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);
|
651
695
|
|
652
|
-
state
|
653
|
-
|
654
|
-
|
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);
|
655
700
|
|
656
701
|
logText = 'initialization finished';
|
657
702
|
logger.info(logText);
|
@@ -659,6 +704,9 @@ var j1 = (function () {
|
|
659
704
|
if ( statusTxt == 'error' ) {
|
660
705
|
logText = 'loading footer failed on id: ' +footer_id+ ', error ' + xhr.status + ': ' + xhr.statusText;
|
661
706
|
logger.error(logText);
|
707
|
+
j1.setXhrDataState(footer_id, statusTxt);
|
708
|
+
j1.setXhrDomState(footer_id, statusTxt);
|
709
|
+
|
662
710
|
// Set|Log status
|
663
711
|
state = 'failed';
|
664
712
|
logger.error('state: ' + state);
|
@@ -672,10 +720,14 @@ var j1 = (function () {
|
|
672
720
|
var selector = $(id);
|
673
721
|
if ( selector.length ) {
|
674
722
|
var footer_data_path = '{{footer_data_path}}';
|
675
|
-
|
676
|
-
|
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;
|
677
730
|
}
|
678
|
-
|
679
731
|
return true;
|
680
732
|
}, // END initFooter
|
681
733
|
|
@@ -692,12 +744,12 @@ var j1 = (function () {
|
|
692
744
|
displayPage: function (options) {
|
693
745
|
var logger = log4javascript.getLogger('j1.displayPage');
|
694
746
|
var flickerTimeout = {{template_config.flicker_timeout}};
|
695
|
-
var url = new
|
747
|
+
var url = new liteURL(window.location.href);
|
696
748
|
var baseUrl = url.origin;
|
697
749
|
var ep_status = baseUrl + '/status' + '?page=' + window.location.pathname;
|
698
750
|
var user_session = j1.readCookie(cookie_names.user_session);
|
699
751
|
var user_state = j1.readCookie(cookie_names.user_state);
|
700
|
-
var current_url = new
|
752
|
+
var current_url = new liteURL(window.location.href);
|
701
753
|
var providerPermissions = {};
|
702
754
|
var provider;
|
703
755
|
var previous_page;
|
@@ -707,8 +759,10 @@ var j1 = (function () {
|
|
707
759
|
logger.info('finalize page');
|
708
760
|
j1.setCss();
|
709
761
|
|
710
|
-
|
711
|
-
|
762
|
+
logText= 'loading page partials: started';
|
763
|
+
logger.info(logText);
|
764
|
+
|
765
|
+
if (j1.appDetected()) { // app mode
|
712
766
|
logger.info('mode detected: app');
|
713
767
|
|
714
768
|
$.when ($.ajax(ep_status))
|
@@ -732,8 +786,8 @@ var j1 = (function () {
|
|
732
786
|
if (
|
733
787
|
j1.authEnabled() &&
|
734
788
|
user_session.page_permission !== 'public' &&
|
735
|
-
categoryAllowed === false
|
736
|
-
{
|
789
|
+
categoryAllowed === false
|
790
|
+
){
|
737
791
|
// redirect to middleware|page_authentication
|
738
792
|
if (data.authenticated === 'true') {
|
739
793
|
var ep_post_authentication = baseUrl + '/post_authentication';
|
@@ -750,19 +804,16 @@ var j1 = (function () {
|
|
750
804
|
// display page
|
751
805
|
$('#no_flicker').css('display', 'block');
|
752
806
|
|
753
|
-
//
|
754
|
-
j1.initMDB();
|
755
|
-
|
756
|
-
// show|hide cookie icon
|
807
|
+
// show|hide cookie icon (should MOVED to Cookiebar ???)
|
757
808
|
if (user_state.cookies_accepted === 'accepted') {
|
758
|
-
//
|
809
|
+
// Display cookie icon
|
759
810
|
logText = 'show cookie icon';
|
760
811
|
logger.info(logText);
|
761
812
|
$('#quickLinksCookieButton').css('display', 'block');
|
762
813
|
} else {
|
763
814
|
logText = 'hide cookie icon';
|
764
815
|
logger.info(logText);
|
765
|
-
//
|
816
|
+
// Display cookie icon
|
766
817
|
$('#quickLinksCookieButton').css('display', 'none');
|
767
818
|
}
|
768
819
|
|
@@ -806,7 +857,7 @@ var j1 = (function () {
|
|
806
857
|
logger.info(logText);
|
807
858
|
}
|
808
859
|
|
809
|
-
// update sidebar for changed
|
860
|
+
// update sidebar for changed theme data
|
810
861
|
logger.info('update sidebar');
|
811
862
|
user_state = j1.readCookie(cookie_names.user_state);
|
812
863
|
current_user_data = j1.mergeData(user_session, user_state);
|
@@ -824,6 +875,10 @@ var j1 = (function () {
|
|
824
875
|
} else { // web mode
|
825
876
|
// show the page delayed
|
826
877
|
setTimeout (function() {
|
878
|
+
j1.setState('finished');
|
879
|
+
logger.info('state: finished');
|
880
|
+
logger.info('page initialization: finished');
|
881
|
+
|
827
882
|
// display page
|
828
883
|
$('#no_flicker').css('display', 'block');
|
829
884
|
logger.info('mode detected: web');
|
@@ -843,7 +898,7 @@ var j1 = (function () {
|
|
843
898
|
$('.goog-te-combo').addClass('form-control');
|
844
899
|
}
|
845
900
|
|
846
|
-
// show|hide cookie icon
|
901
|
+
// show|hide cookie icon (should MOVED to Cookiebar ???)
|
847
902
|
if (user_state.cookies_accepted === 'accepted') {
|
848
903
|
// Display cookie icon
|
849
904
|
logText = 'show cookie icon';
|
@@ -869,7 +924,7 @@ var j1 = (function () {
|
|
869
924
|
logger.info(logText);
|
870
925
|
}
|
871
926
|
|
872
|
-
// update sidebar for changed
|
927
|
+
// update sidebar for changed theme data
|
873
928
|
logger.info('update sidebar');
|
874
929
|
user_state = j1.readCookie(cookie_names.user_state);
|
875
930
|
current_user_data = j1.mergeData(user_session, user_state);
|
@@ -886,26 +941,6 @@ var j1 = (function () {
|
|
886
941
|
} // END WEB mode
|
887
942
|
}, // END displayPage
|
888
943
|
|
889
|
-
// -------------------------------------------------------------------------
|
890
|
-
// initMDB()
|
891
|
-
// initialize page for MDB
|
892
|
-
// -------------------------------------------------------------------------
|
893
|
-
initMDB: function (options) {
|
894
|
-
var dependencies_met_bmd = setInterval(function() {
|
895
|
-
if ( j1.adapter.mdb.getState() == 'finished' ) {
|
896
|
-
var logger = log4javascript.getLogger('j1.initMDB');
|
897
|
-
logText = 'initializing MDB for current page: started';
|
898
|
-
logger.info(logText);
|
899
|
-
|
900
|
-
$('body').bootstrapMaterialDesign();
|
901
|
-
|
902
|
-
logText = 'initializing MDB for current page: finished';
|
903
|
-
logger.info(logText);
|
904
|
-
clearInterval(dependencies_met_bmd);
|
905
|
-
}
|
906
|
-
}, 25);
|
907
|
-
}, // END initMDB
|
908
|
-
|
909
944
|
// -------------------------------------------------------------------------
|
910
945
|
// Helper functions
|
911
946
|
// -------------------------------------------------------------------------
|
@@ -929,7 +964,7 @@ var j1 = (function () {
|
|
929
964
|
|
930
965
|
// -------------------------------------------------------------------------
|
931
966
|
// getPrevPage()
|
932
|
-
//
|
967
|
+
// Returns the last vistited page
|
933
968
|
// -------------------------------------------------------------------------
|
934
969
|
getPrevPage: function () {
|
935
970
|
return previous_page;
|
@@ -937,7 +972,7 @@ var j1 = (function () {
|
|
937
972
|
|
938
973
|
// -------------------------------------------------------------------------
|
939
974
|
// getLanguage()
|
940
|
-
//
|
975
|
+
// Returns the preferred language taken form window.navigator
|
941
976
|
// See:
|
942
977
|
// https://stackoverflow.com/questions/1043339/javascript-for-detecting-browser-language-preference
|
943
978
|
// -------------------------------------------------------------------------
|
@@ -947,7 +982,7 @@ var j1 = (function () {
|
|
947
982
|
|
948
983
|
// -------------------------------------------------------------------------
|
949
984
|
// getTemplateVersion()
|
950
|
-
//
|
985
|
+
// Returns the template version taken from site config (_config.yml)
|
951
986
|
// -------------------------------------------------------------------------
|
952
987
|
getTemplateVersion: function () {
|
953
988
|
return '{{template_version}}';
|
@@ -1016,81 +1051,99 @@ var j1 = (function () {
|
|
1016
1051
|
|
1017
1052
|
// -------------------------------------------------------------------------
|
1018
1053
|
// xhrData()
|
1019
|
-
// Load data asychronously using XHR on
|
1020
|
-
// specified
|
1021
|
-
// -------------------------------------------------------------------------
|
1022
|
-
xhrData: function (
|
1023
|
-
var logger
|
1024
|
-
var
|
1054
|
+
// Load data asychronously using XHR|jQuery on an HTML element (e.g. <div>)
|
1055
|
+
// specified by xhr_container_id, xhr_data_path (options)
|
1056
|
+
// -------------------------------------------------------------------------
|
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;
|
1025
1068
|
var logText;
|
1026
1069
|
|
1027
1070
|
var cb_load_closure = function(mod, id) {
|
1028
1071
|
return function (responseTxt, statusTxt, xhr) {
|
1072
|
+
var logger = log4javascript.getLogger('j1.xhrData');
|
1029
1073
|
if ( statusTxt === 'success' ) {
|
1030
|
-
|
1031
|
-
|
1032
|
-
|
1033
|
-
|
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
|
+
|
1034
1082
|
logText = 'data loaded successfully on id: ' +id;
|
1035
1083
|
logger.info(logText);
|
1084
|
+
state = true;
|
1036
1085
|
}
|
1037
1086
|
if ( statusTxt === 'error' ) {
|
1038
|
-
|
1039
|
-
|
1040
|
-
|
1041
|
-
|
1042
|
-
|
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
|
+
}
|
1043
1099
|
}
|
1044
1100
|
};
|
1045
1101
|
};
|
1046
|
-
|
1102
|
+
// see: https://stackoverflow.com/questions/20420577/detect-added-element-to-dom-with-mutation-observer
|
1047
1103
|
var id = '#' + options.xhr_container_id;
|
1048
|
-
var selector = $(id);
|
1049
|
-
|
1050
|
-
|
1051
|
-
|
1052
|
-
|
1053
|
-
|
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
|
+
});
|
1128
|
+
}
|
1054
1129
|
} else {
|
1055
|
-
|
1056
|
-
|
1057
|
-
|
1058
|
-
|
1059
|
-
|
1060
|
-
|
1061
|
-
|
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;
|
1133
|
+
logger.warn(logText);
|
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';
|
1138
|
+
logger.info('state: ' + state);
|
1139
|
+
// jadams, 2020-07-21: intermediate state should DISABLED
|
1140
|
+
// executeFunctionByName(mod + '.setState', window, state);
|
1141
|
+
state = false;
|
1142
|
+
}
|
1062
1143
|
}
|
1144
|
+
return state;
|
1063
1145
|
}, // END xhrData
|
1064
1146
|
|
1065
|
-
// -------------------------------------------------------------------------
|
1066
|
-
// xhrApi:()
|
1067
|
-
// XMLHttpRequest (XHR) based async server API request
|
1068
|
-
// Request an REST API at 'url', using verb 'type' of response type 'type'
|
1069
|
-
// -------------------------------------------------------------------------
|
1070
|
-
xhrApi: function (url, request_type, data_type) {
|
1071
|
-
var logger = log4javascript.getLogger('j1.xhrApi');
|
1072
|
-
var type = typeof request_type == 'undefined' || request_type == '' ? 'GET' : request_type;
|
1073
|
-
var data_type = typeof data_type == 'undefined' || data_type == '' ? 'json' : data_type;
|
1074
|
-
|
1075
|
-
return $.ajax({
|
1076
|
-
url: url,
|
1077
|
-
type: type,
|
1078
|
-
dataType: data_type,
|
1079
|
-
success: function(data) {
|
1080
|
-
if (typeof data == 'string') {
|
1081
|
-
return JSON.parse(data);
|
1082
|
-
}
|
1083
|
-
if (typeof data == 'object') {
|
1084
|
-
return data;
|
1085
|
-
}
|
1086
|
-
},
|
1087
|
-
error: function(error) {
|
1088
|
-
logger.error('xhr request failed: ' + error.statusText);
|
1089
|
-
}
|
1090
|
-
});
|
1091
|
-
|
1092
|
-
}, // END xhrApi
|
1093
|
-
|
1094
1147
|
// -------------------------------------------------------------------------
|
1095
1148
|
// readCookie()
|
1096
1149
|
// -------------------------------------------------------------------------
|
@@ -1128,18 +1181,21 @@ var j1 = (function () {
|
|
1128
1181
|
};
|
1129
1182
|
var settings = $.extend(defaults, options);
|
1130
1183
|
|
1131
|
-
|
1132
|
-
|
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();
|
1133
1188
|
var cookie_data = {};
|
1134
1189
|
var data_json;
|
1135
1190
|
var data_encoded;
|
1136
1191
|
|
1137
1192
|
if (j1.existsCookie(settings.name)) {
|
1138
|
-
cookie_data
|
1139
|
-
cookie_data.timestamp =
|
1140
|
-
cookie_data
|
1141
|
-
data_json
|
1142
|
-
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
|
+
|
1143
1199
|
if (settings.expires > 0) {
|
1144
1200
|
Cookies.set(settings.name, data_encoded, { expires: settings.expires });
|
1145
1201
|
} else {
|
@@ -1454,7 +1510,7 @@ var j1 = (function () {
|
|
1454
1510
|
|
1455
1511
|
// -------------------------------------------------------------------------
|
1456
1512
|
// getStyleValue:
|
1457
|
-
//
|
1513
|
+
// Returns the value of a style from a css class definition
|
1458
1514
|
// example: j1.getStyleValue('bg-primary', 'background-color')
|
1459
1515
|
getStyleValue: function (className, style) {
|
1460
1516
|
var elementId = 'test-' + className,
|
@@ -1543,38 +1599,74 @@ var j1 = (function () {
|
|
1543
1599
|
}, // END setCss
|
1544
1600
|
|
1545
1601
|
// -------------------------------------------------------------------------
|
1546
|
-
//
|
1602
|
+
// setState()
|
1603
|
+
// Set the current (processing) state of the module
|
1547
1604
|
// -------------------------------------------------------------------------
|
1548
1605
|
setState: function (stat) {
|
1549
|
-
state= stat;
|
1550
|
-
//j1.state stat;
|
1606
|
+
state = stat;
|
1551
1607
|
}, // end setState
|
1552
1608
|
|
1553
1609
|
// -------------------------------------------------------------------------
|
1554
|
-
//
|
1610
|
+
// getState()
|
1611
|
+
// Returns the current (processing) state of the module
|
1555
1612
|
// -------------------------------------------------------------------------
|
1556
1613
|
getState: function () {
|
1557
|
-
// return j1.state;
|
1558
1614
|
return state;
|
1559
1615
|
}, // end getState
|
1560
1616
|
|
1561
1617
|
// -------------------------------------------------------------------------
|
1562
|
-
//
|
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)
|
1563
1654
|
// -------------------------------------------------------------------------
|
1564
1655
|
setMode: function (mod) {
|
1565
1656
|
mode = mod;
|
1566
1657
|
}, // END setMode
|
1567
1658
|
|
1568
1659
|
// -------------------------------------------------------------------------
|
1569
|
-
//
|
1660
|
+
// getMode()
|
1661
|
+
// Returns the current mode of the site (web|app)
|
1570
1662
|
// -------------------------------------------------------------------------
|
1571
1663
|
getMode: function () {
|
1572
1664
|
return mode;
|
1573
1665
|
}, // END getMode
|
1574
1666
|
|
1575
1667
|
// -------------------------------------------------------------------------
|
1576
|
-
//
|
1577
|
-
//
|
1668
|
+
// checkUserAgent()
|
1669
|
+
// Returns the name (UA) of the web browser
|
1578
1670
|
// -------------------------------------------------------------------------
|
1579
1671
|
checkUserAgent: function () {
|
1580
1672
|
if (navigator.userAgent.search(ua_name) >= 0) {
|
@@ -1583,22 +1675,40 @@ var j1 = (function () {
|
|
1583
1675
|
return false;
|
1584
1676
|
}
|
1585
1677
|
}, // END checkUserAgent
|
1678
|
+
|
1586
1679
|
// -------------------------------------------------------------------------
|
1587
|
-
//
|
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)
|
1588
1696
|
// -------------------------------------------------------------------------
|
1589
1697
|
getTrue: function () {
|
1590
1698
|
return true;
|
1591
1699
|
}, // END isTrue
|
1592
1700
|
|
1593
1701
|
// -------------------------------------------------------------------------
|
1594
|
-
//
|
1702
|
+
// getFalse()
|
1703
|
+
// Returns always false (for testing purposes)
|
1595
1704
|
// -------------------------------------------------------------------------
|
1596
1705
|
getFalse: function () {
|
1597
1706
|
return false;
|
1598
1707
|
}, // END isTrue
|
1599
1708
|
|
1600
1709
|
// -------------------------------------------------------------------------
|
1601
|
-
//
|
1710
|
+
// goHome()
|
1711
|
+
// Redirect current page to the browser homepage
|
1602
1712
|
// -------------------------------------------------------------------------
|
1603
1713
|
goHome: function () {
|
1604
1714
|
// most browsers
|
@@ -1610,7 +1720,17 @@ var j1 = (function () {
|
|
1610
1720
|
} else {
|
1611
1721
|
window.location.href = 'about:blank';
|
1612
1722
|
}
|
1613
|
-
} // END gohome
|
1723
|
+
}, // END gohome
|
1724
|
+
|
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
|
+
|
1614
1734
|
}; // END j1 (return)
|
1615
1735
|
}) (j1, window);
|
1616
1736
|
|