From f72a25e0d203754821f94e44fe72e8b470785250 Mon Sep 17 00:00:00 2001 From: cajus Date: Tue, 19 Jan 2010 16:41:38 +0000 Subject: [PATCH] Fixed sorter display without scroll bar git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15211 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/html/themes/default/style.css | 8 ++++++++ gosa-core/include/class_sortableListing.inc | 20 ++++++++++++++------ 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/gosa-core/html/themes/default/style.css b/gosa-core/html/themes/default/style.css index c9e2ccb50..b92a7309a 100644 --- a/gosa-core/html/themes/default/style.css +++ b/gosa-core/html/themes/default/style.css @@ -1927,6 +1927,7 @@ td.nlistFooter { div.sortableListContainer { border: 1px solid #AAA; overflow: auto; + background-color: white; } .sortableListContainer th{ @@ -1945,6 +1946,12 @@ div.sortableListContainer { tr.sortableListItem { background-color: white; cursor:move; + color: black; +} + +tr.sortableListItemFill { + background-color: white; + cursor:default; } tr.sortableListItemOdd ::-moz-selection, tr.sortableListItem ::-moz-selection{ @@ -1967,6 +1974,7 @@ tr.sortableListItemOdd code::selection, tr.sortableListItem code::selection { tr.sortableListItemOdd { background-color: #F5F5F5; cursor:move; + color: black; } tr.sortableListItem:hover, tr.sortableListItemOdd:hover { background-color: #EEE; diff --git a/gosa-core/include/class_sortableListing.inc b/gosa-core/include/class_sortableListing.inc index 24aa956b0..6c8e65647 100644 --- a/gosa-core/include/class_sortableListing.inc +++ b/gosa-core/include/class_sortableListing.inc @@ -58,10 +58,10 @@ class sortableListing { foreach ($data as $value) { $displayData[]= array($value); } - } else { - $this->setDisplayData($displayData); } + $this->setDisplayData($displayData); + // Generate instance wide unique ID $tmp= gettimeofday(); $this->id= 'l'.md5($tmp['sec']); @@ -160,7 +160,7 @@ class sortableListing { public function render() { $result= "
\n"; - $result.= "cssclass)?" class='".$this->cssclass."'":"").">\n"; + $result.= "
cssclass)?" class='".$this->cssclass."'":"").">\n"; $action_width= 0; if (strpos($this->acl, 'w') === false) { $edit_image= $this->editable?""._("Edit")."":""; @@ -217,8 +217,10 @@ class sortableListing { foreach ($this->mapping as $nr => $row) { $editable= $this->editable?" onclick='$(\"edit_".$this->id."_$nr\").click()'":""; $result.= " \n"; + $first= " style='border:0'"; foreach ($this->displayData[$row] as $column) { - $result.= " ".htmlentities($column)."\n"; + $result.= " ".htmlentities($column)."\n"; + $first= ""; } if ($action_width) { $result.= "\n"; } - } else { - $result.= " \n"; } + // Add spacer + $result.= " "; + $num= $action_width?$this->columns:$this->columns-1; + for ($i= 0; $i<$num; $i++) { + $result.= ""; + } + $result.= "\n"; + $result.= " \n
".str_replace('%ID', "edit_".$this->id."_$nr", $edit_image). @@ -226,10 +228,16 @@ class sortableListing { } $result.= "
\n
\n"; $result.= " \n"; $result.= " \n"; -- 2.30.2