From 9606d2c90c9aabe222eac24c63dbf29c763c8b31 Mon Sep 17 00:00:00 2001 From: TJ VanToll Date: Mon, 23 Sep 2013 08:39:38 -0400 Subject: [PATCH 1/8] Autocomplete: Documenting _renderItem() extension point. --- entries/autocomplete.xml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/entries/autocomplete.xml b/entries/autocomplete.xml index 48565212..f2fde8c7 100644 --- a/entries/autocomplete.xml +++ b/entries/autocomplete.xml @@ -177,6 +177,31 @@ Returns a jQuery object containing the menu element. Although the menu items are constantly created and destroyed, the menu element itself is created during initialization and is constantly reused. + + + Method that controls the creation of the <li> and <a> elements for each option in the widget's menu. The method must return a jQuery object containing the newly created <li>. + + The <ul> element that the newly created <li> element must be appended to. + + + + The string to display for the item. + + + The value to insert into the input when the item is selected. + + + + Add the item's value as a data attribute on the <li>. + + + + A simple jQuery UI Autocomplete tag requirement in a note so it's easily axed in 1.11 when the requirement is dropped. --- entries/autocomplete.xml | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/entries/autocomplete.xml b/entries/autocomplete.xml index f2fde8c7..515f923a 100644 --- a/entries/autocomplete.xml +++ b/entries/autocomplete.xml @@ -179,9 +179,12 @@ - Method that controls the creation of the <li> and <a> elements for each option in the widget's menu. The method must return a jQuery object containing the newly created <li>. - - The <ul> element that the newly created <li> element must be appended to. + +

Method that controls the creation of each option in the widget's menu. The method must create a new element to display the menu item, append it to the menu, and return it.

+

Note: At this time the menu item created must contain an <a> element for compatibility with the menu widget. See the example below.

+
+ + The DOM element that the newly created menu item element must be appended to. @@ -192,12 +195,14 @@ - Add the item's value as a data attribute on the <li>. + Use <li> elements with the item's value stored in a data-value attribute.
From 009cb92586c5221473223e08940c7722c3f475a3 Mon Sep 17 00:00:00 2001 From: TJ VanToll Date: Tue, 24 Sep 2013 08:38:55 -0400 Subject: [PATCH 3/8] Autocomplete: _renderItem will always receive a