From 35ebfc4f9f801de398828db6e31d955daf08449a Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Fri, 28 Nov 2014 19:25:15 +0000 Subject: [PATCH] More Home progress: - Send action results --- timesheet/inc/class.timesheet_favorite_portlet.inc.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/timesheet/inc/class.timesheet_favorite_portlet.inc.php b/timesheet/inc/class.timesheet_favorite_portlet.inc.php index 9590c592ae..4d7b69388a 100644 --- a/timesheet/inc/class.timesheet_favorite_portlet.inc.php +++ b/timesheet/inc/class.timesheet_favorite_portlet.inc.php @@ -112,6 +112,7 @@ class timesheet_favorite_portlet extends home_favorite_portlet if (!count($content['nm']['selected']) && !$content['nm']['select_all']) { $msg = lang('You need to select some entries first!'); + egw_json_response::get()->apply('egw.message',array($msg,'error')); } else { @@ -121,17 +122,19 @@ class timesheet_favorite_portlet extends home_favorite_portlet { $msg .= lang('%1 timesheets(s) %2',$success,$action_msg); - foreach($values['nm']['selected'] as &$id) + egw_json_response::get()->apply('egw.message',array($msg,'success')); + foreach($content['nm']['selected'] as &$id) { $id = 'timesheet::'.$id; } // Directly request an update - this will get timesheet tab too - egw_json_response::get()->apply('egw.dataRefreshUIDs',array($values['nm']['selected'])); + egw_json_response::get()->apply('egw.dataRefreshUIDs',array($content['nm']['selected'])); } elseif(empty($msg)) { $msg .= lang('%1 timesheets(s) %2, %3 failed because of insufficent rights !!!',$success,$action_msg,$failed); } + egw_json_response::get()->apply('egw.message',array($msg,'error')); } }