Skip to main content

Search and Top Navigation

#2739 closed enhancement (notabug)

Opened April 24, 2008 07:03AM UTC

Closed April 30, 2008 10:12AM UTC

Last modified May 24, 2008 03:39AM UTC

sortable: should reset elements when return value is false

Reported by: phpmyforum Owned by: paul
Priority: minor Milestone:
Component: ui.core Version: 1.2.3
Keywords: Cc:
Blocked by: Blocking:

I think it would be great if we could "return false" inside these callbacks to tell jQuery that it should reset/cancel the sort action:

  • stop
  • update
  • sort
  • change
  • maybe "start" too?

This can be useful if you do a Ajax call to save the sorted elements which fails or the backend prevents the action for a different reason.

In this case the element should revert to it's previous position.

Attachments (0)
Change History (2)

Changed April 30, 2008 10:12AM UTC by paul comment:1

resolution: → invalid
status: newclosed

This is unfortunately not possible from a user perspective - since the user is still holding down the mouse, and therefore dragging.

Anyway, if the ajax call was not successful, nothing prevents you to sort the elements again in the stop callback.

Changed May 24, 2008 03:39AM UTC by comment:2

milestone: 1.2.4

Milestone 1.2.4 deleted