Bug Tracker

Ticket #4485: jQueryAutocompleteShowAllValues.patch

File jQueryAutocompleteShowAllValues.patch, 1.0 KB (added by mephiztophelez, 11 years ago)

Patch which adds the showAllValues function

  • src/war/js/jquery/plugins/jquery.autocomplete.js

    ### Eclipse Workspace Patch 1.0
    #P edealInv
     
    4747        },
    4848        unautocomplete: function() {
    4949                return this.trigger("unautocomplete");
     50        },
     51        // 20090402: Christoph Rueger: new function for always showing the complete list.
     52        showAllValues: function() {
     53                return this.trigger("showAllValues");
    5054        }
    5155});
    5256
     
    195199                select.unbind();
    196200                $input.unbind();
    197201                $(input.form).unbind(".autocomplete");
     202        }).bind("showAllValues", function() {
     203                // 20090402: Christoph Rueger: new function for always showing the complete list.
     204                // call request with an empty string as  the query. (same behavior as if the input field would be empty)
     205                $input.keydown().focus(); // hacky! I didn't find another way to show the dropdown.
     206                request("", receiveData, hideResultsNow);
    198207        });
    199208       
    200209