Code

Updated filters. Made list display non red framed icons.
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 10 Mar 2010 19:07:48 +0000 (19:07 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 10 Mar 2010 19:07:48 +0000 (19:07 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@16398 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/ihtml/themes/modern/userFilterEditor.tpl
gosa-core/include/class_sortableListing.inc
gosa-core/include/class_userFilter.inc

index 50789ffa57612996dbe7de5d5e42249026ddac47..c504380c4b7436a4ac4d970d24bedd283761c8d6 100644 (file)
@@ -65,6 +65,7 @@
 
 <hr>
 
+<b>Filter</b>
 <textarea name='filter' id='filter' cols="0" style='width:100%; height: 100px;'>{$filter}</textarea>
 
 <hr>
index cbb2334586a8d0cb5e27c269ff11c1dbef1b361d..d3b95ca84ce30de211ecb55dc3c2a89837a269e2 100644 (file)
@@ -189,14 +189,14 @@ class sortableListing {
     $result.= "<table summary='"._("Sortable list")."' border='0' cellpadding='0' cellspacing='0' width='100%' style='width:100%' ".(!empty($this->cssclass)?" class='".$this->cssclass."'":"").">\n";
     $action_width= 0;
     if (strpos($this->acl, 'w') === false) {
-      $edit_image= $this->editable?"<img class='center' src='images/lists/edit-grey.png' alt='"._("Edit")."'>":"";
+      $edit_image= $this->editable?image("images/lists/edit-grey.png"):"";
     } else {
-      $edit_image= $this->editable?"<input class='center' type='image' src='images/lists/edit.png' alt='"._("Edit")."' name='%ID' id='%ID' title='"._("Edit this entry")."'>":"";
+      $edit_image= $this->editable?image('images/lists/edit.png', "%ID", _("Edit this entry")):"";
     }
     if (strpos($this->acl, 'd') === false) {
-      $delete_image= $this->deleteable?"<img class='center' src='images/lists/trash-grey.png' alt='"._("Delete")."'>":"";
+      $delete_image= $this->deleteable?image('images/lists/trash-grey.png'):"";
     } else {
-      $delete_image= $this->deleteable?"<input class='center' type='image' src='images/lists/trash.png' alt='"._("Delete")."' name='%ID' title='"._("Delete this entry")."'>":"";
+      $delete_image= $this->deleteable?image('images/lists/trash.png', "%ID", _("Delete this entry")):"";
     }
 
     // Do we need colspecs?
@@ -226,7 +226,7 @@ class sortableListing {
         $link= "href='?plug=".$_GET['plug']."&amp;PID=".$this->id."&amp;act=SORT_$i'";
         $sorter= "";
         if ($i == $this->sortColumn){
-          $sorter= "&nbsp;<img border='0' title='".($this->sortDirection[$i]?_("Up"):_("Down"))."' src='images/lists/sort-".($this->sortDirection[$i]?"up":"down").".png' align='top'>";
+          $sorter= "&nbsp;".image("images/lists/sort-".($this->sortDirection[$i]?"up":"down").".png", null, $this->sortDirection[$i]?_("Up"):_("Down"));
         }
 
         if ($this->reorderable) {
@@ -372,7 +372,7 @@ class sortableListing {
     $this->action = "";
     if (strpos($this->acl, 'd') !== false){
       foreach ($_POST as $key => $value) {
-        if (preg_match('/^del_'.$this->id.'_([0-9]+)_x.*$/', $key, $matches)) {
+        if (preg_match('/^del_'.$this->id.'([0-9]+)$/', $key, $matches)) {
           $this->active_index= $this->mapping[$matches[1]];
 
           // Ignore request if mode requests it
@@ -395,7 +395,7 @@ class sortableListing {
     // Edit requested?
     if (strpos($this->acl, 'w') !== false){
       foreach ($_POST as $key => $value) {
-        if (preg_match('/^edit_'.$this->id.'_([0-9]+)_x.*$/', $key, $matches)) {
+        if (preg_match('/^edit_'.$this->id.'_([0-9]+)$/', $key, $matches)) {
           $this->active_index= $this->mapping[$matches[1]];
 
           // Ignore request if mode requests it
index c188e981257e630c1755e7904e6806e544a993e0..502e1de86e41f53d5e8b9cf2ace9df2e1f2011b0 100644 (file)
@@ -124,6 +124,9 @@ class userFilter extends plugin
   {
     plugin::execute();
 
+    // Let the filter widget update itself
+    $this->filterWidget->update();
+
     // Cancel filter modifications (edit dialog)
     if(isset($_POST['cancelFilterSettings'])){
       $this->dialog = NULL;