tabledrag.js wrong header cell removed
Pasqualle - March 6, 2008 - 20:01
| Project: | Drupal |
| Version: | 6.x-dev |
| Component: | javascript |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | duplicate |
Jump to:
Description
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.

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