Code

Updated FAI entry listing
[gosa.git] / gosa-core / include / class_sortableListing.inc
index ec56d1215d10848f9a1ee2fb4716b9cca07aefc0..21b6672a5e7c4cac16571eb6da025855b60f6af6 100644 (file)
@@ -101,6 +101,7 @@ class sortableListing {
     // Transfer information
     $this->displayData= array();
     $this->modes= array();
+    $this->mapping= array();
     foreach ($data as $key => $value) {
       $this->displayData[]= $value['data'];
       if (isset($value['mode'])) {
@@ -110,7 +111,9 @@ class sortableListing {
     $this->keys= array_keys($data);
 
     // Create initial mapping
-    $this->mapping= range(0, abs(count($this->keys)-1));
+    if(count($this->keys)){
+      $this->mapping= range(0, abs(count($this->keys)-1));
+    }
     $this->current_mapping= $this->mapping;
 
     // Find the number of coluns
@@ -221,7 +224,7 @@ class sortableListing {
     // Do we need a header?
     if ($this->header) {
       $result.= " <thead>\n  <tr>\n";
-      $first= " style='border:0'";
+      $first= " style='border-left:0'";
       for ($i= 0; $i<$this->columns; $i++) {
         $link= "href='?plug=".$_GET['plug']."&amp;PID=".$this->id."&amp;act=SORT_$i'";
         $sorter= "";
@@ -247,7 +250,7 @@ class sortableListing {
     $reorderable= $this->reorderable?"":" style='cursor:default'";
     if (strpos($this->acl, 'r') !== false) {
       foreach ($this->mapping as $nr => $row) {
-        $editable= $this->editable?" onclick='$(\"edit_".$this->id."_$nr\").click()'":"";
+        $editable= $this->editable?" onClick='$(\"edit_".$this->id."_$nr\").click()'":"";
 
         $id= "";
         if (isset($this->modes[$row])) {