web/public/javascripts/typeahead.js
/**
 *
 * @param typeaheadElement
 * @param fieldNameElement
 * @param url
 * @param showOption 0 - show field names only, 1 - show field labels only,
 *                   2 - show field labels, and field names if no label defined, 3 - show both, field names and labels
 */
@param typeaheadElement
@param fieldNameElement
@param url
@param showOption 0 - show field names only, 1 - show field labels only,
2 - show field labels, and field names if no label defined, 3 - show both, field names and labels
@param typeaheadElement @param fieldNameElement @param url @param showOption 0 - show field names only 1 - show field labels only 2 - show field labels and field names if no label defined 3 - show both field names and labels
function populateFieldTypeaheadFromUrl({typeaheadElement, fieldNameElement, url, showOption, postFunction, initSelectByNameElement, minLength}) {
    $.ajax({
        url: url,
        success: function (fieldNameAndLabels) {
            populateFieldTypeahead({
                typeaheadElement,
                fieldNameElement,
                fieldNameAndLabels,
                showOption,
                initSelectByNameElement,
                minLength
            });
            if (postFunction) {
                postFunction()
            }
        },
        error: showErrorResponse
    });
}
function populateFieldTypeaheadFromUrl ( { typeaheadElement , fieldNameElement , url , showOption , postFunction , initSelectByNameElement , minLength } ) { $ . ajax ( { url : url , success : function ( fieldNameAndLabels ) { populateFieldTypeahead ( { typeaheadElement , fieldNameElement , fieldNameAndLabels , showOption , initSelectByNameElement , minLength } ) ; if ( postFunction ) { postFunction ( ) } } , error : showErrorResponse } ) ; }
@param typeaheadElement
 @param fieldNameElement
 @param url
 @param showOption 0 - show field names only, 1 - show field labels only,
                   2 - show field labels, and field names if no label defined, 3 - show both, field names and labels
@param typeaheadElement @param fieldNameElement @param url @param showOption 0 - show field names only 1 - show field labels only 2 - show field labels and field names if no label defined 3 - show both field names and labels