Shd depend on jQuery UI module to avoid duplication of js files.

CommentFileSizeAuthor
#5 tabs_jqueryui.patch663 bytesjerdavis
#3 tabs.patch596 bytesjerdavis

Comments

rickvug’s picture

I was just about to post this issue - you beat me to it! Glad to see efforts to unify the use of jQuery UI.

rickvug’s picture

jerdavis’s picture

Status: Active » Needs review
StatusFileSize
new596 bytes

This patch is a bare start at this compatibility. In addition to adding the patch, ui.tabs.js can be deprecated.

The patch simply replaces the drupal_add_js() call for ui.tabs.js with a jquery_ui_add(); API call that includes the ui.tabs widget. The call is wrapped in a module_exists check so current users don't get an error upon updating if jquery_ui isn't yet enabled. Also, jquery_ui.module has been added as a dependency to the info file.

This patch does not replace the effects functions with jquery ui effects or offer any other configuration. But it's a start and does make available newer features for ui.tabs, such as rotate().

Jer

nedjo’s picture

Thanks jerdavis. I'm not sure what happens if we introduce a dependency when sites have already installed this version. Will this break because jquery UI isn't present? Maybe for 6.x we should use this if jquery UI exists and if not default to the existing call.

jerdavis’s picture

StatusFileSize
new663 bytes

I was just thinking the same thing after I submitted the patch, there's no reason why that 'if' function can't just 'else' the default ui.tabs.js. Re-roll attached!

nedjo’s picture

Status: Needs review » Reviewed & tested by the community

Looks good, thanks.

pritish’s picture

For me, this patch breaks tabs.js,v 1.4 2008/04/14 18:35:30 - is there a dependency on another patch? It'd be great to get tabs rotating.

thanks

pritish’s picture

Status: Reviewed & tested by the community » Needs work

Changing status, hoping this information helps. Let me know if I can provide any more information.

jerdavis’s picture

pritishjacob,

Can you describe in more detail how it's breaking tabs.js? It's working fine locally in the testing I've done and on a production site - I'd be interested to know more about the issue you're having. Have you tried clearing your cache from admin/settings/performance? Have you tried disabling the javascript aggregation setting on that page?

Let me know what you find.

Jer

nedjo’s picture

@pritishjacob: thanks. Can you post the error messages you get?

pritish’s picture

Hey all - sorry I dissapeared for a couple weeks. I'll update this issue with more testing details soon.

jer - "Have you tried clearing your cache from admin/settings/performance? " Yes.

jer - "Have you tried disabling the javascript aggregation setting on that page?" Will test

nedjo - "Type page not found
Date Wednesday, February 4, 2009 - 2:13am
User admin
Location http://dev:8888/sites/all/modules/jquery_ui/jquery.ui/ui/minified/ui.cor...
Referrer http://dev:8888/admin/build/modules
Message sites/all/modules/jquery_ui/jquery.ui/ui/minified/ui.core.min.js
Severity warning
Hostname 127.0.0.1
Operations "

so I looked at the readme (oops) and see that I needed to download this. however, the mentioned d/l location doesn't seem to have the version expected. I found the expected js available at http://code.google.com/p/jquery-ui/downloads/list instead.

So, I'll continue to test this patch for now without the mentioned error in the way. Functionally, I don't have jquery rotate working yet with tabs.

thanks

Openlogic’s picture

I receive an error after adding the patch as well.

It looks similar to the JS error described here:
http://drupal.org/node/385762

Error: $(".drupal-tabs:not(.tabs-processed)", context).addClass("tabs-processed").each(function () {if ($(this).is(".tabs-navigation")) {Drupal.tabsNavigation(this);}}).find("> ul").tabs is not a function
Nick Robillard’s picture

It'd be great to see this added to the next version of tabs module. I just spent too much time debugging a version conflict problem and ended up hacking tabs.module. I guess that's what happens when you're forced to use a ui.tabs.js that's over 2 years old.

H3x’s picture

Does any one know how to enable "rotate" manually? I don't care if it's activated globally. I badly need this function in my website, but I'm hopeless at PHP so if anyone could point me in the right direction...

nedjo’s picture

Status: Needs work » Fixed

Tested and applied. I also updated the included version of ui.tabs.js and added ui.core.js (now a dependency).

I'd prefer that this depended on jquery_ui, but it's hard to introduce a dependency midversion without triggering potential errors. We can do this in D7.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

avpaderno’s picture

I am too late for this, but I would just make notice that jquery.ui is in core; there is no need to depend from jquery_ui.module because there isn't a version for Drupal 7, as Drupal already has the jQuery UI files.