mirror of
https://github.com/processwire/processwire.git
synced 2025-08-17 20:11:46 +02:00
allow custom th classes
this allows customization of th elements and when using relative column sizing classes it also allows to avoid repeating those classes in every tbody row.
This commit is contained in:
@@ -135,8 +135,11 @@ class MarkupAdminDataTable extends ModuleJS {
|
||||
if(count($this->headerRow)) {
|
||||
$out .= "\n\t<thead>\n\t<tr>";
|
||||
foreach($this->headerRow as $th) {
|
||||
$class = '';
|
||||
if(is_array($th)) list($th, $class) = $th;
|
||||
$th = $this->encode($th);
|
||||
$out .= "\n\t\t<th>$th</th>";
|
||||
if($class) $class = " class='" . $this->encode($class) . "'";
|
||||
$out .= "\n\t\t<th$class>$th</th>";
|
||||
$maxCols++;
|
||||
}
|
||||
$out .= "\n\t</tr>\n\t</thead>";
|
||||
|
Reference in New Issue
Block a user