Download & Extend

tabledrag.js wrong header cell removed

Project:Drupal core
Version:6.x-dev
Component:javascript
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (duplicate)

Issue Summary

If header cell before weight column uses colspan property, then the 'Weight' header remains visible, and another header cell gets hidden.

$header = array(
  array('data' => t('Column1'), 'colspan' => 2),
  array('data' => t('Column2')),
  array('data' => t('Weight')),
  array('data' => t('Column3')),
);

header Column3 will be removed instead Weight.

tabledrag.js
Drupal.tableDrag.prototype.hideColumns = function() {
...
var headerIndex = $('td:not(:hidden)', field.parents('tr:first')).index(cell.get(0)) + 1;

headerIndex calculates with the index of actual weight column, and does not check if any header cell span across more columns.

Comments

#1

Status:active» closed (duplicate)

patch needs review in http://drupal.org/node/217957

nobody click here