* make table responsive.

This commit is contained in:
Catouse
2018-05-30 11:43:02 +08:00
parent e3d2ccfed4
commit 33aa0834d5
22 changed files with 1905 additions and 1861 deletions
+34 -32
View File
@@ -185,38 +185,40 @@ js::set('browseType', $browseType);
$widths = $this->datatable->setFixedFieldWidth($customFields);
$columns = 0;
?>
<table class='table has-sort-head' id='taskList'>
<thead>
<tr>
<?php
foreach($customFields as $field)
{
if($field->show)
{
$this->datatable->printHead($field, $orderBy, $vars);
$columns++;
}
}
?>
</tr>
</thead>
<tbody>
<?php foreach($tasks as $task):?>
<tr data-id='<?php echo $task->id;?>' data-status='<?php echo $task->status?>' data-estimate='<?php echo $task->estimate?>' data-consumed='<?php echo $task->consumed?>' data-left='<?php echo $task->left?>'>
<?php foreach($customFields as $field) $this->task->printCell($field, $task, $users, $browseType, $branchGroups, $modulePairs, $useDatatable ? 'datatable' : 'table');?>
</tr>
<?php if(!empty($task->children)):?>
<?php foreach($task->children as $key => $child):?>
<?php $class = $key == 0 ? ' table-child-top' : '';?>
<?php $class .= ($key + 1 == count($task->children)) ? ' table-child-bottom' : '';?>
<tr class='table-children<?php echo $class;?> parent-<?php echo $task->id;?>' data-id='<?php echo $child->id?>' data-status='<?php echo $child->status?>' data-estimate='<?php echo $child->estimate?>' data-consumed='<?php echo $child->consumed?>' data-left='<?php echo $child->left?>'>
<?php foreach($customFields as $field) $this->task->printCell($field, $child, $users, $browseType, $branchGroups, $modulePairs, $useDatatable ? 'datatable' : 'table', true);?>
</tr>
<?php endforeach;?>
<?php endif;?>
<?php endforeach;?>
</tbody>
</table>
<div class="table-responsive">
<table class='table has-sort-head' id='taskList'>
<thead>
<tr>
<?php
foreach($customFields as $field)
{
if($field->show)
{
$this->datatable->printHead($field, $orderBy, $vars);
$columns++;
}
}
?>
</tr>
</thead>
<tbody>
<?php foreach($tasks as $task):?>
<tr data-id='<?php echo $task->id;?>' data-status='<?php echo $task->status?>' data-estimate='<?php echo $task->estimate?>' data-consumed='<?php echo $task->consumed?>' data-left='<?php echo $task->left?>'>
<?php foreach($customFields as $field) $this->task->printCell($field, $task, $users, $browseType, $branchGroups, $modulePairs, $useDatatable ? 'datatable' : 'table');?>
</tr>
<?php if(!empty($task->children)):?>
<?php foreach($task->children as $key => $child):?>
<?php $class = $key == 0 ? ' table-child-top' : '';?>
<?php $class .= ($key + 1 == count($task->children)) ? ' table-child-bottom' : '';?>
<tr class='table-children<?php echo $class;?> parent-<?php echo $task->id;?>' data-id='<?php echo $child->id?>' data-status='<?php echo $child->status?>' data-estimate='<?php echo $child->estimate?>' data-consumed='<?php echo $child->consumed?>' data-left='<?php echo $child->left?>'>
<?php foreach($customFields as $field) $this->task->printCell($field, $child, $users, $browseType, $branchGroups, $modulePairs, $useDatatable ? 'datatable' : 'table', true);?>
</tr>
<?php endforeach;?>
<?php endif;?>
<?php endforeach;?>
</tbody>
</table>
</div>
<?php if($tasks):?>
<div class="table-footer">
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>