I have a sort, as a second example on this page:
http://jqueryui.com/demos/sortable/items.html
Sorting is a combination of goals:
- Those that can be raised and regrouped
- Disabled items that cannot be picked up (but are reset tasks).
The problem is how the component interprets my intent when sorting. As an example, taking the first element from the following list and dragging it to the fourth position will look like this:
ABCXX ==> BCXAX
Here X denotes disabled items.
In my application, I would like the sorting behavior to be different. When the target is captured and placed above the disabled element (X), then the list should not be moved to place the target, but instead the target and the disabled element should change positions.
Using the same example as before (drag from 1st to 4th):
ABCXX ==> XBCAX
If the return target is normal (i.e. not disabled), the behavior should be the same as before (drag from 1st to 3rd):
ABCXX ==> BCAXX
Think about it, because you want to redirect meetings on the calendar, when you select one of them and send it on an empty date, you do not want other meetings to be shuffled for one day.
source share