Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conflict with jQuery UI #15

Closed
maz0717 opened this issue Jul 28, 2018 · 4 comments
Closed

Conflict with jQuery UI #15

maz0717 opened this issue Jul 28, 2018 · 4 comments

Comments

@maz0717
Copy link

maz0717 commented Jul 28, 2018

The javascript in this widget conflicts with jQuery UI's sortable widget. Is there any chance of changing it's name? I would recommend somethink like kvSortable or yiiSortable.

@maz0717
Copy link
Author

maz0717 commented Jul 29, 2018

I've looked into this a little more. I think there are a couple of ways to deal with this.

  1. Simply rename the yii2-sortable plugin.
  2. Add the ability to detect and/or configure if jquery ui is loaded. If it's loaded:
    a. Automatically rename the plugin.
    b. Don't include the yii2-sortable javascript. I tested sorting of columns after removing the yii2 javascript. Sorting seems to work just fine. Which would mean that yii2-sortable could use the jquery sortable instead of the html5 sortable if jquery ui is loaded.

@kartik-v
Copy link
Owner

Will check and update on this.

@kartik-v
Copy link
Owner

Have fixed it with latest updated source Sortable library (which does not depend on jQuery). Created a separate jQuery plugin wrapper for that named kvHtml5Sortable. Cross check and confirm.

@maz0717
Copy link
Author

maz0717 commented Jul 30, 2018

Seems to work. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants