Backport jquery tabs to Drupal 5

tom_o_t - October 17, 2008 - 21:45
Project:Javascript Tools
Version:6.x-1.x-dev
Component:Tabs
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs work
Description

Would you consider backporting this to Drupal 5?

I know that it already exists as part of the jstools module, but it uses jquery tabs 2 (http://stilbuero.de/jquery/tabs/), and I'd really like to be able to use jquery tabs 3 (http://stilbuero.de/jquery/tabs_3/) as is used in this module. I had a look through the code and couldn't see anything in the D6 version of the module here that should cause a problem in D5, but I tried installing it, and it didn't work. The form doesn't seem to be processed correctly using return tabs_render($form); - the $element array's not containing the correct information.

If you'd suggest patching jstools to upgrade to tabs 3, I can re-post this feature request there.

My reason for needing tabs 3 is that embedding the tabs2 inside an iframe in Google Chrome / safari breaks the tabs. If you click on a new tab it shows briefly, then reverts back to the initial tab. It's not just a Drupal issue - I've tried looking at other tabs 2 pages inside an iframe and get the same behavior. You can see this behavior at http://www.opengreenmap.org/en/greenmap/compost-green-map-manhattan (using chrome or safari, click on a site on the map, click on the + symbol to expand the infowindow, then try clicking on the tabs).

Thanks for any help or advice you're able to offer...

#1

tom_o_t - October 20, 2008 - 22:01
Status:active» needs review

Here's patches for tabs.module and tabs.js
This is my first attempt at creating patches, so please let me know if there are adjustments I need to make.

This works for me, though I think I ought to add some dependencies. I'm using it with jquery update 2, though I've not done any research to see if this is actually a dependency.

To reiterate my reason for doing this - the tabs module in jstools uses an old and no-longer supported version of jquery tabs. This old version doesn't work inside iframes, which means that it can't be used for great modules like John Snow's embed widgets.

AttachmentSize
tabs-5.patch 2.18 KB
tabs-js-5.patch 791 bytes

#2

nedjo - August 18, 2009 - 21:48
Project:Tabs (jQuery UI tabs)» Javascript Tools
Version:6.x-1.0» 6.x-1.x-dev
Component:Code» Tabs
Status:needs review» needs work

It's not easy to fix this issue.

We can't release a D5 version here without potential conflicts with the existing tabs module in jstools.

We could do this as a patch on the jstools version, but so far jstools doesn't require jquery_update. Also, that would mean introducing a dependency midstream.

Moving to jstools. I guess this would have to be a patch on that version.

 
 

Drupal is a registered trademark of Dries Buytaert.