the replaced tabledrag.js stopped functioning when I upgraded to jquery_update to use jQuery 1.4.2

Attached is a patch that resolves the issue with drag+drop in tabledrag.js.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mark.’s picture

You are awesome!! Thank you!! I thought I was going to have to be stuck with 1.2.

sun’s picture

Status: Active » Closed (duplicate)
realityloop’s picture

Status: Closed (duplicate) » Active

I'm re-opening this as the supposed duplicate is closed but the issue remains in dev download dated 2010-Sep-09..

I can confirm this patch works with both the packaged version of jquery, and jquery 1.4.2 when applied to jquery_update.module,v 1.5.2.2.2.4 2009/04/23 version of jquery_update, but not with the 2010-Sep-09 that is currently available

realityloop’s picture

Version: 6.x-2.0-alpha1 » 6.x-2.x-dev

bumping version

alanburke’s picture

Status: Active » Needs work

Tested this patch with the patch at
http://drupal.org/node/685060#comment-3560918
I removed the tabletag changes in that patch [as they weren't working for me either].
It doesn't appear to be working.
The table rows can be 'dragged' but not 'dropped'.
Tested on firefox 3.6 Mac

squarecandy’s picture

The current stable 6.x-1.1 was not actually replacing tabledrag.js
switched to 6.x-2.x-dev - now it's replacing the file, but my drag handles are still missing from admin/build/block, etc...
Used this hack on tabledrag.js:
http://drupal.org/node/784266#comment-2996288

Working for me on the block admin page - dragging, dropping saving.
Haven't if this will have a negative impact elsewhere that tabledrag is used...

mraaroncruz’s picture

Issue tags: +jQuery 1.5

This patch works for me with jQuery v1.5!!

The problem seems to be that in jQuery >= 1.4, $.size() always returns at least 1 instead of 0 like the buggy script expects.

Thanks for the great patch! This would have taken me a long time to find...

stackpr’s picture

Issue tags: -jQuery 1.5 +jQuery 1.5.1
FileSize
805 bytes

I experienced the same problem with jQuery 1.5.1. The drag handles did not appear throughout the CCK interfaces. I adjusted tabledrag before noticing this issue existed. This patch seems to address the same issue (in the same spot in the code) but sticks with .size() as some people prefer that style... The size() bug referenced in #7 may just apply to calls after append()?? Tested on FF3.6 (win/lin).

stackpr’s picture

Status: Needs work » Needs review

Corrected the status -- there are 2 viable patches on the issue.

pifantastic’s picture

@witti's patch worked for me :) Muchos gracias.

smoothify’s picture

Issue tags: +jQuery 1.7

This patch worked for me using the 6.x-2.x release along with jQuery 1.7.

Thanks @witti

eliosh’s picture

Confirm patch in #8.

Using jQuery 1.7 with module version = "6.x-2.0-alpha1+7-dev"

pitxels’s picture

Also Confirm patch in #8.

Using jQuery 1.7 with module version = "6.x-2.0-alpha1+7-dev"

Please commit

rbayliss’s picture

Status: Needs review » Reviewed & tested by the community

Patch in the OP seems cleanest, but really either one would do. This fixed tabledrag in both hierarchical and flat implementations for me.

pebosi’s picture

#8 works for me too with jQuery 1.7 and dev version.

KarlShea’s picture

Issue summary: View changes

Confirmed #8 fixes tabledrag with jQuery 1.7 and dev.

markhalliwell’s picture

Status: Reviewed & tested by the community » Closed (outdated)

Drupal 6 reached EOL (end-of-life) on February 24, 2016.