Anybody working on a $,tabs integration for drupal?

Events happening in the community are now at Drupal community events on www.drupal.org.
alex_b's picture

We're about to use the $.tabs plug in from stilbuero on a site. I ll write a wrapper module for it - anybody up to the same task?

This is a cooking recepie on how to use $.tabs for blocks:

http://drupal.org/node/89338

Comments

See the tabs module, part of Javascript Tools

nedjo's picture

I've included a tabs utility module using the jQuery tabs plugin in Javascript Tools, http://drupal.org/project/jstools.

See the activesearch module for an example of how to implement them in a module.

Approach

nedjo's picture

The main things I did were:
* Provide theme functions to output an array of tabbed pages. See the tabs.module code for an example. You can navigate to tabs/example to see the example displayed.
* Integrate the tab display with Drupal's menu tabs so that tabs display like the primary local task tabs and correctly switch the 'active' class when a new tab is selected.

There's a fair bit more that could be done.

  • A Forms API integration. I'd done that for 4.7 (using a different tabs js library), but had to drop the approach because of the structure of the HTML used by tabs module.
  • Implement secondary tasks.
  • Add support for the jQuery history plugin.
  • Use the jQuery cookies plugin (which I've included in Javascript tools, see an implementation in the collapsiblock module) to remember which tab is selected between page views.
  • Etc.

Please, improve my start.

Thanks for your the detailed

alex_b's picture

Thanks for your the detailed information, I just downloaded tabs module. I hope I will be able to contribute.

Is there any particular

alex_b's picture

Is there any particular reason why the js file is called jquery.tabs.js and not jquery.tabs.pack.js (that's the filename of the latest $.tabs downloadable on http://www.stilbuero.de/2006/11/05/tabs-version-2/)?

If I integrate jquery.history.pack.js should I also rename it to jquery.history.js?

Alex

That was the name of the file...

nedjo's picture

...when I downloaded it, evidently it was since renamed. We should go ahead and use the newer one, including its new name, provided it still works with the version of jQuery that ships with Drupal 5. And history would make sense with its new name. History might go straight in the jstools module folder so it can be used by other modules besides tabs, like I did with the cookies plugin.

.pack suffixes

recidive's picture

I guess the .pack suffixes are added to file names because they are the compressed ones, i.e. not the human readable source code.

I just uploaded a patch that

alex_b's picture

I just uploaded a patch that integrates history package and upgrades to the lates $.tabs version. http://drupal.org/node/116975

Javascript

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: