From c552e4bb9f597e910a8a3e93671e0f426949f5a1 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 10 Feb 2026 12:09:51 +0100 Subject: [PATCH] tables can be sorted, better header for first column --- views/bootstrap/class.Charts.php | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/views/bootstrap/class.Charts.php b/views/bootstrap/class.Charts.php index 2ee5b797e..70d14f94c 100644 --- a/views/bootstrap/class.Charts.php +++ b/views/bootstrap/class.Charts.php @@ -32,6 +32,7 @@ class SeedDMS_View_Charts extends SeedDMS_Theme_Style { header('Content-Type: application/javascript; charset=UTF-8'); ?> + new Tablesort(document.getElementById('charttable')); $("
").css({ position: "absolute", display: "none", @@ -293,6 +294,8 @@ $(document).ready( function() { ''."\n". ''."\n". ''."\n"); + $this->htmlAddHeader(''."\n", 'js'); + $this->htmlAddHeader(''."\n", 'js'); $this->htmlStartPage(getMLText("folders_and_documents_statistic")); $this->globalNavigation(); @@ -321,9 +324,10 @@ $(document).ready( function() {
contentContainerEnd(); - echo ""; + echo "
"; + echo ""; echo ""; - echo ""; + echo ""; echo ""; $types = array('docspermonth', 'docsaccumulated'); if($quota) @@ -332,6 +336,8 @@ $(document).ready( function() { echo ""; echo ""; echo ""; + echo ""; + echo ""; $total = 0; switch($type) { case 'docspermonth': @@ -343,7 +349,7 @@ $(document).ready( function() { $oldtotal = 0; foreach($data as $item) { echo ""; - echo ""; + echo ""; echo ""; if(in_array($type, array('docspermonth'))) echo ""; @@ -356,13 +362,16 @@ $(document).ready( function() { $oldtotal = $item['total']; $total += $item['total']; } + echo ""; + echo ""; echo ""; + echo ""; break; case 'docsaccumulated': $oldtotal = 0; foreach($data as $item) { echo ""; - echo ""; + echo ""; echo ""; echo ""; $searchurl = $this->getSearchUrl($type, $item); @@ -374,12 +383,13 @@ $(document).ready( function() { $oldtotal = $item['total']; $total += $item['total']; } + echo ""; break; case 'sizeperuser': foreach($data as $item) { $currUser = $dms->getUser($item['res']); echo ""; - echo ""; + echo ""; if($quota) { echo ""; $total += $item['total']; } + echo ""; + echo ""; echo ""; + echo ""; break; case 'sizepermonth': foreach($data as $item) { - echo ""; + echo ""; + echo ""; $searchurl = $this->getSearchUrl($type, $item); if($searchurl) echo ""; @@ -407,7 +421,10 @@ $(document).ready( function() { echo ""; $total += $item['total']; } + echo ""; + echo ""; echo ""; + echo ""; break; } echo "
".getMLText('chart_'.$type.'_title')."".getMLText('chart_'.$type.'_first_col')."".getMLText('total')."Search
".htmlspecialchars($item['key'])."".htmlspecialchars($item['key'])."".$item['total']."".sprintf('%+d', $item['total']-$oldtotal)."
".$total."
".getReadableDate($item['key']/1000)."".getReadableDate($item['key']/1000)."".$item['total']."".sprintf('%+d', $item['total']-$oldtotal)."
".htmlspecialchars($item['key'])."".SeedDMS_Core_File::format_filesize((int) $item['total'])."".SeedDMS_Core_File::format_filesize((int) $item['total']).""; $qt = $currUser->getQuota() ? $currUser->getQuota() : $quota; @@ -394,11 +404,15 @@ $(document).ready( function() { echo "
".SeedDMS_Core_File::format_filesize($total)."
".htmlspecialchars($item['key'])."".SeedDMS_Core_File::format_filesize((int) $item['total'])."
".htmlspecialchars($item['key'])."".SeedDMS_Core_File::format_filesize((int) $item['total'])."
".SeedDMS_Core_File::format_filesize($total)."
";