|
36 | 36 | <note id="functional-css"/>
|
37 | 37 | <added>1.10</added>
|
38 | 38 | <options>
|
39 |
| - <option name="dropdown" type="Boolean" default="true" example-value="false"> |
40 |
| - <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 |
| - </option> |
42 | 39 | <option name="appendTo" type="Selector" default='"body"' example-value='"#someElem"'>
|
43 | 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>
|
44 | 41 | </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> |
| 44 | + </option> |
45 | 45 | <option name="position" type="Object" default='{ my: "left top", at: "left bottom", collision: "none" }' example-value='{ my : "left+10 center", at: "right center" }'>
|
46 | 46 | <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>
|
47 | 47 | </option>
|
48 | 48 | </options>
|
49 | 49 | <events>
|
50 |
| - <xi:include href="../includes/widget-event-create.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/> |
51 |
| - <event name="open"> |
52 |
| - <desc>Triggered when menu is opened.</desc> |
| 50 | + <event name="change"> |
| 51 | + <desc>Triggered when the selected item has changed. Not every <code>select</code> event will fire an <code>change</code> event.</desc> |
53 | 52 | <argument name="event" type="Event"/>
|
| 53 | + <argument name="ui" type="Object"> |
| 54 | + <property name="item" type="jQuery"> |
| 55 | + <desc>The active item.</desc> |
| 56 | + </property> |
| 57 | + </argument> |
54 | 58 | </event>
|
| 59 | + <event name="close"> |
| 60 | + <desc>Triggered when the menu is hidden.</desc> |
| 61 | + <argument name="event" type="Event"/> |
| 62 | + </event> |
| 63 | + <xi:include href="../includes/widget-event-create.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/> |
55 | 64 | <event name="focus">
|
56 | 65 | <desc>
|
57 | 66 | Triggered when an items gains focus.
|
|
63 | 72 | </property>
|
64 | 73 | </argument>
|
65 | 74 | </event>
|
| 75 | + <event name="open"> |
| 76 | + <desc>Triggered when menu is opened.</desc> |
| 77 | + <argument name="event" type="Event"/> |
| 78 | + </event> |
66 | 79 | <event name="select">
|
67 | 80 | <desc>
|
68 | 81 | Triggered when a menu item is selected.
|
|
74 | 87 | </property>
|
75 | 88 | </argument>
|
76 | 89 | </event>
|
77 |
| - <event name="close"> |
78 |
| - <desc>Triggered when the menu is hidden.</desc> |
79 |
| - <argument name="event" type="Event"/> |
80 |
| - </event> |
81 |
| - <event name="change"> |
82 |
| - <desc>Triggered when the selected item has changed. Not every <code>select</code> event will fire an <code>change</code> event.</desc> |
83 |
| - <argument name="event" type="Event"/> |
84 |
| - <argument name="ui" type="Object"> |
85 |
| - <property name="item" type="jQuery"> |
86 |
| - <desc>The active item.</desc> |
87 |
| - </property> |
88 |
| - </argument> |
89 |
| - </event> |
90 | 90 | </events>
|
91 | 91 | <methods>
|
92 |
| - <method name="open"> |
93 |
| - <desc>Opens the dialog.</desc> |
94 |
| - </method> |
95 | 92 | <method name="close">
|
96 | 93 | <desc>Closes the Selectmenu menu.</desc>
|
97 | 94 | </method>
|
| 95 | + <xi:include href="../includes/widget-method-destroy.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/> |
| 96 | + <xi:include href="../includes/widget-method-disable.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/> |
| 97 | + <xi:include href="../includes/widget-method-enable.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/> |
| 98 | + <method name="menuWidget"> |
| 99 | + <desc>Returns a <code>jQuery</code> object containing the menu element.</desc> |
| 100 | + </method> |
| 101 | + <method name="open"> |
| 102 | + <desc>Opens the dialog.</desc> |
| 103 | + </method> |
| 104 | + <xi:include href="../includes/widget-method-option.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/> |
98 | 105 | <method name="refresh">
|
99 | 106 | <desc>
|
100 | 107 | Parses the original element again and rerenders the menu. New options or optgroups can be added, removed or disabled.
|
101 | 108 | </desc>
|
102 | 109 | </method>
|
103 |
| - <xi:include href="../includes/widget-method-destroy.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/> |
104 |
| - <xi:include href="../includes/widget-method-disable.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/> |
105 |
| - <xi:include href="../includes/widget-method-enable.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/> |
106 |
| - <xi:include href="../includes/widget-method-option.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/> |
107 | 110 | <method name="widget">
|
108 | 111 | <desc>Returns a <code>jQuery</code> object containing the button element.</desc>
|
109 | 112 | </method>
|
110 |
| - <method name="menuWidget"> |
111 |
| - <desc>Returns a <code>jQuery</code> object containing the menu element.</desc> |
112 |
| - </method> |
113 | 113 | </methods>
|
114 | 114 | <example>
|
115 | 115 | <desc>A simple jQuery UI Selectmenu</desc>
|
|
0 commit comments