OwlCyberSecurity - MANAGER
Edit File: theia-sticky-sidebar.min.js
/* Theia Sticky Sidebar v1.7.0 https://github.com/WeCodePixels/theia-sticky-sidebar Glues your website's sidebars, making them permanently visible while scrolling. Copyright 2013-2016 WeCodePixels and other contributors Released under the MIT license */ window.jQuery&&window.jQuery.fn&&function(d){d.fn.theiaStickySidebar=function(m){function q(c,h){if(!0===c.initialized)return!0;if(d("body").width()<c.minWidth)return!1;x(c,h);return!0}function x(c,h){c.initialized=!0;0===d("#theia-sticky-sidebar-stylesheet-"+c.namespace).length&&d("head").append(d('<style id="theia-sticky-sidebar-stylesheet-'+c.namespace+'">.theiaStickySidebar:after {content: ""; display: table; clear: both;}</style>'));h.each(function(){function k(){b.fixedScrollTop=0;b.sidebar.css({"min-height":"1px"}); b.stickySidebar.css({position:"static",width:"",transform:"none"})}function n(a){var f=a.height();a.children().each(function(){f=Math.max(f,d(this).height())});return f}var b={};b.sidebar=d(this);b.options=c||{};b.container=d(b.options.containerSelector);0==b.container.length&&(b.container=b.sidebar.parent());b.sidebar.parents().css("-webkit-transform","none");b.sidebar.css({position:b.options.defaultPosition,overflow:"visible","-webkit-box-sizing":"border-box","-moz-box-sizing":"border-box","box-sizing":"border-box"}); b.stickySidebar=b.sidebar.find(".theiaStickySidebar");if(0==b.stickySidebar.length){var y=/(?:text|application)\/(?:x-)?(?:javascript|ecmascript)/i;b.sidebar.find("script").filter(function(a,f){return 0===f.type.length||f.type.match(y)}).remove();b.stickySidebar=d("<div>").addClass("theiaStickySidebar").append(b.sidebar.children());b.sidebar.append(b.stickySidebar)}b.marginBottom=parseInt(b.sidebar.css("margin-bottom"));b.paddingTop=parseInt(b.sidebar.css("padding-top"));b.paddingBottom=parseInt(b.sidebar.css("padding-bottom")); var r=b.stickySidebar.offset().top,t=b.stickySidebar.outerHeight();b.stickySidebar.css("padding-top",1);b.stickySidebar.css("padding-bottom",1);r-=b.stickySidebar.offset().top;t=b.stickySidebar.outerHeight()-t-r;0==r?(b.stickySidebar.css("padding-top",0),b.stickySidebarPaddingTop=0):b.stickySidebarPaddingTop=1;0==t?(b.stickySidebar.css("padding-bottom",0),b.stickySidebarPaddingBottom=0):b.stickySidebarPaddingBottom=1;b.previousScrollTop=null;b.fixedScrollTop=0;k();b.onScroll=function(a){if(a.stickySidebar.is(":visible"))if(d("body").width()< a.options.minWidth)k();else if(a.options.disableOnResponsiveLayouts&&a.sidebar.outerWidth("none"==a.sidebar.css("float"))+50>a.container.width())k();else{var f=d(document).scrollTop(),l="static";if(f>=a.sidebar.offset().top+(a.paddingTop-a.options.additionalMarginTop)){var g=a.paddingTop+c.additionalMarginTop,u=a.paddingBottom+a.marginBottom+c.additionalMarginBottom,p=a.sidebar.offset().top,e=a.sidebar.offset().top+n(a.container);l=0+c.additionalMarginTop;g=a.stickySidebar.outerHeight()+g+u<d(window).height()? l+a.stickySidebar.outerHeight():d(window).height()-a.marginBottom-a.paddingBottom-c.additionalMarginBottom;p=p-f+a.paddingTop;u=e-f-a.paddingBottom-a.marginBottom;e=a.stickySidebar.offset().top-f;var v=a.previousScrollTop-f;"fixed"==a.stickySidebar.css("position")&&"modern"==a.options.sidebarBehavior&&(e+=v);"stick-to-top"==a.options.sidebarBehavior&&(e=c.additionalMarginTop);"stick-to-bottom"==a.options.sidebarBehavior&&(e=g-a.stickySidebar.outerHeight());e=0<v?Math.min(e,l):Math.max(e,g-a.stickySidebar.outerHeight()); e=Math.max(e,p);e=Math.min(e,u-a.stickySidebar.outerHeight());l=(p=a.container.height()==a.stickySidebar.outerHeight())||e!=l?p||e!=g-a.stickySidebar.outerHeight()?f+e-a.sidebar.offset().top-a.paddingTop<=c.additionalMarginTop?"static":"absolute":"fixed":"fixed"}"fixed"==l?(g=d(document).scrollLeft(),a.stickySidebar.css({position:"fixed",width:w(a.stickySidebar)+"px",transform:"translateY("+e+"px)",left:a.sidebar.offset().left+parseInt(a.sidebar.css("padding-left"))-g+"px",top:"0px"})):"absolute"== l?(g={},"absolute"!=a.stickySidebar.css("position")&&(g.position="absolute",g.transform="translateY("+(f+e-a.sidebar.offset().top-a.stickySidebarPaddingTop-a.stickySidebarPaddingBottom)+"px)",g.top="0px"),g.width=w(a.stickySidebar)+"px",g.left="",a.stickySidebar.css(g)):"static"==l&&k();"static"!=l&&1==a.options.updateSidebarHeight&&a.sidebar.css({"min-height":a.stickySidebar.outerHeight()+a.stickySidebar.offset().top-a.sidebar.offset().top+a.paddingBottom});a.previousScrollTop=f}};b.onScroll(b); d(document).on("scroll."+b.options.namespace,function(a){return function(){a.onScroll(a)}}(b));d(window).on("resize."+b.options.namespace,function(a){return function(){a.stickySidebar.css({position:"static"});a.onScroll(a)}}(b));"undefined"!==typeof ResizeSensor&&new ResizeSensor(b.stickySidebar[0],function(a){return function(){a.onScroll(a)}}(b))})}function w(c){try{var h=c[0].getBoundingClientRect().width}catch(k){}"undefined"===typeof h&&(h=c.width());return h}m=d.extend({containerSelector:"", additionalMarginTop:0,additionalMarginBottom:0,updateSidebarHeight:!0,minWidth:0,disableOnResponsiveLayouts:!0,sidebarBehavior:"modern",defaultPosition:"relative",namespace:"TSS"},m);m.additionalMarginTop=parseInt(m.additionalMarginTop)||0;m.additionalMarginBottom=parseInt(m.additionalMarginBottom)||0;(function(c,h){q(c,h)||(console.log("TSS: Body width smaller than options.minWidth. Init is delayed."),d(document).on("scroll."+c.namespace,function(k,n){return function(b){q(k,n)&&d(this).unbind(b)}}(c, h)),d(window).on("resize."+c.namespace,function(k,n){return function(b){q(k,n)&&d(this).unbind(b)}}(c,h)))})(m,this);return this}}(jQuery);