Skip to content

Commit 9bc937e

Browse files
committed
Sortable: Consolidating duplicated ui argument of events into a common include.
1 parent 7ad5d2c commit 9bc937e

File tree

2 files changed

+32
-240
lines changed

2 files changed

+32
-240
lines changed

entries/sortable.xml

+12-240
Original file line numberDiff line numberDiff line change
@@ -139,293 +139,65 @@
139139
<event name="start">
140140
<desc>This event is triggered when sorting starts.</desc>
141141
<argument name="event" type="Event"/>
142-
<argument name="ui" type="Object">
143-
<property name="helper" type="jQuery">
144-
<desc>The jQuery object representing the helper being sorted</desc>
145-
</property>
146-
<property name="item" type="jQuery">
147-
<desc>The jQuery object representing the current dragged element</desc>
148-
</property>
149-
<property name="offset" type="Object">
150-
<desc>The current absolute position of the helper represented as <code>{ top, left }</code></desc>
151-
</property>
152-
<property name="position" type="Object">
153-
<desc>The current position of the helper represented as <code>{ top, left }</code></desc>
154-
</property>
155-
<property name="originalPosition" type="Object">
156-
<desc>The original position of the element represented as <code>{ top, left }</code></desc>
157-
</property>
158-
<property name="sender" type="jQuery">
159-
<desc>The sortable that the item comes from if moving from one sortable to another</desc>
160-
</property>
161-
</argument>
142+
<xi:include href="../includes/sortable-argument-ui.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
162143
</event>
163144
<event name="sort">
164145
<desc>This event is triggered during sorting.</desc>
165146
<argument name="event" type="Event"/>
166-
<argument name="ui" type="Object">
167-
<property name="helper" type="jQuery">
168-
<desc>The jQuery object representing the helper being sorted</desc>
169-
</property>
170-
<property name="item" type="jQuery">
171-
<desc>The jQuery object representing the current dragged element</desc>
172-
</property>
173-
<property name="offset" type="Object">
174-
<desc>The current absolute position of the helper represented as <code>{ top, left }</code></desc>
175-
</property>
176-
<property name="position" type="Object">
177-
<desc>The current position of the helper represented as <code>{ top, left }</code></desc>
178-
</property>
179-
<property name="originalPosition" type="Object">
180-
<desc>The original position of the element represented as <code>{ top, left }</code></desc>
181-
</property>
182-
<property name="sender" type="jQuery">
183-
<desc>The sortable that the item comes from if moving from one sortable to another</desc>
184-
</property>
185-
</argument>
147+
<xi:include href="../includes/sortable-argument-ui.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
186148
</event>
187149
<event name="change">
188150
<desc>This event is triggered during sorting, but only when the DOM position has changed.</desc>
189151
<argument name="event" type="Event"/>
190-
<argument name="ui" type="Object">
191-
<property name="helper" type="jQuery">
192-
<desc>The jQuery object representing the helper being sorted</desc>
193-
</property>
194-
<property name="item" type="jQuery">
195-
<desc>The jQuery object representing the current dragged element</desc>
196-
</property>
197-
<property name="offset" type="Object">
198-
<desc>The current absolute position of the helper represented as <code>{ top, left }</code></desc>
199-
</property>
200-
<property name="position" type="Object">
201-
<desc>The current position of the helper represented as <code>{ top, left }</code></desc>
202-
</property>
203-
<property name="originalPosition" type="Object">
204-
<desc>The original position of the element represented as <code>{ top, left }</code></desc>
205-
</property>
206-
<property name="sender" type="jQuery">
207-
<desc>The sortable that the item comes from if moving from one sortable to another</desc>
208-
</property>
209-
</argument>
152+
<xi:include href="../includes/sortable-argument-ui.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
210153
</event>
211154
<event name="beforeStop">
212155
<desc>This event is triggered when sorting stops, but when the placeholder/helper is still available.</desc>
213156
<argument name="event" type="Event"/>
214-
<argument name="ui" type="Object">
215-
<property name="helper" type="jQuery">
216-
<desc>The jQuery object representing the helper being sorted</desc>
217-
</property>
218-
<property name="item" type="jQuery">
219-
<desc>The jQuery object representing the current dragged element</desc>
220-
</property>
221-
<property name="offset" type="Object">
222-
<desc>The current absolute position of the helper represented as <code>{ top, left }</code></desc>
223-
</property>
224-
<property name="position" type="Object">
225-
<desc>The current position of the helper represented as <code>{ top, left }</code></desc>
226-
</property>
227-
<property name="originalPosition" type="Object">
228-
<desc>The original position of the element represented as <code>{ top, left }</code></desc>
229-
</property>
230-
<property name="sender" type="jQuery">
231-
<desc>The sortable that the item comes from if moving from one sortable to another</desc>
232-
</property>
233-
</argument>
157+
<xi:include href="../includes/sortable-argument-ui.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
234158
</event>
235159
<event name="stop">
236160
<desc>This event is triggered when sorting has stopped.</desc>
237161
<argument name="event" type="Event"/>
238-
<argument name="ui" type="Object">
239-
<property name="helper" type="jQuery">
240-
<desc>The jQuery object representing the helper being sorted</desc>
241-
</property>
242-
<property name="item" type="jQuery">
243-
<desc>The jQuery object representing the current dragged element</desc>
244-
</property>
245-
<property name="offset" type="Object">
246-
<desc>The current absolute position of the helper represented as <code>{ top, left }</code></desc>
247-
</property>
248-
<property name="position" type="Object">
249-
<desc>The current position of the helper represented as <code>{ top, left }</code></desc>
250-
</property>
251-
<property name="originalPosition" type="Object">
252-
<desc>The original position of the element represented as <code>{ top, left }</code></desc>
253-
</property>
254-
<property name="sender" type="jQuery">
255-
<desc>The sortable that the item comes from if moving from one sortable to another</desc>
256-
</property>
257-
</argument>
162+
<xi:include href="../includes/sortable-argument-ui.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
258163
</event>
259164
<event name="update">
260165
<desc>This event is triggered when the user stopped sorting and the DOM position has changed.</desc>
261166
<argument name="event" type="Event"/>
262-
<argument name="ui" type="Object">
263-
<property name="helper" type="jQuery">
264-
<desc>The jQuery object representing the helper being sorted</desc>
265-
</property>
266-
<property name="item" type="jQuery">
267-
<desc>The jQuery object representing the current dragged element</desc>
268-
</property>
269-
<property name="offset" type="Object">
270-
<desc>The current absolute position of the helper represented as <code>{ top, left }</code></desc>
271-
</property>
272-
<property name="position" type="Object">
273-
<desc>The current position of the helper represented as <code>{ top, left }</code></desc>
274-
</property>
275-
<property name="originalPosition" type="Object">
276-
<desc>The original position of the element represented as <code>{ top, left }</code></desc>
277-
</property>
278-
<property name="sender" type="jQuery">
279-
<desc>The sortable that the item comes from if moving from one sortable to another</desc>
280-
</property>
281-
</argument>
167+
<xi:include href="../includes/sortable-argument-ui.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
282168
</event>
283169
<event name="receive">
284170
<desc>This event is triggered when a connected sortable list has received an item from another list.</desc>
285171
<argument name="event" type="Event"/>
286-
<argument name="ui" type="Object">
287-
<property name="helper" type="jQuery">
288-
<desc>The jQuery object representing the helper being sorted</desc>
289-
</property>
290-
<property name="item" type="jQuery">
291-
<desc>The jQuery object representing the current dragged element</desc>
292-
</property>
293-
<property name="offset" type="Object">
294-
<desc>The current absolute position of the helper represented as <code>{ top, left }</code></desc>
295-
</property>
296-
<property name="position" type="Object">
297-
<desc>The current position of the helper represented as <code>{ top, left }</code></desc>
298-
</property>
299-
<property name="originalPosition" type="Object">
300-
<desc>The original position of the element represented as <code>{ top, left }</code></desc>
301-
</property>
302-
<property name="sender" type="jQuery">
303-
<desc>The sortable that the item comes from if moving from one sortable to another</desc>
304-
</property>
305-
</argument>
172+
<xi:include href="../includes/sortable-argument-ui.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
306173
</event>
307174
<event name="remove">
308175
<desc>This event is triggered when a sortable item has been dragged out from the list and into another.</desc>
309176
<argument name="event" type="Event"/>
310-
<argument name="ui" type="Object">
311-
<property name="helper" type="jQuery">
312-
<desc>The jQuery object representing the helper being sorted</desc>
313-
</property>
314-
<property name="item" type="jQuery">
315-
<desc>The jQuery object representing the current dragged element</desc>
316-
</property>
317-
<property name="offset" type="Object">
318-
<desc>The current absolute position of the helper represented as <code>{ top, left }</code></desc>
319-
</property>
320-
<property name="position" type="Object">
321-
<desc>The current position of the helper represented as <code>{ top, left }</code></desc>
322-
</property>
323-
<property name="originalPosition" type="Object">
324-
<desc>The original position of the element represented as <code>{ top, left }</code></desc>
325-
</property>
326-
<property name="sender" type="jQuery">
327-
<desc>The sortable that the item comes from if moving from one sortable to another</desc>
328-
</property>
329-
</argument>
177+
<xi:include href="../includes/sortable-argument-ui.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
330178
</event>
331179
<event name="over">
332180
<desc>This event is triggered when a sortable item is moved into a sortable list.</desc>
333181
<argument name="event" type="Event"/>
334-
<argument name="ui" type="Object">
335-
<property name="helper" type="jQuery">
336-
<desc>The jQuery object representing the helper being sorted</desc>
337-
</property>
338-
<property name="item" type="jQuery">
339-
<desc>The jQuery object representing the current dragged element</desc>
340-
</property>
341-
<property name="offset" type="Object">
342-
<desc>The current absolute position of the helper represented as <code>{ top, left }</code></desc>
343-
</property>
344-
<property name="position" type="Object">
345-
<desc>The current position of the helper represented as <code>{ top, left }</code></desc>
346-
</property>
347-
<property name="originalPosition" type="Object">
348-
<desc>The original position of the element represented as <code>{ top, left }</code></desc>
349-
</property>
350-
<property name="sender" type="jQuery">
351-
<desc>The sortable that the item comes from if moving from one sortable to another</desc>
352-
</property>
353-
</argument>
182+
<xi:include href="../includes/sortable-argument-ui.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
354183
</event>
355184
<event name="out">
356185
<desc>
357186
<p>This event is triggered when a sortable item is moved away from a sortable list.</p>
358187
<p><em>Note: This event is also triggered when a sortable item is dropped.</em></p>
359188
</desc>
360189
<argument name="event" type="Event"/>
361-
<argument name="ui" type="Object">
362-
<property name="helper" type="jQuery">
363-
<desc>The jQuery object representing the helper being sorted</desc>
364-
</property>
365-
<property name="item" type="jQuery">
366-
<desc>The jQuery object representing the current dragged element</desc>
367-
</property>
368-
<property name="offset" type="Object">
369-
<desc>The current absolute position of the helper represented as <code>{ top, left }</code></desc>
370-
</property>
371-
<property name="position" type="Object">
372-
<desc>The current position of the helper represented as <code>{ top, left }</code></desc>
373-
</property>
374-
<property name="originalPosition" type="Object">
375-
<desc>The original position of the element represented as <code>{ top, left }</code></desc>
376-
</property>
377-
<property name="sender" type="jQuery">
378-
<desc>The sortable that the item comes from if moving from one sortable to another</desc>
379-
</property>
380-
</argument>
190+
<xi:include href="../includes/sortable-argument-ui.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
381191
</event>
382192
<event name="activate">
383193
<desc>This event is triggered when using connected lists, every connected list on drag start receives it.</desc>
384194
<argument name="event" type="Event"/>
385-
<argument name="ui" type="Object">
386-
<property name="helper" type="jQuery">
387-
<desc>The jQuery object representing the helper being sorted</desc>
388-
</property>
389-
<property name="item" type="jQuery">
390-
<desc>The jQuery object representing the current dragged element</desc>
391-
</property>
392-
<property name="offset" type="Object">
393-
<desc>The current absolute position of the helper represented as <code>{ top, left }</code></desc>
394-
</property>
395-
<property name="position" type="Object">
396-
<desc>The current position of the helper represented as <code>{ top, left }</code></desc>
397-
</property>
398-
<property name="originalPosition" type="Object">
399-
<desc>The original position of the element represented as <code>{ top, left }</code></desc>
400-
</property>
401-
<property name="sender" type="jQuery">
402-
<desc>The sortable that the item comes from if moving from one sortable to another</desc>
403-
</property>
404-
</argument>
195+
<xi:include href="../includes/sortable-argument-ui.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
405196
</event>
406197
<event name="deactivate">
407198
<desc>This event is triggered when sorting was stopped, is propagated to all possible connected lists.</desc>
408199
<argument name="event" type="Event"/>
409-
<argument name="ui" type="Object">
410-
<property name="helper" type="jQuery">
411-
<desc>The jQuery object representing the helper being sorted</desc>
412-
</property>
413-
<property name="item" type="jQuery">
414-
<desc>The jQuery object representing the current dragged element</desc>
415-
</property>
416-
<property name="offset" type="Object">
417-
<desc>The current absolute position of the helper represented as <code>{ top, left }</code></desc>
418-
</property>
419-
<property name="position" type="Object">
420-
<desc>The current position of the helper represented as <code>{ top, left }</code></desc>
421-
</property>
422-
<property name="originalPosition" type="Object">
423-
<desc>The original position of the element represented as <code>{ top, left }</code></desc>
424-
</property>
425-
<property name="sender" type="jQuery">
426-
<desc>The sortable that the item comes from if moving from one sortable to another</desc>
427-
</property>
428-
</argument>
200+
<xi:include href="../includes/sortable-argument-ui.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
429201
</event>
430202
</events>
431203
<methods>

includes/sortable-argument-ui.xml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<argument name="ui" type="Object">
2+
<property name="helper" type="jQuery">
3+
<desc>The jQuery object representing the helper being sorted</desc>
4+
</property>
5+
<property name="item" type="jQuery">
6+
<desc>The jQuery object representing the current dragged element</desc>
7+
</property>
8+
<property name="offset" type="Object">
9+
<desc>The current absolute position of the helper represented as <code>{ top, left }</code></desc>
10+
</property>
11+
<property name="position" type="Object">
12+
<desc>The current position of the helper represented as <code>{ top, left }</code></desc>
13+
</property>
14+
<property name="originalPosition" type="Object">
15+
<desc>The original position of the element represented as <code>{ top, left }</code></desc>
16+
</property>
17+
<property name="sender" type="jQuery">
18+
<desc>The sortable that the item comes from if moving from one sortable to another</desc>
19+
</property>
20+
</argument>

0 commit comments

Comments
 (0)