summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b091eb9)
raw | patch | inline | side by side (parent: b091eb9)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 25 Jan 2010 13:20:43 +0000 (13:20 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 25 Jan 2010 13:20:43 +0000 (13:20 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15280 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_sortableListing.inc | patch | blob | history |
diff --git a/gosa-core/include/class_sortableListing.inc b/gosa-core/include/class_sortableListing.inc
index b0539c2029bdd44afafb947aade2339d0eff0466..a30758ebc3c3ccba455edc2e079eeecb61530b65 100644 (file)
// Transfer information
$this->displayData= array();
+ $this->modes= array();
foreach ($data as $key => $value) {
$this->displayData[]= $value['data'];
+ if (isset($value['mode'])) {
+ $this->modes[]= $value['mode'];
+ }
}
$this->keys= array_keys($data);
switch ($this->modes[$row]) {
case LIST_DISABLED:
$id= " sortableListItemDisabled";
- $editable= false;
+ $editable= "";
break;
case LIST_MARKED:
$id= " sortableListItemMarked";
foreach ($_POST as $key => $value) {
if (preg_match('/^del_'.$this->id.'_([0-9]+)_x.*$/', $key, $matches)) {
$this->active_index= $this->mapping[$matches[1]];
+
+ // Ignore request if mode requests it
+ if (isset($this->modes[$this->active_index]) && $this->modes[$this->active_index] == LIST_DISABLED) {
+ $this->active_index= null;
+ continue;
+ }
+
+ // Set action
$this->action= "delete";
+
+ // Remove value if requested
if ($this->instantDelete) {
$this->deleteEntry($this->active_index);
}
foreach ($_POST as $key => $value) {
if (preg_match('/^edit_'.$this->id.'_([0-9]+)_x.*$/', $key, $matches)) {
$this->active_index= $this->mapping[$matches[1]];
+
+ // Ignore request if mode requests it
+ if (isset($this->modes[$this->active_index]) && $this->modes[$this->active_index] == LIST_DISABLED) {
+ $this->active_index= null;
+ continue;
+ }
+
$this->action= "edit";
}
}