rice-framework/krad-web/src/main/webapp/krad/scripts/krad.utility.js
/**
 * Create truncate tooltips on elements with the uif-truncate css class.  The tooltips
 * will display the full text of the table cell when the displayed text in the table cell
 * has been truncated.
 */
Create truncate tooltips on elements with the uif-truncate css class.  The tooltips
will display the full text of the table cell when the displayed text in the table cell
has been truncated.
Create truncate tooltips on elements with the uif - truncate css class . The tooltips will display the full text of the table cell when the displayed text in the table cell has been truncated .
function createTruncateTooltips() {
    jQuery('.uif-truncate').each(function() {
        jQuery(this).on("mouseover", function () {
            if ((jQuery('#' + this.id + '_control').text().trim())
                && (this.offsetWidth < document.getElementById(this.id + "_control").offsetWidth)) {
                var tooltipElement = jQuery(this);
                var popoverData = tooltipElement.data(kradVariables.POPOVER_DATA);
                if (!popoverData) {
                    popoverData = initializeTooltip(tooltipElement);
                }
                if (!popoverData.shown) {
                    popoverData.options.content = jQuery('#' + this.id + '_control').text();
                    tooltipElement.popover("show");
                    popoverData.shown = true;
                }
            }
        });
        jQuery(this).on("mouseout", function () {
            if ((jQuery('#' + this.id + '_control').text().trim())
                && (this.offsetWidth < document.getElementById(this.id + "_control").offsetWidth)) {
                var tooltipElement = jQuery(this);
                var popoverData = tooltipElement.data(kradVariables.POPOVER_DATA);
                if (popoverData && popoverData.shown) {
                    tooltipElement.popover("hide");
                    popoverData.shown = false;
                }
            }
        });
    });
}
function createTruncateTooltips ( ) { jQuery ( '.uif-truncate' ) . each ( function ( ) { jQuery ( this ) . on ( "mouseover" , function ( ) { if ( ( jQuery ( '#' + this . id + '_control' ) . text ( ) . trim ( ) ) && ( this . offsetWidth < document . getElementById ( this . id + "_control" ) . offsetWidth ) ) { var tooltipElement = jQuery ( this ) ; var popoverData = tooltipElement . data ( kradVariables . POPOVER_DATA ) ; if ( ! popoverData ) { popoverData = initializeTooltip ( tooltipElement ) ; } if ( ! popoverData . shown ) { popoverData . options . content = jQuery ( '#' + this . id + '_control' ) . text ( ) ; tooltipElement . popover ( "show" ) ; popoverData . shown = true ; } } } ) ; jQuery ( this ) . on ( "mouseout" , function ( ) { if ( ( jQuery ( '#' + this . id + '_control' ) . text ( ) . trim ( ) ) && ( this . offsetWidth < document . getElementById ( this . id + "_control" ) . offsetWidth ) ) { var tooltipElement = jQuery ( this ) ; var popoverData = tooltipElement . data ( kradVariables . POPOVER_DATA ) ; if ( popoverData && popoverData . shown ) { tooltipElement . popover ( "hide" ) ; popoverData . shown = false ; } } } ) ; } ) ; }
Create truncate tooltips on elements with the uif-truncate css class.
Create truncate tooltips on elements with the uif - truncate css class .