From 90fa3a8287de503a4b2b272fd29484e8314baf8a Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Thu, 14 Feb 2013 11:28:15 +0000 Subject: [PATCH] - Use egw_refresh() instead of changing href - Listen to csv_export and don't save nextmatch query to session --- timesheet/inc/class.timesheet_ui.inc.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/timesheet/inc/class.timesheet_ui.inc.php b/timesheet/inc/class.timesheet_ui.inc.php index 520089111a..11b36e6da6 100644 --- a/timesheet/inc/class.timesheet_ui.inc.php +++ b/timesheet/inc/class.timesheet_ui.inc.php @@ -246,10 +246,7 @@ class timesheet_ui extends timesheet_bo egw_link::link(TIMESHEET_APP,$this->data['ts_id'],$content['link_to']['to_id']); } } - $js = "opener.location.href='".$GLOBALS['egw']->link('/index.php',array( - 'menuaction' => $referer, - 'msg' => $msg, - ))."';"; + $js = "opener.egw_refresh('$msg','timesheet','{$this->data['ts_id']}', '" . ($content['ts_id'] ? 'update' : 'add')."');"; if ($button == 'apply') break; if ($button == 'save_new') { @@ -280,7 +277,7 @@ class timesheet_ui extends timesheet_bo if ($this->delete()) { $msg = lang('Entry deleted'); - $js = "opener.location.href=opener.location.href+'&msg=$msg';"; + $js = "opener.egw_refresh('$msg','timesheet','{$this->data['ts_id']}', 'delete');"; } else { @@ -513,7 +510,7 @@ class timesheet_ui extends timesheet_bo } } //echo "

show_sums=".print_r($this->show_sums,true)."

\n"; - if (!$id_only) $GLOBALS['egw']->session->appsession('index',TIMESHEET_APP,$query_in); + if (!$id_only && !$query_in['csv_export']) $GLOBALS['egw']->session->appsession('index',TIMESHEET_APP,$query_in); // Refresh actions (undelete needs this) $query_in['actions'] = $this->get_actions($query_in);