From: cajus Date: Tue, 19 Jan 2010 11:58:11 +0000 (+0000) Subject: Enable single click edit X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=81d49c26f3bd4e32d919047cd72de1916ac03adf;p=gosa.git Enable single click edit git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15197 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/class_sortableListing.inc b/gosa-core/include/class_sortableListing.inc index 8ebd88c4b..2dc8237a9 100644 --- a/gosa-core/include/class_sortableListing.inc +++ b/gosa-core/include/class_sortableListing.inc @@ -102,6 +102,12 @@ class sortableListing { } + function setReorderable($flag) + { + $this->reorderable= $flag; + } + + function setInstantDelete($flag) { $this->instantDelete= $flag; @@ -152,7 +158,7 @@ class sortableListing { if (strpos($this->acl, 'w') === false) { $edit_image= $this->editable?""._("Edit")."":""; } else { - $edit_image= $this->editable?"":""; + $edit_image= $this->editable?"":""; } if (strpos($this->acl, 'd') === false) { $delete_image= $this->deleteable?""._("Delete")."":""; @@ -189,9 +195,11 @@ class sortableListing { // Render table body if we've read permission $result.= " \n"; + $reorderable= $this->reorderable?"":" style='cursor:default'"; if (strpos($this->acl, 'r') !== false) { foreach ($this->mapping as $nr => $row) { - $result.= " \n"; + $editable= $this->editable?" onclick='$(\"edit_".$this->id."_$nr\").click()'":""; + $result.= " \n"; foreach ($this->displayData[$row] as $column) { $result.= " ".htmlentities($column)."\n"; } @@ -211,14 +219,16 @@ class sortableListing { // Append script stuff if needed $result.= '';