Consider colspan attributes when adding table cells/rows

pull/37/head
Thomas Bruederli 12 years ago
parent 7f64d7c2e4
commit ae44bf4dc7

@ -681,9 +681,9 @@ class html_table extends html
$cell->content = $cont; $cell->content = $cont;
$this->rows[$this->rowindex]->cells[$this->colindex] = $cell; $this->rows[$this->rowindex]->cells[$this->colindex] = $cell;
$this->colindex++; $this->colindex += max(1, intval($attr['colspan']));
if ($this->attrib['cols'] && $this->colindex == $this->attrib['cols']) { if ($this->attrib['cols'] && $this->colindex >= $this->attrib['cols']) {
$this->add_row(); $this->add_row();
} }
} }

Loading…
Cancel
Save