Send some refresh commands when deleting

This commit is contained in:
Nathan Gray 2015-11-17 21:32:46 +00:00
parent c3464e4552
commit 22e4fc038f
3 changed files with 18 additions and 2 deletions

View File

@ -670,6 +670,11 @@ class calendar_uilist extends calendar_ui
} }
} }
} }
if(egw_json_response::isJSONResponse())
{
egw_json_response::get()->call('egw.refresh','','calendar',$id,'delete');
}
} }
else else
{ {
@ -690,6 +695,12 @@ class calendar_uilist extends calendar_ui
if($this->bo->save($event)) if($this->bo->save($event))
{ {
$success++; $success++;
if(egw_json_response::isJSONResponse())
{
egw_json_response::get()->call('egw.dataStoreUID','calendar::'.$id,$this->to_client($this->bo->read($id,$recur_date)));
egw_json_response::get()->call('egw.refresh','','calendar',$id,'edit');
}
break; break;
} }
} }
@ -708,6 +719,10 @@ class calendar_uilist extends calendar_ui
if ($this->bo->set_status($event,$GLOBALS['egw_info']['user']['account_id'],$new_status,$recur_date, if ($this->bo->set_status($event,$GLOBALS['egw_info']['user']['account_id'],$new_status,$recur_date,
false,true,$skip_notification)) false,true,$skip_notification))
{ {
if(egw_json_response::isJSONResponse())
{
egw_json_response::get()->call('egw.dataStoreUID','calendar::'.$id,$this->to_client($this->bo->read($id,$recur_date)));
}
$success++; $success++;
//$msg = lang('Status changed'); //$msg = lang('Status changed');
} }

View File

@ -270,6 +270,7 @@ app.classes.calendar = AppJS.extend(
if(_type === 'delete') if(_type === 'delete')
{ {
daywise.splice(daywise.indexOf(_id),1); daywise.splice(daywise.indexOf(_id),1);
egw.dataStoreUID('calendar::'+_id, null);
} }
else if (daywise.indexOf(_id) < 0) else if (daywise.indexOf(_id) < 0)
{ {

View File

@ -488,8 +488,8 @@ var et2_calendar_event = et2_valueWidget.extend([et2_IDetachedDOM],
_sameday_check: function(event) _sameday_check: function(event)
{ {
// Event somehow got orphaned // Event somehow got orphaned, or deleted
if(!this._parent) if(!this._parent || event === null)
{ {
return false; return false;
} }