Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#7741 closed bug (fixed)

ui.sortable is not working when it is extended

Reported by: TomWolk Owned by:
Priority: minor Milestone: 1.8.17
Component: ui.sortable Version: 1.8.15
Keywords: Cc:
Blocked by: Blocking:

Description

I extended the ui.sortable widget to add some additional functionality. I gave the new widget a new name so I can still use the original sortable.

But with a new name 2 methods stopped working because the name of the widget was hard coded in those methods.

I changed the line

var inst = $.data(cur[j], 'sortable');

to

var inst = $.data(cur[j], this.widgetName);

in the methods

_getItemsAsjQuery and _refreshItems

and now it works!

Greetings Thomas

Change History (3)

comment:1 Changed 5 years ago by Richard D. Worth

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

Sortable: replaced hard-coded sortable with this.widgetName, and removed lines from destroy that are handled by super. Fixes #7741 - ui.sortable is not working when it is extended

Changeset: 228b1b191b4f668a74e7005fc9c8c9250c090aa9

comment:2 Changed 5 years ago by Richard D. Worth

Sortable: replaced hard-coded sortable with this.widgetName, and removed lines from destroy that are handled by super. Fixes #7741 - ui.sortable is not working when it is extended (cherry picked from commit 228b1b191b4f668a74e7005fc9c8c9250c090aa9)

Changeset: 5c6cfe2645588e6a3d3f1ed002534d454209e33f

comment:3 Changed 5 years ago by rdworth

  • Milestone changed from 1.9 to 1.8.17
Note: See TracTickets for help on using tickets.