From 8962434ccd11777a4749029105b36093ef553b7a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?=
Date: Thu, 18 Sep 2014 14:49:01 -0400
Subject: [PATCH 1/2] Selectmenu: Document extension points
Fixes gh-211
---
entries/selectmenu.xml | 84 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 84 insertions(+)
diff --git a/entries/selectmenu.xml b/entries/selectmenu.xml
index 18055590..43044803 100644
--- a/entries/selectmenu.xml
+++ b/entries/selectmenu.xml
@@ -119,6 +119,90 @@
Returns a jQuery
object containing the button element.
+
+
+
+ Method that controls the creation of each option in the widget's menu. The method must create a new <li>
element, append it to the menu, and return it.
+
+
+ The <ul>
element that the newly created <li>
element must be appended to.
+
+
+
+ The original option
element.
+
+
+ The index of the option
within the select
.
+
+
+ The value of the option
.
+
+
+ The label of the option
.
+
+
+ The label for the parent optgroup
, if any.
+
+
+ Whether the option
is disabled.
+
+
+
+ Style the menu item backgrounds based on their value.
+
+
+
+
+
+ Method that controls building the widget's menu. The method is passed an empty <ul>
and an array of items based on the option
elements in the original select
. Creation of the individual <li>
elements should be delegated to _renderItemData()
, which in turn delegates to the _renderItem()
extension point.
+
+
+ An empty <ul>
element to use as the widget's menu.
+
+
+ An Array of items based on the option
elements in the original select
. See the _renderItem()
extension point for details on the format of the item objects.
+
+
+
+ Add a CSS class name to the odd menu items.
+ Note: For simplicity, this example does not support optgroups or disabled menu items.
+
+
+
+
+
+ Method responsible for sizing the menu before it is displayed. The menu element is available at this.menu
.
+
+ Always display the menu as 500 pixels wide.
+
+
+
+
A simple jQuery UI Selectmenu
- The original option
element.
+ The original <option>
element.
- The index of the option
within the select
.
+ The index of the <option>
within the <select>
.
- The value of the option
.
+ The value of the <option>
.
- The label of the option
.
+ The label of the <option>
.
The label for the parent optgroup
, if any.
- Whether the option
is disabled.
+ Whether the <option>
is disabled.
- Style the menu item backgrounds based on their value.
+ Style the menu item background colors based on the value of their corresponding option elements.