From: hickert Date: Fri, 12 May 2006 06:18:35 +0000 (+0000) Subject: Some changes X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=1824b50971010565a6b9b5af7e8500cd8be7c7ac;p=gosa.git Some changes git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3305 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/departments/class_departmentGeneric.inc b/plugins/admin/departments/class_departmentGeneric.inc index 1f788f195..c707e7422 100644 --- a/plugins/admin/departments/class_departmentGeneric.inc +++ b/plugins/admin/departments/class_departmentGeneric.inc @@ -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); } diff --git a/plugins/admin/departments/class_departmentManagement.inc b/plugins/admin/departments/class_departmentManagement.inc index 476008cff..6a3bbbb74 100644 --- a/plugins/admin/departments/class_departmentManagement.inc +++ b/plugins/admin/departments/class_departmentManagement.inc @@ -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; diff --git a/plugins/admin/departments/recursive_move.tpl b/plugins/admin/departments/recursive_move.tpl index c936b22aa..81ea9369d 100644 --- a/plugins/admin/departments/recursive_move.tpl +++ b/plugins/admin/departments/recursive_move.tpl @@ -1,4 +1,5 @@

{t}Processing the requested operation{/t}

+{$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}