omji / django-tabbed-admin

Easily add tabs to django admin forms
BSD 3-Clause "New" or "Revised" License
63 stars 68 forks source link

Adjusted Tab Selection for jQueryUI 1.10+ #2

Closed kennethwyu closed 8 years ago

kennethwyu commented 8 years ago

In jQueryUI v1.9, the select method was deprecated:

The select method has been deprecated in favor of just updating the active option. You should replace all calls to the select method with calls to the option method to change the active option.

In v1.10, it was removed entirely.

As jQueryUI 1.11.4 is bundled with django-tabbed-admin, a no such method 'select' for tabs widget instance exception is thrown when trying to select the first non-disabled tab in add view.

This PR updates change_form.html to use the new jQueryUI method for selecting tabs via option, namely:

$('#tabs').tabs("option", "active", enabled_tabs[0]);

omji commented 8 years ago

Hi,

Thanks so much for your help and sorry for the late answer, I was travelling. You are absolutely right and I have pushed your fix as release 0.0.5 in pypi.

Thanks again!