Skip to content

Commit c664dfa

Browse files
fnagelscottgonzalez
authored andcommitted
Selectmenu: adjust documentation to latest changes
1 parent 7f5341d commit c664dfa

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

entries/selectmenu.xml

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<longdesc>
66
<p>Selectmenu Widget will act as a proxy back to the original select element, controlling its state for form submission or serialization.</p>
77

8-
<p>Selectmenu Widget support both in-place "popup" or drop-down styles. It supports optgroups and custom markup to render specific presentations like multiple lines.</p>
8+
<p>It supports optgroups and custom markup to render specific presentations like multiple lines.</p>
99

1010
<p>The select or its options can be disabled by adding the <code>disbaled="disabled"</code> attribite to that element.</p>
1111

@@ -18,9 +18,8 @@
1818
<li>END/PAGE DOWN - Focus last item.</li>
1919
<li>HOME/PAGE UP - Focus first item.</li>
2020
<li>ESCAPE - Close the select.</li>
21-
<li>ENTER - Select the currently focused item and close the select.</li>
21+
<li>ENTER/SPACE - Select the currently focused item and close the select.</li>
2222
<li>ALT+UP/DOWN - Toggle select.</li>
23-
<li>SPACE - Toggle select.</li>
2423
</ul>
2524

2625
<p>When the menu is closed, the following key commands are available:</p>
@@ -30,17 +29,23 @@
3029
<li>END/PAGE DOWN - Select last item.</li>
3130
<li>HOME/PAGE UP - Select first item.</li>
3231
<li>ALT+UP/DOWN - Toggle select.</li>
33-
<li>SPACE - Toggle select.</li>
32+
<li>SPACE - Open menu.</li>
3433
</ul>
3534
</longdesc>
3635
<note id="functional-css"/>
37-
<added>1.10</added>
36+
<added>1.11</added>
3837
<options>
39-
<option name="appendTo" type="Selector" default='"body"' example-value='"#someElem"'>
40-
<desc>Which element the menu should be appended to. Override this when the selectmenu is inside a <code>position: fixed</code> element. Otherwise the popup menu would still scroll with the page.</desc>
38+
<option name="appendTo" type="Selector" default="null" example-value='"#someElem"'>
39+
<desc>Which element the menu should be appended to. When the value is <code>null</code>, the parents of the input field will be checked for a class of <code>ui-front</code>. If an element with the <code>ui-front</code> class is found, the menu will be appended to that element. Regardless of the value, if no element is found, the menu will be appended to the body.</desc>
4140
</option>
42-
<option name="dropdown" type="Boolean" default="true" example-value="false">
43-
<desc>If set to <code>true</code> the menu will open as a pop-up. Otherwise the menu is opened below the button just like a native select element.</desc>
41+
<xi:include href="../includes/widget-option-disabled.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
42+
<option name="icons" type="Object" default='{ button: "ui-icon-triangle-1-s" }' example-value='{ button: "ui-icon-circle-triangle-s" }'>
43+
<desc>
44+
Icons to use for button, matching an icon defined by the jQuery UI CSS Framework.
45+
<ul>
46+
<li>button (string, default: "ui-icon-triangle-1-s")</li>
47+
</ul>
48+
</desc>
4449
</option>
4550
<option name="position" type="Object" default='{ my: "left top", at: "left bottom", collision: "none" }' example-value='{ my : "left+10 center", at: "right center" }'>
4651
<desc>Identifies the position of the menu in relation to the associated button element. Please note position option <code>my</code> and <code>at</code> will be overwritten if option <code>dropdown</code> is set to <code>false</code>. You can refer to the <a href="/position">jQuery UI Position</a> utility for more details about the various options.</desc>
@@ -155,12 +160,9 @@ $('#files').selectmenu();
155160
]]></css>
156161
</example>
157162
<example>
158-
<desc>A jQuery UI Selectmenu with overflow in pop-up mode</desc>
163+
<desc>A jQuery UI Selectmenu with overflow</desc>
159164
<code><![CDATA[
160-
var withOverflow = $('#number').selectmenu({
161-
dropdown: false
162-
});
163-
withOverflow.selectmenu("menuWidget").addClass("overflow");
165+
$('#number').selectmenu().selectmenu("menuWidget").addClass("overflow");
164166
]]></code>
165167
<html><![CDATA[
166168
<label for="number">Select a number:</label>

0 commit comments

Comments
 (0)