web/public/javascripts/typeahead.js
/**
 *
 * @param typeaheadElement
 * @param fieldNameElement
 * @param fieldNameAndLabels
 * @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 fieldNameAndLabels
@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 fieldNameAndLabels @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 populateFieldTypeahead({typeaheadElement,
                                    fieldNameElement,
                                    fieldNameAndLabels,
                                    showOption,
                                    initSelectByNameElement,
                                    minLength}) {
    var source = createFieldBloodhoundSource(fieldNameAndLabels, showOption)
    populateFieldTypeaheadAux({typeaheadElement, fieldNameElement, source, showOption, minLength})
    if (initSelectByNameElement) {
        selectByNameElement(typeaheadElement, fieldNameElement, fieldNameAndLabels, showOption)
    }
}
function populateFieldTypeahead ( { typeaheadElement , fieldNameElement , fieldNameAndLabels , showOption , initSelectByNameElement , minLength } ) { var source = createFieldBloodhoundSource ( fieldNameAndLabels , showOption ) populateFieldTypeaheadAux ( { typeaheadElement , fieldNameElement , source , showOption , minLength } ) if ( initSelectByNameElement ) { selectByNameElement ( typeaheadElement , fieldNameElement , fieldNameAndLabels , showOption ) } }
@param typeaheadElement
 @param fieldNameElement
 @param fieldNameAndLabels
 @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 fieldNameAndLabels @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