* adjust for datatable.

This commit is contained in:
wangyidong
2018-03-28 16:20:28 +08:00
parent 189ad7ca31
commit 315a6f931f
4 changed files with 10 additions and 7 deletions
+5 -2
View File
@@ -127,10 +127,11 @@ class datatableModel extends model
{
$fixed = $col->fixed == 'no' ? 'true': 'false';
$width = is_numeric($col->width) ? "{$col->width}px" : $col->width;
$sorter = (isset($col->sort) and $col->sort == 'no') ? '' : '{sorter:false}';
$title = isset($col->name) ? "title='$col->name'" : '';
if($id == 'id' and (int)$width < 90) $width = '90px';
$width = $id != 'actions' ? "data-width='$width' style='width:$width'" : '';
echo "<th data-flex='$fixed' data-width='$width' style='width:$width' class='w-$id $sorter' $title>";
echo "<th data-flex='$fixed' $width class='c-$id' $title>";
if($id == 'actions')
{
echo $this->lang->actions;
@@ -141,7 +142,9 @@ class datatableModel extends model
}
else
{
if($id == 'id') echo "<div class='checkbox-primary check-all' title='{$this->lang->selectAll}'><label></label>";
common::printOrderLink($id, $orderBy, $vars, $col->title);
if($id == 'id') echo "</div>";
}
echo '</th>';
}