1

I want to use some jquery plugins that need jquery 1.7.x But as you know jquery update in drupal 6.x only support jquery 1.3.x and lower.

if we copy jquery 1.7 to jquery update folder, it cause problems in table drag function.

Is there any way to repair table drag bugs with jquery high versions?

1

As mentioned in a comment on another answer, it's possible to load a newer version of jQuery alongside Drupal's without conflicting with Drupal's, using jQuery's built-in noConflict() mode.

You can do this very easily using the jQuery Multi module. Simply select the plugins using the module's UI, or include them via the hooks. Only your plugins will use the newer jQuery, and the rest of Drupal (like tabledrag), will remain untouched. See the module README for more info on how to use it.

2

The problem is that newer jQuery .after function returns the content to be added if you invoke it on an empty list. This breaks the tabledrag.js makeDraggable function.

The following patch that function fixed it for me:

   // Insert the handle after indentations (if any).
-  if ($('td:first .indentation:last', item).after(handle).size()) {
+  var td = $('td:first .indentation:last', item);
+  if (td.size() > 0) {
+    td.after(handle);
     // Update the total width of indentation in this entire table.
  • dear friend, what file must be patched ?!? – Mehrdad201 May 10 '13 at 11:43
  • tabledrag.js is the file I patched. – Matt Connolly May 12 '13 at 23:46
0

The dev release of jQuery Update, even the Drupal 6 version, will automatically let you upgrade your site to use jQuery 1.7 fairly safely.

Bear in mind this is a dev release so there will probably be some bugs, but if I remember correctly the tabledrag functionality does at least work.

It might be worth checking out the issue queue to see what other problems you might encounter using this version.

  • I searched for this and I think the best solution is using drupal_add_js and jquery.noConflict() togather. although I have jquery 1.3.2 via jquery_update module, I include another juqery library (such as jquery 1.7) and immediately add call jquery noConflict method. (with new variable jq17), then I must use jq17 instead of $ sign. the problem of this solution is , I have to change [replace] all '$' sign in my required plugins(with are using jquery 1.7) to new variable jq17 – Mehrdad201 Apr 24 '12 at 11:26
  • I am using jQuery Update with a patch applied that allows to use different version for admin side. With 1.7 for the front pages (which is required by some jQuery plugins) I use 1.5 for admin side. This however exposes minor bugs, such as I am unable to drag fields below the Disabled line (to make them hidden) - I have to explicitly use the row heights menu. Otherwise it's working just fine. – Artur May 14 '12 at 20:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.