Skip to content

combobox. accentfolding problem #9

Open
@rmunoz-cuboidea

Description

@rmunoz-cuboidea

Scott. and all you people.

I'm working with the ui-autocomplete, and it extension combobox.
I'm so proud of you, Its make me feel so little. like dust in the Universe.

And , the problem that I have, is I live in Chile, we're an Spanish speak contry, so we use a lot of accent.
and with this accent-fold extension, I have almost done my job, BUT, whene I implemet the combobox extension, the accent-dolfing extension cracks. Is not working ... That is because, the extension is asking if the source is an Array, but the combobox extension give as source a function...

I'm try out, to make it work, but is just fail after fail.

I have this, is incomplete, and not working, but is all I have..

if ($.isFunction(source)) { //ASK if is a function
    alert( "function >> "+source ); //alert to test
    // /* this.source = function( request, response ) {      */
    var matcher = new RegExp( $.ui.autocomplete.escapeRegex(request.term), "i" );
    response( select.children( "option" ).map(function() {
        var text = $( this ).text();
        if ( this.value && ( !request.term 
                            || matcher.test(text) ) 
                            || matcher.test( autocomplete.accentFolding.fold( text ) ) // test accentfolding
            return {
                label: text.replace(
                    new RegExp(
                        "(?![^&;]+;)(?!<[^<>]*)(" +
                        $.ui.autocomplete.escapeRegex(request.term) +
                        ")(?![^<>]*>)(?![^&;]+;)", "gi"
                    ), "<strong>$1</strong>" ),
                value: text,
                option: this
            };
    }) );
}

and I just copy the other stuff, with no result,

I hope any of you, can give some time to fix this problem, I hope for the best

Ricardo Muñoz

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions