* Remove fixedTableHead for these reports.

This commit is contained in:
daitingting
2018-07-03 09:41:10 +08:00
parent 4d14558376
commit fd2754f293
11 changed files with 32 additions and 37 deletions
-1
View File
@@ -9,7 +9,6 @@ $(function()
});
};
resizeChartTable();
fixedTableHead('.table-wrapper');
$(window).resize(resizeChartTable);
});
+2 -2
View File
@@ -61,8 +61,8 @@
<thead>
<tr>
<th class='chart-label' colspan='2'><?php echo $lang->report->item;?></th>
<th><?php echo $lang->report->value;?></th>
<th><?php echo $lang->report->percent;?></th>
<th class='w-50px'><?php echo $lang->report->value;?></th>
<th class='w-50px'><?php echo $lang->report->percent;?></th>
</tr>
</thead>
<?php foreach($datas[$chartType] as $key => $data):?>
-1
View File
@@ -9,7 +9,6 @@ $(function()
});
};
resizeChartTable();
fixedTableHead('.table-wrapper');
$(window).resize(resizeChartTable);
});
+2 -2
View File
@@ -62,8 +62,8 @@
<thead>
<tr>
<th class='chart-label' colspan='2'><?php echo $lang->story->report->$chartType->item;?></th>
<th><?php echo $lang->story->report->value;?></th>
<th><?php echo $lang->report->percent;?></th>
<th class='w-50px'><?php echo $lang->story->report->value;?></th>
<th class='w-50px'><?php echo $lang->report->percent;?></th>
</tr>
</thead>
<?php foreach($datas[$chartType] as $key => $data):?>
-1
View File
@@ -9,7 +9,6 @@ $(function()
});
};
resizeChartTable();
fixedTableHead('.table-wrapper');
$(window).resize(resizeChartTable);
});
+2 -2
View File
@@ -61,8 +61,8 @@
<thead>
<tr>
<th class='chart-label' colspan='2'><?php echo $lang->task->report->$chartType->item;?></th>
<th><?php echo $lang->task->report->value;?></th>
<th><?php echo $lang->report->percent;?></th>
<th class='w-50px'><?php echo $lang->task->report->value;?></th>
<th class='w-50px'><?php echo $lang->report->percent;?></th>
</tr>
</thead>
<tbody>
-1
View File
@@ -9,5 +9,4 @@ $(function()
});
};
resizeChartTable();
fixedTableHead('.table-wrapper');
});
@@ -31,8 +31,8 @@
<thead>
<tr>
<th class='chart-label' colspan='2'><?php echo $lang->report->item;?></th>
<th><?php echo $lang->report->value;?></th>
<th><?php echo $lang->report->percent;?></th>
<th class='w-50px'><?php echo $lang->report->value;?></th>
<th class='w-50px'><?php echo $lang->report->percent;?></th>
</tr>
</thead>
<?php
@@ -53,7 +53,7 @@
if(empty($label) and empty($data)) continue;
?>
<tr class='text-center'>
<td class='chart-color w-20px'><i class='chart-color-dot icon-circle'></i></td>
<td class='chart-color w-20px'><i class='chart-color-dot'></i></td>
<td class='chart-label'><?php echo $label;?></td>
<td class='chart-value'><?php echo $data;?></td>
<td><?php echo round($data / $sum * 100, 2) . '%';?></td>
-1
View File
@@ -9,7 +9,6 @@ $(function()
});
};
resizeChartTable();
fixedTableHead('.table-wrapper');
$(window).resize(resizeChartTable);
});
+2 -2
View File
@@ -61,8 +61,8 @@
<thead>
<tr>
<th class='chart-label' colspan='2'><?php echo $lang->report->item;?></th>
<th><?php echo $lang->report->value;?></th>
<th><?php echo $lang->report->percent;?></th>
<th class='w-50px'><?php echo $lang->report->value;?></th>
<th class='w-50px'><?php echo $lang->report->percent;?></th>
</tr>
</thead>
<?php foreach($datas[$chartType] as $key => $data):?>
+21 -21
View File
@@ -446,27 +446,27 @@ function checkOnlybodyPage()
* @access public
* @return void
*/
function fixedTableHead(boxObj)
{
$(boxObj).scroll(function()
{
var hasFixed = $(this).find('.fixedHead').size() > 0;
if(!hasFixed)
{
$(this).css('position', 'relative');
if($(this).find('table').size() == 1)
{
var fixed = "<table class='fixedHead' style='position:absolute;top:0px'><thead>" + $(this).find('table thead').html() + '</thead></table>';
$(this).prepend(fixed);
var $fixTable = $(this).find('table.fixedHead');
$fixTable.addClass($(this).find('table:last').attr('class'));
var $dataTable = $(this).find('table:last thead th');
$fixTable.find('thead th').each(function(i){$fixTable.find('thead th').eq(i).width($dataTable.eq(i).width());})
}
}
$(this).find('table.fixedHead').css('top',$(this).scrollTop());
});
}
//function fixedTableHead(boxObj)
//{
// $(boxObj).scroll(function()
// {
// var hasFixed = $(this).find('.fixedHead').size() > 0;
// if(!hasFixed)
// {
// $(this).css('position', 'relative');
// if($(this).find('table').size() == 1)
// {
// var fixed = "<table class='fixedHead' style='position:absolute;top:0px'><thead>" + $(this).find('table thead').html() + '</thead></table>';
// $(this).prepend(fixed);
// var $fixTable = $(this).find('table.fixedHead');
// $fixTable.addClass($(this).find('table:last').attr('class'));
// var $dataTable = $(this).find('table:last thead th');
// $fixTable.find('thead th').each(function(i){$fixTable.find('thead th').eq(i).width($dataTable.eq(i).width());})
// }
// }
// $(this).find('table.fixedHead').css('top',$(this).scrollTop());
// });
//}
/**
* Fixed table head in list when scrolling.