Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#2739 closed enhancement (notabug)

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:

Description

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.

Change History (2)

comment:1 Changed 12 years ago by paul

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.

comment:2 Changed 12 years ago by (none)

Milestone: 1.2.4

Milestone 1.2.4 deleted

Note: See TracTickets for help on using tickets.