Code

Some changes
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 12 May 2006 06:18:35 +0000 (06:18 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 12 May 2006 06:18:35 +0000 (06:18 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3305 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/departments/class_departmentGeneric.inc
plugins/admin/departments/class_departmentManagement.inc
plugins/admin/departments/recursive_move.tpl

index 1f788f1955839ed18b32d2e82350dd2fd0f6ac04..c707e74227317cdfebd5b4e28f23eaabb9ec8ec9 100644 (file)
@@ -345,6 +345,7 @@ class department extends plugin
   {
     $smarty = get_smarty();
     $smarty->assign("src","?plug=".$_GET['plug']."&PerformRecMove");
+    $smarty->assign("message","As soon as the move operation has finished, you can scroll down to end of the page and press the 'Continue' button to continue with the department management dialog.");
     $display=  $smarty->fetch(get_template_path("recursive_move.tpl",TRUE));
     return($display);
   }
@@ -353,6 +354,7 @@ class department extends plugin
   {
     $smarty = get_smarty();
     $smarty->assign("src","?plug=".$_GET['plug']."&TagDepartment");
+    $smarty->assign("message","As soon as the tag operation has finished, you can scroll down to end of the page and press the 'Continue' button to continue with the department management dialog.");
     $display=  $smarty->fetch(get_template_path("recursive_move.tpl",TRUE));
     return($display);
   }
index 476008cffc6b38b60512dd271f39f1b2becbaf32..6a3bbbb74344e8f4555efd3d9f2f8bfb3a97fd3a 100644 (file)
@@ -39,9 +39,11 @@ class departmentManagement extends plugin
        var $attributes= array();
        var $objectclasses= array();
 
-  var $ObjectInSaveMode         = false;
-  var $RecursiveRemoveRequested = false;
-  var $ObjectTaggingRequested   = false;
+  /* Vars to handle operations after saving the department 
+      Recursive move && tagging   */
+  var $ObjectInSaveMode         = false;    // Is true, if current object wasn't saved right now
+  var $ObjectTaggingRequested   = false;    // Object must be tagged, an iframe will be shown. 
+  var $RecursiveRemoveRequested = false;    // Is true, if this object must be moved, an iframe will be displayed in this case
 
        function departmentManagement ($config, $ui)
        {
@@ -223,16 +225,19 @@ class departmentManagement extends plugin
                                $this->deptabs->save(true);
         $this->deptabs->by_object['department']->save();     
  
-        /* Get tagging frame */
-                               if($this->deptabs->by_object['department']->must_be_tagged()){
+                               /* This object must be tagged, so set ObjectTaggingRequested to true */
+        if($this->deptabs->by_object['department']->must_be_tagged()){
           $this->ObjectTaggingRequested   = true; 
         }              
 
-        /* Get recursive move frame */
+        /* Get recursive move is required, set RecursiveRemoveRequested to true */
                                if($this->deptabs->by_object['department']->am_i_moved()){      
           $this->RecursiveRemoveRequested = true;
                                }               
+
+        /* This var indicated that there is an object which isn't saved right now. */
         $this->ObjectInSaveMode = true;
+
                        } else {
                                /* Ok. There seem to be errors regarding to the tab data,
                                   show message and continue as usual. */
@@ -240,18 +245,20 @@ class departmentManagement extends plugin
                        }
                }
 
-               /* This department must be tagged */
+               /* This department must be tagged (Is called from iframe, generates output)*/
     if(isset($_GET['TagDepartment'])){
                        $this->deptabs->by_object['department']->tag_objects();
       exit();  
                }
 
-    /* initiate recursive remove*/
+    /* initiate recursive remove  (Is called from iframe, generates output)*/
                if(isset($_GET['PerformRecMove'])){
                        $this->deptabs->by_object['department']->recursive_move("","",true);
                  exit();
     }
 
+    /* While one of these vars below isset, we must return an iframe, 
+        to perform requested operation */
     if($this->ObjectTaggingRequested){
       $this->ObjectTaggingRequested = false;
       return($this->deptabs->by_object['department']->ShowTagFrame());
@@ -261,7 +268,8 @@ class departmentManagement extends plugin
       return($this->deptabs->by_object['department']->ShowMoveFrame());
     }
 
-               /* Unset current object / all operations are done */
+               /* If there is an unsaved object and all operations are done
+        remove locks & save object tab & unset current object */
                if($this->ObjectInSaveMode && (!$this->RecursiveRemoveRequested) && (!$this->ObjectTaggingRequested)){
       $this->deptabs->save();
       $this->ObjectInSaveMode = false;
index c936b22aa78da894d177d40a7ed0279bab9561a1..81ea9369d5b22434156ce8adffbe0cb182aea5d8 100644 (file)
@@ -1,4 +1,5 @@
 <h2>{t}Processing the requested operation{/t}</h2>
+{$message}
 {t}As soon as the move operation has finished, you can scroll down to end of the page and press the 'Continue' button to continue with the department management dialog.{/t}
 <br>
 <br>