diff --git a/lib/front/front.class.php b/lib/front/front.class.php index 152579b655..96468196a0 100644 --- a/lib/front/front.class.php +++ b/lib/front/front.class.php @@ -267,7 +267,7 @@ class html * @param boolean $checked if the type is checkbox, set the checked attribute. * @return string */ - static public function selectAll($scope = "", $type = "button", $checked = false) + static public function selectAll($scope = "", $type = "button", $checked = false, $class = '') { $string = << @@ -324,7 +324,7 @@ EOT; } elseif($type == 'button') { - $string .= ""; + $string .= ""; } return $string; diff --git a/module/bug/js/report.js b/module/bug/js/report.js index eb436d6e5a..bae6508b6e 100644 --- a/module/bug/js/report.js +++ b/module/bug/js/report.js @@ -9,5 +9,6 @@ $(function() }); }; resizeChartTable(); + fixTableHead('.table-wrapper'); $(window).resize(resizeChartTable); }); diff --git a/module/bug/view/report.html.php b/module/bug/view/report.html.php index fa0ceba044..93ea316560 100644 --- a/module/bug/view/report.html.php +++ b/module/bug/view/report.html.php @@ -30,10 +30,8 @@
bug->report->charts, $checkedCharts, '', 'block');?> -
- - bug->report->create);?> -
+ + bug->report->create);?>
@@ -56,18 +54,16 @@ bug->report->$chartType, 'height', $lang->bug->report->options->height) . 'px'; ?>
- - - + $data):?> - + diff --git a/module/story/js/report.js b/module/story/js/report.js index eb436d6e5a..bae6508b6e 100644 --- a/module/story/js/report.js +++ b/module/story/js/report.js @@ -9,5 +9,6 @@ $(function() }); }; resizeChartTable(); + fixTableHead('.table-wrapper'); $(window).resize(resizeChartTable); }); diff --git a/module/story/view/report.html.php b/module/story/view/report.html.php index 54d3f68091..72dcd0a947 100644 --- a/module/story/view/report.html.php +++ b/module/story/view/report.html.php @@ -30,10 +30,8 @@
story->report->charts, $checkedCharts, '', 'block');?> -
- - story->report->create, '', 'btn-sm btn-primary');?> -
+ + story->report->create, '', 'btn-sm btn-primary');?>
@@ -55,18 +53,16 @@
bug->report->charts[$chartType];?>
report->item;?>report->item;?> report->value;?> report->percent;?>
name;?> value;?> percent * 100) . '%';?>
- - - + $data):?> - + diff --git a/module/task/js/report.js b/module/task/js/report.js index eb436d6e5a..bae6508b6e 100644 --- a/module/task/js/report.js +++ b/module/task/js/report.js @@ -9,5 +9,6 @@ $(function() }); }; resizeChartTable(); + fixTableHead('.table-wrapper'); $(window).resize(resizeChartTable); }); diff --git a/module/task/view/report.html.php b/module/task/view/report.html.php index 6066f52018..d322d22f5d 100644 --- a/module/task/view/report.html.php +++ b/module/task/view/report.html.php @@ -30,10 +30,8 @@
task->report->charts, $checkedCharts, '', 'block')?> -
- - task->report->create, "", 'btn-sm btn-primary');?> -
+ + task->report->create, "", 'btn-sm btn-primary');?>
@@ -55,11 +53,9 @@
story->report->charts[$chartType];?>
story->report->$chartType->item;?>story->report->$chartType->item;?> story->report->value;?> report->percent;?>
name;?> value;?> percent * 100) . '%';?>
- - - + @@ -67,7 +63,7 @@ $data):?> - + diff --git a/www/js/my.full.js b/www/js/my.full.js index ef6840b2d6..b651f1ff01 100644 --- a/www/js/my.full.js +++ b/www/js/my.full.js @@ -1393,6 +1393,31 @@ function fixTfootAction(formID) }); } +/** + * Fix table head in div box. + * + * @param string $boxObj + * @access public + * @return void + */ +function fixTableHead(boxObj) +{ + $(boxObj).scroll(function() + { + $(this).css('position', 'relative'); + if($(this).find('table').size() == 1) + { + var fixHead = "
task->report->charts[$chartType];?>
task->report->$chartType->item;?>task->report->$chartType->item;?> task->report->value;?> report->percent;?>
name;?> value;?> percent * 100) . '%';?>
" + $(this).find('table thead').html() + '
'; + $(this).prepend(fixHead); + var $fixTable = $(this).find('table.fixHead'); + $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.fixHead').css('top',$(this).scrollTop()); + }); +} + /* Ping the server every some minutes to keep the session. */ needPing = true;