awsmug/torro-forms

View on GitHub
assets/dist/js/admin-fixed-sidebar.min.js

Summary

Maintainability
A
0 mins
Test Coverage
/*!
 * Torro Forms Version 1.0.8 (https://torro-forms.com)
 * Licensed under GNU General Public License v2 (or later) (http://www.gnu.org/licenses/gpl-2.0.html)
 */
!function(o){"use strict";function t(){var t=o(window).scrollTop();s<u-c-e?t+c>=e-p?a.css({position:"fixed",top:c+p,bottom:"auto"}):a.css({position:"relative",top:"auto",bottom:"auto"}):t>d?t+u>=o(document).height()-n+p?a.css({position:"fixed",top:"auto",bottom:t+u-o(document).height()+n-p}):t+u>=e+s?a.css({position:"fixed",top:"auto",bottom:p}):a.css({position:"relative",top:"auto",bottom:"auto"}):t+c>=o(document).height()-n-s-p?a.css({position:"fixed",top:"auto",bottom:t+u-o(document).height()+n-p}):t+c>=e?a.css({position:"fixed",top:c+p,bottom:"auto"}):a.css({position:"relative",top:"auto",bottom:"auto"}),d=t}function i(){s=a.height(),e=a.offset().top,n=o(document).height()-o("#poststuff").offset().top-o("#poststuff").outerHeight(),u=o(window).height(),c=0,o("body").hasClass("admin-bar")&&(c=document.documentElement.clientWidth<=782?46:32),t()}var s,e,n,u,c,a=o("#postbox-container-1 #side-sortables"),p=20,d=0;a.length&&(i(),o(window).on("resize",i),o(window).on("scroll",t))}(window.jQuery);