From 9bc937ea3cd46523417fc9d63d1d29e55c8989cc Mon Sep 17 00:00:00 2001 From: TJ VanToll Date: Wed, 12 Jun 2013 11:13:12 -0700 Subject: [PATCH 1/3] Sortable: Consolidating duplicated ui argument of events into a common include. --- entries/sortable.xml | 252 ++---------------------------- includes/sortable-argument-ui.xml | 20 +++ 2 files changed, 32 insertions(+), 240 deletions(-) create mode 100644 includes/sortable-argument-ui.xml diff --git a/entries/sortable.xml b/entries/sortable.xml index ae36e7fe..60297f67 100644 --- a/entries/sortable.xml +++ b/entries/sortable.xml @@ -139,218 +139,47 @@ This event is triggered when sorting starts. - - - The jQuery object representing the helper being sorted - - - The jQuery object representing the current dragged element - - - The current absolute position of the helper represented as { top, left } - - - The current position of the helper represented as { top, left } - - - The original position of the element represented as { top, left } - - - The sortable that the item comes from if moving from one sortable to another - - + This event is triggered during sorting. - - - The jQuery object representing the helper being sorted - - - The jQuery object representing the current dragged element - - - The current absolute position of the helper represented as { top, left } - - - The current position of the helper represented as { top, left } - - - The original position of the element represented as { top, left } - - - The sortable that the item comes from if moving from one sortable to another - - + This event is triggered during sorting, but only when the DOM position has changed. - - - The jQuery object representing the helper being sorted - - - The jQuery object representing the current dragged element - - - The current absolute position of the helper represented as { top, left } - - - The current position of the helper represented as { top, left } - - - The original position of the element represented as { top, left } - - - The sortable that the item comes from if moving from one sortable to another - - + This event is triggered when sorting stops, but when the placeholder/helper is still available. - - - The jQuery object representing the helper being sorted - - - The jQuery object representing the current dragged element - - - The current absolute position of the helper represented as { top, left } - - - The current position of the helper represented as { top, left } - - - The original position of the element represented as { top, left } - - - The sortable that the item comes from if moving from one sortable to another - - + This event is triggered when sorting has stopped. - - - The jQuery object representing the helper being sorted - - - The jQuery object representing the current dragged element - - - The current absolute position of the helper represented as { top, left } - - - The current position of the helper represented as { top, left } - - - The original position of the element represented as { top, left } - - - The sortable that the item comes from if moving from one sortable to another - - + This event is triggered when the user stopped sorting and the DOM position has changed. - - - The jQuery object representing the helper being sorted - - - The jQuery object representing the current dragged element - - - The current absolute position of the helper represented as { top, left } - - - The current position of the helper represented as { top, left } - - - The original position of the element represented as { top, left } - - - The sortable that the item comes from if moving from one sortable to another - - + This event is triggered when a connected sortable list has received an item from another list. - - - The jQuery object representing the helper being sorted - - - The jQuery object representing the current dragged element - - - The current absolute position of the helper represented as { top, left } - - - The current position of the helper represented as { top, left } - - - The original position of the element represented as { top, left } - - - The sortable that the item comes from if moving from one sortable to another - - + This event is triggered when a sortable item has been dragged out from the list and into another. - - - The jQuery object representing the helper being sorted - - - The jQuery object representing the current dragged element - - - The current absolute position of the helper represented as { top, left } - - - The current position of the helper represented as { top, left } - - - The original position of the element represented as { top, left } - - - The sortable that the item comes from if moving from one sortable to another - - + This event is triggered when a sortable item is moved into a sortable list. - - - The jQuery object representing the helper being sorted - - - The jQuery object representing the current dragged element - - - The current absolute position of the helper represented as { top, left } - - - The current position of the helper represented as { top, left } - - - The original position of the element represented as { top, left } - - - The sortable that the item comes from if moving from one sortable to another - - + @@ -358,74 +187,17 @@

Note: This event is also triggered when a sortable item is dropped.

- - - The jQuery object representing the helper being sorted - - - The jQuery object representing the current dragged element - - - The current absolute position of the helper represented as { top, left } - - - The current position of the helper represented as { top, left } - - - The original position of the element represented as { top, left } - - - The sortable that the item comes from if moving from one sortable to another - - +
This event is triggered when using connected lists, every connected list on drag start receives it. - - - The jQuery object representing the helper being sorted - - - The jQuery object representing the current dragged element - - - The current absolute position of the helper represented as { top, left } - - - The current position of the helper represented as { top, left } - - - The original position of the element represented as { top, left } - - - The sortable that the item comes from if moving from one sortable to another - - + This event is triggered when sorting was stopped, is propagated to all possible connected lists. - - - The jQuery object representing the helper being sorted - - - The jQuery object representing the current dragged element - - - The current absolute position of the helper represented as { top, left } - - - The current position of the helper represented as { top, left } - - - The original position of the element represented as { top, left } - - - The sortable that the item comes from if moving from one sortable to another - - + diff --git a/includes/sortable-argument-ui.xml b/includes/sortable-argument-ui.xml new file mode 100644 index 00000000..06b64065 --- /dev/null +++ b/includes/sortable-argument-ui.xml @@ -0,0 +1,20 @@ + + + The jQuery object representing the helper being sorted + + + The jQuery object representing the current dragged element + + + The current absolute position of the helper represented as { top, left } + + + The current position of the helper represented as { top, left } + + + The original position of the element represented as { top, left } + + + The sortable that the item comes from if moving from one sortable to another + + \ No newline at end of file From 3b82987394b9d7ce5f4871f3689a226abbaac4dc Mon Sep 17 00:00:00 2001 From: TJ VanToll Date: Wed, 12 Jun 2013 11:20:22 -0700 Subject: [PATCH 2/3] Sortable: Document the placeholder property in the ui argument of events. Fixes #134. --- includes/sortable-argument-ui.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/includes/sortable-argument-ui.xml b/includes/sortable-argument-ui.xml index 06b64065..63773e25 100644 --- a/includes/sortable-argument-ui.xml +++ b/includes/sortable-argument-ui.xml @@ -17,4 +17,7 @@ The sortable that the item comes from if moving from one sortable to another + + The jQuery object representing the element being used as a placeholder. + \ No newline at end of file From 03ca5f0ad50e06cf6c50b2627b0b8835033bf414 Mon Sep 17 00:00:00 2001 From: TJ VanToll Date: Wed, 12 Jun 2013 11:24:02 -0700 Subject: [PATCH 3/3] Sortable: Consistent formatting of ui argument property descriptions. --- includes/sortable-argument-ui.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/includes/sortable-argument-ui.xml b/includes/sortable-argument-ui.xml index 63773e25..aa9f3c5f 100644 --- a/includes/sortable-argument-ui.xml +++ b/includes/sortable-argument-ui.xml @@ -1,21 +1,21 @@ - The jQuery object representing the helper being sorted + The jQuery object representing the helper being sorted. - The jQuery object representing the current dragged element + The jQuery object representing the current dragged element. - The current absolute position of the helper represented as { top, left } + The current absolute position of the helper represented as { top, left }. - The current position of the helper represented as { top, left } + The current position of the helper represented as { top, left }. - The original position of the element represented as { top, left } + The original position of the element represented as { top, left }. - The sortable that the item comes from if moving from one sortable to another + The sortable that the item comes from if moving from one sortable to another. The jQuery object representing the element being used as a placeholder.