Skip to content

Commit aa3f0bf

Browse files
committed
Move inherited widget methods to include files
1 parent a4ec310 commit aa3f0bf

17 files changed

+109
-496
lines changed

entries/accordion.xml

Lines changed: 6 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -127,45 +127,15 @@
127127
</event>
128128
</events>
129129
<methods>
130-
<method name="destroy">
131-
<desc>
132-
Remove the accordion functionality completely. This will return the element back to its pre-init state.
133-
</desc>
134-
</method>
135-
<method name="disable">
136-
<desc>
137-
Disable the accordion.
138-
</desc>
139-
</method>
140-
<method name="enable">
141-
<desc>
142-
Enable the accordion.
143-
</desc>
144-
</method>
145-
<method name="option">
146-
<desc>
147-
Get or set any accordion option. If no value is specified, will act as a getter.
148-
</desc>
149-
<argument name="optionName" type="String">
150-
</argument>
151-
<argument name="value" type="Object" optional="true">
152-
</argument>
153-
</method>
154-
<method name="option">
155-
<desc>
156-
Set multiple accordion options at once by providing an options object.
157-
</desc>
158-
<argument name="options" type="Object">
159-
</argument>
160-
</method>
130+
<widget-inherit id="widget-destroy" />
131+
<widget-inherit id="widget-disable" />
132+
<widget-inherit id="widget-enable" />
133+
<widget-inherit id="widget-option1" />
134+
<widget-inherit id="widget-option2" />
161135
<method name="refresh">
162136
<desc>Recompute heights of the accordion panels. Results depend on the content and the <code>heightStyle</code> option.</desc>
163137
</method>
164-
<method name="widget">
165-
<desc>
166-
Returns the widget
167-
</desc>
168-
</method>
138+
<widget-inherit id="widget-widget" />
169139
</methods>
170140
<example>
171141

entries/autocomplete.xml

Lines changed: 6 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -162,48 +162,18 @@
162162
<method name="close">
163163
<desc>Close the Autocomplete menu. Useful in combination with the search method, to close the open menu.</desc>
164164
</method>
165-
<method name="destroy">
166-
<desc>
167-
Remove the autocomplete functionality completely. This will return the element back to its pre-init state.
168-
</desc>
169-
</method>
170-
<method name="disable">
171-
<desc>
172-
Disable the autocomplete.
173-
</desc>
174-
</method>
175-
<method name="enable">
176-
<desc>
177-
Enable the autocomplete.
178-
</desc>
179-
</method>
180-
<method name="option">
181-
<desc>
182-
Get or set any autocomplete option. If no value is specified, will act as a getter.
183-
</desc>
184-
<argument name="optionName" type="String">
185-
</argument>
186-
<argument name="value" type="Object" optional="true">
187-
</argument>
188-
</method>
189-
<method name="option">
190-
<desc>
191-
Set multiple autocomplete options at once by providing an options object.
192-
</desc>
193-
<argument name="options" type="Object">
194-
</argument>
195-
</method>
165+
<widget-inherit id="widget-destroy" />
166+
<widget-inherit id="widget-disable" />
167+
<widget-inherit id="widget-enable" />
168+
<widget-inherit id="widget-option1" />
169+
<widget-inherit id="widget-option2" />
196170
<method name="search">
197171
<desc>Triggers a search event, which, when data is available, then will display the suggestions; can be used by a selectbox-like button to open the suggestions when clicked. If no value argument is specified, the current input's value is used. Can be called with an empty string and minLength: 0 to display all items.</desc>
198172
<argument name="value" type="String" optional="true">
199173
<desc></desc>
200174
</argument>
201175
</method>
202-
<method name="widget">
203-
<desc>
204-
Returns the widget
205-
</desc>
206-
</method>
176+
<widget-inherit id="widget-widget" />
207177
</methods>
208178
<example>
209179

entries/button.xml

Lines changed: 6 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -44,45 +44,15 @@
4444
</event>
4545
</events>
4646
<methods>
47-
<method name="destroy">
48-
<desc>
49-
Remove the button functionality completely. This will return the element back to its pre-init state.
50-
</desc>
51-
</method>
52-
<method name="disable">
53-
<desc>
54-
Disable the button.
55-
</desc>
56-
</method>
57-
<method name="enable">
58-
<desc>
59-
Enable the button.
60-
</desc>
61-
</method>
47+
<widget-inherit id="widget-destroy" />
48+
<widget-inherit id="widget-disable" />
49+
<widget-inherit id="widget-enable" />
6250
<method name="refresh">
6351
<desc>Refreshes the visual state of the button. Useful for updating button state after the native element's checked or disabled state is changed programatically.</desc>
6452
</method>
65-
<method name="option">
66-
<desc>
67-
Get or set any button option. If no value is specified, will act as a getter.
68-
</desc>
69-
<argument name="optionName" type="String">
70-
</argument>
71-
<argument name="value" type="Object" optional="true">
72-
</argument>
73-
</method>
74-
<method name="option">
75-
<desc>
76-
Set multiple button options at once by providing an options object.
77-
</desc>
78-
<argument name="options" type="Object">
79-
</argument>
80-
</method>
81-
<method name="widget">
82-
<desc>
83-
Returns the widget
84-
</desc>
85-
</method>
53+
<widget-inherit id="widget-option1" />
54+
<widget-inherit id="widget-option2" />
55+
<widget-inherit id="widget-widget" />
8656
</methods>
8757
<example>
8858

entries/datepicker.xml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -243,11 +243,7 @@
243243

244244
</events>
245245
<methods>
246-
<method name="destroy">
247-
<desc>
248-
Remove the datepicker functionality completely. This will return the element back to its pre-init state.
249-
</desc>
250-
</method>
246+
<widget-inherit id="widget-destroy" />
251247
<method name="dialog">
252248
<desc>Function</desc>
253249
<argument name="date" type="String or Date">

entries/dialog.xml

Lines changed: 6 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -254,21 +254,9 @@
254254
<method name="close">
255255
<desc>Close the dialog.</desc>
256256
</method>
257-
<method name="destroy">
258-
<desc>
259-
Remove the dialog functionality completely. This will return the element back to its pre-init state.
260-
</desc>
261-
</method>
262-
<method name="disable">
263-
<desc>
264-
Disable the dialog.
265-
</desc>
266-
</method>
267-
<method name="enable">
268-
<desc>
269-
Enable the dialog.
270-
</desc>
271-
</method>
257+
<widget-inherit id="widget-destroy" />
258+
<widget-inherit id="widget-disable" />
259+
<widget-inherit id="widget-enable" />
272260
<method name="isOpen">
273261
<desc>Returns true if the dialog is currently open.</desc>
274262
</method>
@@ -278,27 +266,9 @@
278266
<method name="open">
279267
<desc>Open the dialog.</desc>
280268
</method>
281-
<method name="option">
282-
<desc>
283-
Get or set any dialog option. If no value is specified, will act as a getter.
284-
</desc>
285-
<argument name="optionName" type="String">
286-
</argument>
287-
<argument name="value" type="Object" optional="true">
288-
</argument>
289-
</method>
290-
<method name="option">
291-
<desc>
292-
Set multiple dialog options at once by providing an options object.
293-
</desc>
294-
<argument name="options" type="Object">
295-
</argument>
296-
</method>
297-
<method name="widget">
298-
<desc>
299-
Returns the widget
300-
</desc>
301-
</method>
269+
<widget-inherit id="widget-option1" />
270+
<widget-inherit id="widget-option2" />
271+
<widget-inherit id="widget-widget" />
302272
</methods>
303273
<example>
304274

entries/draggable.xml

Lines changed: 6 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -198,42 +198,12 @@
198198

199199
</events>
200200
<methods>
201-
<method name="destroy">
202-
<desc>
203-
Remove the draggable functionality completely. This will return the element back to its pre-init state.
204-
</desc>
205-
</method>
206-
<method name="disable">
207-
<desc>
208-
Disable the draggable.
209-
</desc>
210-
</method>
211-
<method name="enable">
212-
<desc>
213-
Enable the draggable.
214-
</desc>
215-
</method>
216-
<method name="option">
217-
<desc>
218-
Get or set any draggable option. If no value is specified, will act as a getter.
219-
</desc>
220-
<argument name="optionName" type="String">
221-
</argument>
222-
<argument name="value" type="Object" optional="true">
223-
</argument>
224-
</method>
225-
<method name="option">
226-
<desc>
227-
Set multiple draggable options at once by providing an options object.
228-
</desc>
229-
<argument name="options" type="Object">
230-
</argument>
231-
</method>
232-
<method name="widget">
233-
<desc>
234-
Returns the widget
235-
</desc>
236-
</method>
201+
<widget-inherit id="widget-destroy" />
202+
<widget-inherit id="widget-disable" />
203+
<widget-inherit id="widget-enable" />
204+
<widget-inherit id="widget-option1" />
205+
<widget-inherit id="widget-option2" />
206+
<widget-inherit id="widget-widget" />
237207
</methods>
238208
<example>
239209

entries/droppable.xml

Lines changed: 6 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -157,42 +157,12 @@ ui.draggable represents the draggable.</desc>
157157

158158
</events>
159159
<methods>
160-
<method name="destroy">
161-
<desc>
162-
Remove the droppable functionality completely. This will return the element back to its pre-init state.
163-
</desc>
164-
</method>
165-
<method name="disable">
166-
<desc>
167-
Disable the droppable.
168-
</desc>
169-
</method>
170-
<method name="enable">
171-
<desc>
172-
Enable the droppable.
173-
</desc>
174-
</method>
175-
<method name="option">
176-
<desc>
177-
Get or set any droppable option. If no value is specified, will act as a getter.
178-
</desc>
179-
<argument name="optionName" type="String">
180-
</argument>
181-
<argument name="value" type="Object" optional="true">
182-
</argument>
183-
</method>
184-
<method name="option">
185-
<desc>
186-
Set multiple droppable options at once by providing an options object.
187-
</desc>
188-
<argument name="options" type="Object">
189-
</argument>
190-
</method>
191-
<method name="widget">
192-
<desc>
193-
Returns the widget
194-
</desc>
195-
</method>
160+
<widget-inherit id="widget-destroy" />
161+
<widget-inherit id="widget-disable" />
162+
<widget-inherit id="widget-enable" />
163+
<widget-inherit id="widget-option1" />
164+
<widget-inherit id="widget-option2" />
165+
<widget-inherit id="widget-widget" />
196166
</methods>
197167
<example>
198168
<desc>Makes the div droppable (a drop target for a draggable).</desc>

entries/menu.xml

Lines changed: 6 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -73,16 +73,9 @@
7373
<desc>Indicates whether all sub-menus should be closed or only sub-menus below and including the menu that is or contains the target of the triggering event.</desc>
7474
</argument>
7575
</method>
76-
<method name="disable">
77-
<desc>
78-
Disable the menu.
79-
</desc>
80-
</method>
81-
<method name="enable">
82-
<desc>
83-
Enable the menu.
84-
</desc>
85-
</method>
76+
<widget-inherit id="widget-destroy" />
77+
<widget-inherit id="widget-disable" />
78+
<widget-inherit id="widget-enable" />
8679
<method name="expand">
8780
<desc>
8881
Open the sub-menu below the currently active item, if it exists.
@@ -128,22 +121,8 @@
128121
<desc>What triggered the method.</desc>
129122
</argument>
130123
</method>
131-
<method name="option">
132-
<desc>
133-
Get or set any menu option. If no value is specified, will act as a getter.
134-
</desc>
135-
<argument name="optionName" type="String">
136-
</argument>
137-
<argument name="value" type="Object" optional="true">
138-
</argument>
139-
</method>
140-
<method name="option">
141-
<desc>
142-
Set multiple menu options at once by providing an options object.
143-
</desc>
144-
<argument name="options" type="Object">
145-
</argument>
146-
</method>
124+
<widget-inherit id="widget-option1" />
125+
<widget-inherit id="widget-option2" />
147126
<method name="previous">
148127
<desc>
149128
Move active state to previous menu item.
@@ -173,11 +152,7 @@
173152
<desc>What triggered the method.</desc>
174153
</argument>
175154
</method>
176-
<method name="widget">
177-
<desc>
178-
Returns the widget
179-
</desc>
180-
</method>
155+
<widget-inherit id="widget-widget" />
181156
</methods>
182157
<events>
183158
<event name="blur" type="menublur">

0 commit comments

Comments
 (0)