rice-framework/krad-web/src/main/webapp/krad/scripts/krad.utility.js
/**
 * This internal function continues the showLightboxComponent processing after the ajax content has been rendered.
 */
This internal function continues the showLightboxComponent processing after the ajax content has been rendered.
This internal function continues the showLightboxComponent processing after the ajax content has been rendered .
function _showLightboxComponentHelper(componentId, overrideOptions) {
    var component = jQuery("#" + componentId);
    var cssDisplay = "none";
    if (component.attr("class")) {
        component.attr("class", component.attr("class").replace("clearfix", ""));
    }
    component.find("div, section").each(function () {
        var classAttribute = jQuery(this).attr("class");
        if (classAttribute) {
            jQuery(this).attr("class", classAttribute.replace("clearfix", ""));
        }
    });
    if (top == self) {
        _appendCallbackFunctions(overrideOptions, {beforeClose: function () {
            jQuery("#" + componentId).parents("#fancybox-wrap").unbind("onReset");
            jQuery("#" + componentId).css("display", cssDisplay);
            jQuery("#" + componentId + kradVariables.DIALOG_PLACEHOLDER).replaceWith(parent.jQuery("#" + componentId));
            jQuery("input[name='" + kradVariables.RENDERED_IN_DIALOG + "']").val(false);
            activeDialogId = null;
        }});
    } else {
        _appendCallbackFunctions(overrideOptions, {beforeClose: function () {
            parent.jQuery("#" + componentId).parents("#fancybox-wrap").unbind("onReset");
            jQuery("#" + componentId).css("display", cssDisplay);
            jQuery("#" + componentId + kradVariables.DIALOG_PLACEHOLDER).replaceWith(parent.jQuery("#" + componentId));
            jQuery("input[name='" + kradVariables.RENDERED_IN_DIALOG + "']").val(false);
            activeDialogId = null;
        }});
    }
    component.before("<div id='" + componentId + kradVariables.DIALOG_PLACEHOLDER + "' "
        + "style='display: none; height: 0; width: 0;'/>");
    component = component.detach();
    component.show();
    showLightboxContent(component, overrideOptions);
    activeDialogId = componentId;
    jQuery(component).trigger(kradVariables.SHOW_DIALOG_EVENT);
}
function _showLightboxComponentHelper ( componentId , overrideOptions ) { var component = jQuery ( "#" + componentId ) ; var cssDisplay = "none" ; if ( component . attr ( "class" ) ) { component . attr ( "class" , component . attr ( "class" ) . replace ( "clearfix" , "" ) ) ; } component . find ( "div, section" ) . each ( function ( ) { var classAttribute = jQuery ( this ) . attr ( "class" ) ; if ( classAttribute ) { jQuery ( this ) . attr ( "class" , classAttribute . replace ( "clearfix" , "" ) ) ; } } ) ; if ( top == self ) { _appendCallbackFunctions ( overrideOptions , { beforeClose : function ( ) { jQuery ( "#" + componentId ) . parents ( "#fancybox-wrap" ) . unbind ( "onReset" ) ; jQuery ( "#" + componentId ) . css ( "display" , cssDisplay ) ; jQuery ( "#" + componentId + kradVariables . DIALOG_PLACEHOLDER ) . replaceWith ( parent . jQuery ( "#" + componentId ) ) ; jQuery ( "input[name='" + kradVariables . RENDERED_IN_DIALOG + "']" ) . val ( false ) ; activeDialogId = null ; } } ) ; } else { _appendCallbackFunctions ( overrideOptions , { beforeClose : function ( ) { parent . jQuery ( "#" + componentId ) . parents ( "#fancybox-wrap" ) . unbind ( "onReset" ) ; jQuery ( "#" + componentId ) . css ( "display" , cssDisplay ) ; jQuery ( "#" + componentId + kradVariables . DIALOG_PLACEHOLDER ) . replaceWith ( parent . jQuery ( "#" + componentId ) ) ; jQuery ( "input[name='" + kradVariables . RENDERED_IN_DIALOG + "']" ) . val ( false ) ; activeDialogId = null ; } } ) ; } component . before ( "<div id='" + componentId + kradVariables . DIALOG_PLACEHOLDER + "' " + "style='display: none; height: 0; width: 0;'/>" ) ; component = component . detach ( ) ; component . show ( ) ; showLightboxContent ( component , overrideOptions ) ; activeDialogId = componentId ; jQuery ( component ) . trigger ( kradVariables . SHOW_DIALOG_EVENT ) ; }
This internal function continues the showLightboxComponent processing after the ajax content has been rendered.
This internal function continues the showLightboxComponent processing after the ajax content has been rendered .
// suppress scrollbar when not needed, undo the div.clearfix hack (KULRICE-7467)
 // ensure that component of KualiForm gets updated after fancybox closes
 // hack fancybox to prevent it from moving the original lightbox content into the body
 // restore original display state and replace placeholder
 // reattach component to KualiForm after fancybox closes
 // hack fancybox to prevent it from moving the original lightbox content into the body
 // restore original display state and replace placeholder
 // add a dialog placeholder
 // detach and show content
 // indicate active dialog, note this is done after showing the lightbox since it could close an existing
 // lightbox which will set activeDialogId to null (through the beforeClose handler above)
 // trigger the show dialog event
