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

Add support for jQuery UI 1.12 API #894

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open

Conversation

mdprw
Copy link

@mdprw mdprw commented Aug 10, 2016

jQuery UI 1.12 introduces API redesigns for Button, Buttonset, Dialog, Draggable, Droppable, Menu, Mouse, Resizable, Selectable, Sortable, Tabs, Tooltip, and Effects. Although the redesigns introduce breaking changes, 1.12 maintains a lot of compatibility with the 1.11 API by default. This is accomplished by rebuilding the 1.11 API on top of the 1.12 API. The default behavior for all 1.12 releases will be to simultaneously use the 1.11 and 1.12 APIs where possible. If you would like to load just the 1.12 API without the 1.11 API, you can set the $.uiBackCompat flag to false.

<script src="jquery.js"></script>
<script>$.uiBackCompat = false;</script>
<script src="jquery-ui.js"></script>

I'm using UI lightness Theme and i noticed that the icon used in the combo to open the dropdown ".ui-icon-triangle-1-s" is moved one pixel to left, so to set icon to the same exact position as before you'll have to update jQuery UI stylesheet accordingly.

@mdprw mdprw mentioned this pull request Aug 10, 2016
@Jupakabra
Copy link

Is this backward compatible with jQuery UI 1.11? Because I dont see controlgroup being declared in 1.11 for this to work.

@trentrichardson
Copy link
Owner

This is not backwards compatible according to the author of the pull request:

#891

Work will need to be done to make it compatible, or draw a line in the sand declaring support only for jquery ui 1.12+. I'd prefer it be backwards compatible, but I would have to look at the required changes.

@mdprw
Copy link
Author

mdprw commented Sep 1, 2016

@Jupakabra @trentrichardson
This PR is not compatible with jQuery UI 1.11:

  • Controlgroup is new in version 1.12 and the replacement for the deprecated buttonset which will be removed in version 1.13.
  • Button rewrite changed the sintax for icons.
  • Some changes in icon placement in stylesheet.

If you want to support older versions you should detect if the user is using version 1.12 and set $.uiBackCompat flag to false (which "disables" API for version 1.11) to provide the code of this PR and apply the changes to the stylesheet. Otherwise use the old code and css.

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

Successfully merging this pull request may close these issues.

None yet

3 participants