* InfoLog: use type or category, when creating new entries in subs-view and stay in subs-view when storing an entry in a popup

This commit is contained in:
Ralf Becker 2012-06-14 12:08:46 +00:00
parent a40093244f
commit 6903bdabdf
2 changed files with 9 additions and 4 deletions

View File

@ -701,9 +701,9 @@ class infolog_ui
if (!$values['nm']['session_for'] && $this->called_by) $values['nm']['session_for'] = $this->called_by;
$values['msg'] = $_GET['msg'];
$values['action'] = $action;
$values['action_id'] = $action_id;
$values['action_title'] = $action_title;
$action_id = $values['action_id'] = $action ? $action_id : $nm['action_id'];
$action_title = $values['action_title'] = $action ? $action_title : $nm['action_title'];
$action = $values['action'] = $action ? $action : $nm['action'];
}
if($_GET['search']) $values['nm']['search'] = $_GET['search'];
@ -1751,6 +1751,11 @@ class infolog_ui
case 'copy':
$info_id = 0;
$this->create_copy($content, $action == 'sp');
if ($action == 'sp') // for sub-entries use type or category, like for new entries
{
if ($type) $content['info_type'] = $type;
if (is_numeric($_REQUEST['cat_id'])) $content['info_cat'] = (int) $_REQUEST['cat_id'];
}
unset($action); // it get stored in $content and will cause an other copy after [apply]
break;

View File

@ -5,7 +5,7 @@
* @link http://www.egroupware.org
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @package infolog
* @copyright (c) 2003-8 by Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @copyright (c) 2003-12 by Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id$
*/