From 36578fc4351d5947ba1f4c9d9b6d759d6dca3de6 Mon Sep 17 00:00:00 2001 From: cajus Date: Mon, 4 Jan 2010 15:23:50 +0000 Subject: [PATCH] Updated list rendering git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15011 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/html/include/focus.js | 3 ++ gosa-core/html/themes/default/style.css | 54 ++++++++++++++++++++++ gosa-core/ihtml/themes/default/headers.tpl | 6 +++ gosa-core/include/class_listing.inc | 47 ++++++++++--------- 4 files changed, 87 insertions(+), 23 deletions(-) diff --git a/gosa-core/html/include/focus.js b/gosa-core/html/include/focus.js index 6ade45d20..5774946a5 100644 --- a/gosa-core/html/include/focus.js +++ b/gosa-core/html/include/focus.js @@ -368,6 +368,9 @@ function adjust_height(e) { } document.getElementById("d_scrollbody").style.height=suggested+"px"; + if (document.getElementById("t_nscrollbody")) { + document.getElementById("t_nscrollbody").style.height=(suggested-24)+"px"; + } } return true; } diff --git a/gosa-core/html/themes/default/style.css b/gosa-core/html/themes/default/style.css index 56f3b542b..51f1bcb17 100644 --- a/gosa-core/html/themes/default/style.css +++ b/gosa-core/html/themes/default/style.css @@ -1859,3 +1859,57 @@ div.datepicker div.datepicker-footer { margin:0 0 0 3px; cursor:pointer; } + +/******************************** + * L i s t s * + ********************************/ + +/* List border */ +div.listContainer { + border-top: 1px solid #AAA; + border-bottom: 1px solid #AAA; + border-left: 1px solid #AAA; +} + +.fixedListHeader tr { + position: relative; + height: auto; +} + +.listHeaderFormat { + margin: 3px; + padding: 1px; + white-space: nowrap; +} + +.listHeaderFormat tr td { + border-right: 1px solid #AAA; + padding: 2px; + background-color: #F5F5F5; +} + +.listScrollContent { + height:100px; + overflow-x:hidden; + overflow-y:auto; +} + +.listScrollContent tr { + height: auto; + white-space: nowrap; +} + +.listScrollContent tr td:last-child { + padding-right: 20px; +} + +.listBodyFormat tr td { + color: #000000; + margin: 3px; + padding: 1px; + border-right: 1px solid #AAA; + word-wrap:break-word; + white-space:normal; + overflow: hidden; + max-width:500px; +} diff --git a/gosa-core/ihtml/themes/default/headers.tpl b/gosa-core/ihtml/themes/default/headers.tpl index d6647d341..39ff29602 100644 --- a/gosa-core/ihtml/themes/default/headers.tpl +++ b/gosa-core/ihtml/themes/default/headers.tpl @@ -17,6 +17,12 @@ + + diff --git a/gosa-core/include/class_listing.inc b/gosa-core/include/class_listing.inc index 137d6b2ae..f4c2ed9a0 100644 --- a/gosa-core/include/class_listing.inc +++ b/gosa-core/include/class_listing.inc @@ -256,6 +256,7 @@ class listing { } } + function render() { // Check for exeeded sizelimit @@ -271,25 +272,25 @@ class listing { $height= $this->height; } - $result.= "
\n"; - $result.= " -
\n"; + $result.= "
\n"; + // Build list body + $result.= "\n"; - // New table for the real list contents - $result.= ""; + // Close list + $result.= "
\n"; + + $result.= "\n"; $this->numColumns= count($this->colprops) + ($this->multiSelect?1:0); // Build list header - $result.= "\n"; + $result.= "\n"; if ($this->multiSelect) { $result.= "\n"; } foreach ($this->header as $header) { $result.= $header; } + $result.= "\n"; - // Add 13px for scroller - $result.= "
 
\n"; +########################### // No results? Just take an empty colspanned row if (count($this->entries) + count($this->departments) == 0) { @@ -390,23 +391,23 @@ class listing { $result.= ""; } - $result.= "
"; // Add the footer if requested - if ($this->showFooter) { - $result.= "
"; - - foreach ($this->objectTypes as $objectType) { - if (isset($this->objectTypeCount[$objectType['label']])) { - $label= _($objectType['label']); - $result.= "$label ".$this->objectTypeCount[$objectType['label']]."    "; - } - } - - $result.= " 
"; - } - - $result.= "
"; +################################# + #if ($this->showFooter) { + # $result.= "
"; + + # foreach ($this->objectTypes as $objectType) { + # if (isset($this->objectTypeCount[$objectType['label']])) { + # $label= _($objectType['label']); + # $result.= "$label ".$this->objectTypeCount[$objectType['label']]."    "; + # } + # } + + # $result.= " 
"; + #} $smarty= get_smarty(); $smarty->assign("usePrototype", "true"); -- 2.30.2