The checkbox column header disappears if #js_select is set to false on a tableselect element. This causes headers not to align with rows. I believe a simple solution could be to add a little piece of code in theme_tableselect().

NOW:

    if ($element['#js_select']) {
      drupal_add_js('misc/tableselect.js');
      array_unshift($header, array('class' => array('select-all')));
    }

CHANGE TO:

    if ($element['#js_select']) {
      drupal_add_js('misc/tableselect.js');
      array_unshift($header, array('class' => array('select-all')));
    } else {
      //Add empty checkbox column header.
      array_unshift($header, array('data' => ''));
    }

Comments

heine’s picture

Title: tableselect and #js_select » regression: tableselect headers misaligned when #js_select is FALSE
heine’s picture

Status: Active » Needs review
StatusFileSize
new512 bytes
sbrattla’s picture

Confirming that this patch works fine for me on 7.0-alpha6.

heine’s picture

Status: Needs review » Closed (duplicate)