rniemeyer / knockout-sortable

A Knockout.js binding to connect observableArrays with jQuery UI sortable functionality
MIT License
547 stars 128 forks source link

AMD Support Bug with jQuery UI 1.11 #121

Closed khakulov closed 9 years ago

khakulov commented 9 years ago

Official Documentation of jQuery UI(http://learn.jquery.com/jquery-ui/environments/amd/) says that you should require jQuery UI modules like:

require([ "jquery-ui/sortable" ], function( sortable ) {
    ...
});

But in knockout-sortable (Line 5) is like:

define(["knockout", "jquery", "jquery.ui.sortable"], factory);

I think it must be like this

define(["knockout", "jquery", "jquery.ui/sortable"], factory);
rniemeyer commented 9 years ago

@khakulov thanks- looks like this is they correct way that it should currently be specified. I will get this change in, the next time that I update the lib. Thanks!

rniemeyer commented 9 years ago

This has been changed in 0.10.0

ajssd commented 9 years ago

Still does not seem right. Instead of define(["knockout", "jquery", "jquery.ui/sortable"], factory);

shouldn't it be this instead? define(["knockout", "jquery", "jquery-ui/sortable"], factory);

It must be "jquery-ui" not "jquery.ui" otherwise require won't be able to find it.

rniemeyer commented 9 years ago

This has been fixed. It now uses jquery-ui/sortable and jquery-ui/draggable.