probe/core/src/main/client/app.js
/**
 * This only returns the abbreviated annotation type, params are omitted.
 *
 * @param annotation
 * @param htmlOutput
 * @param title
 * @param skipIcon
 * @returns {String}
 */
This only returns the abbreviated annotation type, params are omitted.
This only returns the abbreviated annotation type params are omitted .
function abbreviateAnnotation(annotation, htmlOutput, title, skipIcon) {
    var ret = (htmlOutput && title) ? ' <span title="' + annotation + '">@'
        : '@';
    if (annotation.indexOf('(') !== -1) {
        annotation = annotation.substring(1, annotation.indexOf('('));
    } else {
        annotation = annotation.substr(1);
    }
    var parts = annotation.split('.');
    var lastIdx = parts.length - 1;
    for (var i = 0; i < parts.length; i++) {
        if (i === lastIdx) {
            ret += parts[i];
        } else {
            if (i === 0 && htmlOutput) {
                ret += '<span class="abbreviated">';
            }
            ret += parts[i].charAt(0);
            ret += '.';
            if (i === (lastIdx - 1) && htmlOutput) {
                ret += '</span>';
            }
        }
    }
    if (htmlOutput) {
        if (title) {
            ret += '</span>';
        }
        if (!skipIcon) {
            ret += ' <i class="fa fa-compress abbreviated"></i>';
        }
    }
    return ret;
}
function abbreviateAnnotation ( annotation , htmlOutput , title , skipIcon ) { var ret = ( htmlOutput && title ) ? ' <span title="' + annotation + '">@' : '@' ; if ( annotation . indexOf ( '(' ) !== - 1 ) { annotation = annotation . substring ( 1 , annotation . indexOf ( '(' ) ) ; } else { annotation = annotation . substr ( 1 ) ; } var parts = annotation . split ( '.' ) ; var lastIdx = parts . length - 1 ; for ( var i = 0 ; i < parts . length ; i ++ ) { if ( i === lastIdx ) { ret += parts [ i ] ; } else { if ( i === 0 && htmlOutput ) { ret += '<span class="abbreviated">' ; } ret += parts [ i ] . charAt ( 0 ) ; ret += '.' ; if ( i === ( lastIdx - 1 ) && htmlOutput ) { ret += '</span>' ; } } } if ( htmlOutput ) { if ( title ) { ret += '</span>' ; } if ( ! skipIcon ) { ret += ' <i class="fa fa-compress abbreviated"></i>' ; } } return ret ; }
This only returns the abbreviated annotation type, params are omitted.
This only returns the abbreviated annotation type params are omitted .