Code

Updated sortableListing
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 6 Jul 2010 12:38:12 +0000 (12:38 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 6 Jul 2010 12:38:12 +0000 (12:38 +0000)
-Do not use the 'onClick' statement for columns that contain links or buttons (HTML actions)
 This enables us to use action images/icons such as download buttons in sortable listings.

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18942 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_sortableListing.inc

index 3af979b285c2ac88fa4a9f016fb592e53e15da6c..79bc25e7ab45bb4821db12350d818bef09f4e473 100644 (file)
@@ -298,8 +298,14 @@ class sortableListing {
         $first= " style='border:0'";
 
         foreach ($this->displayData[$row] as $column) {
-          $result.= "   <td$editable$first>".$column."</td>\n";
-          $first= "";
+
+            // Do NOT use the onClick statement for columns that contain links or buttons.
+            if(preg_match("<.*type=.submit..*>", $column) || preg_match("<a.*href=.*>", $column)){
+                $result.= "   <td$first>".$column."</td>\n";
+            }else{
+                $result.= "   <td$editable$first>".$column."</td>\n";
+            }
+            $first= "";
         }
 
         if ($action_width) {