rice-framework/krad-web/src/main/webapp/krad/scripts/krad.utility.js
/**
 * Handles the calculation and positioning of sticky footer elements on the screen when the user scrolls.  This
 * function should be called on a scroll event.
 */
Handles the calculation and positioning of sticky footer elements on the screen when the user scrolls.  This
function should be called on a scroll event.
Handles the calculation and positioning of sticky footer elements on the screen when the user scrolls . This function should be called on a scroll event .
function handleStickyFooterContent() {
    if (!stickyFooterContent || stickyFooterContent.length == 0 || !applicationFooter || applicationFooter.length == 0
        || stickyFooterContent.filter(applicationFooter).length) {
        return;
    }
    var appFooterOffset = applicationFooter.offset();
    var windowHeight = jQuery(window).height();
    var scrollTop = jQuery(window).scrollTop();
    if (windowHeight + scrollTop >= Math.floor(appFooterOffset.top) && scrollTop != 0 && applicationFooter.height() > 0) {
        var bottomOffset = (windowHeight + scrollTop) - Math.floor(appFooterOffset.top);
        jQuery(stickyFooterContent.get().reverse()).each(function () {
            var height = jQuery(this).outerHeight();
            jQuery(this).attr("style", "position:fixed; left: 0; bottom: " + bottomOffset + "px;");
            bottomOffset = bottomOffset + height;
        });
        currentFooterHeight = bottomOffset;
    }
    else {
        initStickyFooterContent();
    }
}
function handleStickyFooterContent ( ) { if ( ! stickyFooterContent || stickyFooterContent . length == 0 || ! applicationFooter || applicationFooter . length == 0 || stickyFooterContent . filter ( applicationFooter ) . length ) { return ; } var appFooterOffset = applicationFooter . offset ( ) ; var windowHeight = jQuery ( window ) . height ( ) ; var scrollTop = jQuery ( window ) . scrollTop ( ) ; if ( windowHeight + scrollTop >= Math . floor ( appFooterOffset . top ) && scrollTop != 0 && applicationFooter . height ( ) > 0 ) { var bottomOffset = ( windowHeight + scrollTop ) - Math . floor ( appFooterOffset . top ) ; jQuery ( stickyFooterContent . get ( ) . reverse ( ) ) . each ( function ( ) { var height = jQuery ( this ) . outerHeight ( ) ; jQuery ( this ) . attr ( "style" , "position:fixed; left: 0; bottom: " + bottomOffset + "px;" ) ; bottomOffset = bottomOffset + height ; } ) ; currentFooterHeight = bottomOffset ; } else { initStickyFooterContent ( ) ; } }
Handles the calculation and positioning of sticky footer elements on the screen when the user scrolls.
Handles the calculation and positioning of sticky footer elements on the screen when the user scrolls .
//early return when no footer content or no application footer or application footer is sticky itself
 //(no need for adjustment)
 //reposition elements when the scroll exceeds the footer's top (and footer content exists)
