when drag behavior is added to the table that itself contains tables i get js error in Drupal.tableDrag.prototype.hideColumns function.

the specific code below is responsible. the td and tr selector should be limited to child of cell.parent() and not go through
any "td" and "tr" tags on nested tables.

      var columnIndex = $('td', cell.parent()).index(cell.get(0)) + 1;
      var headerIndex = $('td:not(:hidden)', cell.parent()).index(cell.get(0)) + 1;
      $('tr', this.table).each(function(){

the drupal original tabledrag.js is handling this correctly.
here is one suggestion how to do this:

      var columnIndex = $('> td', cell.parent()).index(cell.get(0)) + 1;
      var headerIndex = $('> td:not(:hidden)', cell.parent()).index(cell.get(0)) + 1;
      $('> thead > tr, > tbody > tr, > tr', this.table).each(function(){

Comments

jenlampton’s picture

Status: Active » Closed (duplicate)

Pretty sure this is a duplicate of http://drupal.org/node/775162