Code

Fixed field naming
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 16 Mar 2010 12:30:05 +0000 (12:30 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 16 Mar 2010 12:30:05 +0000 (12:30 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@16624 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_filter.inc
gosa-core/include/class_listing.inc

index cc538d9b4ba05926b846507f73fa8719d5ccdf31..606979b6ce4a6ed49f12f56be69983b02a877eee 100644 (file)
@@ -290,14 +290,14 @@ class filter {
       }
 
       // Save scope if needed
-      if ($this->scopeMode == "auto" && isset($_POST['act']) && $_POST['act'] == "toggle-subtree") {
+      if ($this->scopeMode == "auto" && isset($_POST['filter']) && $_POST['filter'] == "toggle-subtree") {
         $this->scope= ($this->scope == "one")?"sub":"one";
       }
 
       // Switch filter?
-      if (isset($_POST['act'])) {
+      if (isset($_POST['filter'])) {
         foreach ($this->searches as $tag => $cfg) {
-          if ($_POST['act'] == "filter-$tag") {
+          if ($_POST['filter'] == "filter-$tag") {
             $this->setSearch($tag);
             break;
           }
@@ -411,7 +411,7 @@ class filter {
   function renderFilterMenu()
   {
     // Load shortcut
-    $result= "<input type='hidden' name='act' id='filter' value=''><div style='display:none'><input type='submit' name='exec_filter' id='exec_filter' value=''></div>".
+    $result= "<input type='hidden' name='filter' id='filter' value=''><div style='display:none'><input type='submit' name='exec_filter' id='exec_filter' value=''></div>".
       "<ul class='level1' id='filter-root'><li><a href='#'>".image("images/filter.png").image("images/lists/sort-down.png")."</a>";
 
     // Build ul/li list
index 6175a42323ceff92b0542460d0097feeedf2cbdc..0b7219cc5218e1f66ddbc861f78969ee9175bbde 100644 (file)
@@ -1112,7 +1112,7 @@ class listing {
 
     // Load shortcut
     $actions= &$this->xmlData['actionmenu']['action'];
-    $result= "<input type='hidden' name='act' id='actionmenu' value=''><div style='display:none'><input type='submit' name='exec_act' id='exec_act' value=''></div>".
+    $result= "<input type='hidden' name='act' id='act' value=''><div style='display:none'><input type='submit' name='exec_act' id='exec_act' value=''></div>".
              "<ul class='level1' id='root'><li><a href='#'>"._("Actions")."&nbsp;".image("images/lists/sort-down.png")."</a>";
 
     // Build ul/li list
@@ -1177,7 +1177,7 @@ class listing {
 
       // Render entry elseways
       if (isset($action['label'])){
-        $result.= "<li$separator><a href='#' onClick='document.getElementById(\"actionmenu\").value= \"".$action['name']."\";mainform.submit();'>$img"._($action['label'])."</a></li>";
+        $result.= "<li$separator><a href='#' onClick='document.getElementById(\"act\").value= \"".$action['name']."\";document.getElementById(\"exec_act\").click();'>$img"._($action['label'])."</a></li>";
       }
 
       // Check for special types
@@ -1383,13 +1383,13 @@ class listing {
 
       // Copy entry
       if($copy){
-        $result.= "<li$separator><a href='#' onClick='document.getElementById(\"actionmenu\").value= \"copy\";document.getElementById(\"exec_act\").click();'>".image('images/lists/copy.png')."&nbsp;"._("Copy")."</a></li>";
+        $result.= "<li$separator><a href='#' onClick='document.getElementById(\"act\").value= \"copy\";document.getElementById(\"exec_act\").click();'>".image('images/lists/copy.png')."&nbsp;"._("Copy")."</a></li>";
         $separator= "";
       }
 
       // Cut entry
       if($cut){
-        $result.= "<li$separator><a href='#' onClick='document.getElementById(\"actionmenu\").value= \"cut\";document.getElementById(\"exec_act\").click();'>".image("images/lists/cut.png")."&nbsp;"._("Cut")."</a></li>";
+        $result.= "<li$separator><a href='#' onClick='document.getElementById(\"act\").value= \"cut\";document.getElementById(\"exec_act\").click();'>".image("images/lists/cut.png")."&nbsp;"._("Cut")."</a></li>";
         $separator= "";
       }
     }
@@ -1397,7 +1397,7 @@ class listing {
     // Draw entries that allow pasting entries
     if($paste){
       if($this->copyPasteHandler->entries_queued()){
-        $result.= "<li$separator><a href='#' onClick='document.getElementById(\"actionmenu\").value= \"paste\";document.getElementById(\"exec_act\").click();'>".image("images/lists/paste.png")."&nbsp;"._("Paste")."</a></li>";
+        $result.= "<li$separator><a href='#' onClick='document.getElementById(\"act\").value= \"paste\";document.getElementById(\"exec_act\").click();'>".image("images/lists/paste.png")."&nbsp;"._("Paste")."</a></li>";
       }else{
         $result.= "<li$separator><a href='#'>".image('images/lists/paste-grey.png')."&nbsp;"._("Paste")."</a></li>";
       }
@@ -1463,7 +1463,7 @@ class listing {
 
       // Draw icons according to the restore flag
       if($restore){
-        $result.= "<li$separator><a href='#' onClick='document.getElementById(\"actionmenu\").value= \"restore\";document.getElementById(\"exec_act\").click();'>".image('images/lists/restore.png')."&nbsp;"._("Restore snapshots")."</a></li>";
+        $result.= "<li$separator><a href='#' onClick='document.getElementById(\"act\").value= \"restore\";document.getElementById(\"exec_act\").click();'>".image('images/lists/restore.png')."&nbsp;"._("Restore snapshots")."</a></li>";
       }else{
         $result.= "<li$separator><a href='#'>".image('images/lists/restore-grey.png')."&nbsp;"._("Restore snapshots")."</a></li>";
       }
@@ -1483,7 +1483,7 @@ class listing {
 
     // Export CVS as build in exporter
     foreach ($this->exporter as $action => $exporter) {
-      $result.= "<li><a href='#' onClick='document.getElementById(\"actionmenu\").value= \"$action\";document.getElementById(\"exec_act\").click();'>".image($exporter['image'])."&nbsp;".$exporter['label']."</a></li>";
+      $result.= "<li><a href='#' onClick='document.getElementById(\"act\").value= \"$action\";document.getElementById(\"exec_act\").click();'>".image($exporter['image'])."&nbsp;".$exporter['label']."</a></li>";
     }
 
     // Finalize list
@@ -1540,7 +1540,7 @@ class listing {
       $events= DaemonEvent::get_event_types_by_category($this->categories);
       if(isset($events['BY_CLASS']) && count($events['BY_CLASS'])){
         foreach($events['BY_CLASS'] as $name => $event){
-          $result.= "<li$separator><a href='#' onClick='document.getElementById(\"actionmenu\").value=\"$name\";document.getElementById(\"exec_act\").click();'>".$event['MenuImage']."&nbsp;".$event['s_Menu_Name']."</a></li>";
+          $result.= "<li$separator><a href='#' onClick='document.getElementById(\"act\").value=\"$name\";document.getElementById(\"exec_act\").click();'>".$event['MenuImage']."&nbsp;".$event['s_Menu_Name']."</a></li>";
           $separator= "";
         }
       }