Opened 8 years ago

Closed 7 years ago

Last modified 7 years ago

#2729 closed enhancement (fixed)

Add a hook in sortables to generate the list of sortables

Reported by: rfb Owned by: paul
Priority: major Milestone: 1.5.2
Component: ui.sortable Version: 1.5b4
Keywords: Cc:
Blocked by: Blocking:



I have created a nested sortable list which can only be 1 level deep. The cleanest way I've found to enforce this is to add hook into the refreshItems() which generates a different list of sortable items depending on what item I'm picking up.

Example, for my use:

if item contains a list

return list of sortables on root of list


return all sortables in list

Attached is a patch I've made from my changes on the most current svn trunk.


Attachments (1)

itemQuery.patch (1.9 KB) - added by rfb 8 years ago.
patch to svn current

Download all attachments as: .zip

Change History (5)

Changed 8 years ago by rfb

patch to svn current

comment:1 Changed 8 years ago by anonymous

  • Milestone 1.2.4 deleted

Milestone 1.2.4 deleted

comment:2 Changed 8 years ago by paul

  • Component changed from ui.core to ui.sortable
  • Version changed from 1.2.3 to 1.5b4

comment:3 Changed 7 years ago by paul

  • Resolution set to fixed
  • Status changed from new to closed

This is implemented - the items option now accepts a function.

comment:4 Changed 7 years ago by paul

  • Milestone set to 1.5.2
Note: See TracTickets for help on using tickets.