* 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:06:33 +00:00
parent 16352d2cfb
commit 04aa8f3572
2 changed files with 10 additions and 4 deletions

View File

@ -726,9 +726,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'];
@ -1816,6 +1816,11 @@ else
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$
*/
@ -29,4 +29,5 @@ if ($setup_info['infolog']['version'] != $GLOBALS['egw_info']['apps']['infolog']
}
unset($setup_info);
// only reset action-view, if no (refresh) message given, eg. stay in sub-view if infolog stored
ExecMethod('infolog.infolog_ui.index','reset_action_view');