From cfd945e3ce21cc8b4c4ef400a0c57944ea562b0f Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 7 Jun 2007 09:13:55 +0000 Subject: [PATCH] "fix for bug #768: title is not changed whenever the project is changed fix for bug #865: timesheets link to all projects that were booked before (save&new)" --- timesheet/inc/class.uitimesheet.inc.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/timesheet/inc/class.uitimesheet.inc.php b/timesheet/inc/class.uitimesheet.inc.php index 8415a36f63..eb2b184c4d 100644 --- a/timesheet/inc/class.uitimesheet.inc.php +++ b/timesheet/inc/class.uitimesheet.inc.php @@ -196,6 +196,8 @@ class uitimesheet extends botimesheet { unset($this->data[$name]); } + // save the selected project, to delete the project-link, if the user changes the project + $this->data['old_pm_id'] = $this->data['pm_id']; break; } // fall-through for save @@ -256,6 +258,7 @@ class uitimesheet extends botimesheet $links[] = $link_id; break; case 'infolog': + // a preserved title blur is only set for other (non-project) links, it stays with Save&New! $preserv['ts_title_blur'] = $this->link->title('infolog',$link_id); break; } @@ -286,7 +289,9 @@ class uitimesheet extends botimesheet { $preserv['ts_project'] = $preserv['ts_project_blur']; } - $content['ts_title_blur'] = $preserv['ts_title_blur'] = $preserv['ts_title_blur'] ? $preserv['ts_title_blur'] : $preserv['ts_project_blur']; + // the actual title-blur is either the preserved title blur (if we are called from infolog entry), + // or the preserved project-blur comming from the current selected project + $content['ts_title_blur'] = $preserv['ts_title_blur'] ? $preserv['ts_title_blur'] : $preserv['ts_project_blur']; $readonlys = array( 'button[delete]' => !$this->data['ts_id'] || !$this->check_acl(EGW_ACL_DELETE),