Fix deleting a single event of a series deleted correctly, but caused the whole series to disappear from view.

This commit is contained in:
nathangray 2016-06-21 11:42:44 -06:00
parent fc53782f60
commit a557ce5ceb
2 changed files with 6 additions and 5 deletions

View File

@ -1022,7 +1022,8 @@ class calendar_uiforms extends calendar_ui
} }
else else
{ {
Framework::refresh_opener($msg, 'calendar', $event['id'], Framework::refresh_opener($msg, 'calendar',
$event['id'] . ($content['edit_single'] ? ':' . (int)$content['edit_single'] : '' ),
$button == 'save' && $client_updated ? ($content['id'] ? $update_type : 'add') : 'delete' $button == 'save' && $client_updated ? ($content['id'] ? $update_type : 'add') : 'delete'
); );
} }

View File

@ -184,7 +184,7 @@ var et2_calendar_event = (function(){ "use strict"; return et2_valueWidget.exten
*/ */
_UID_callback: function _UID_callback(event) { _UID_callback: function _UID_callback(event) {
// Copy to avoid changes, which may cause nm problems // Copy to avoid changes, which may cause nm problems
var value = jQuery.extend({},event); var value = event === null ? null : jQuery.extend({},event);
// Make sure id is a string, check values // Make sure id is a string, check values
if(value) if(value)
@ -757,12 +757,12 @@ var et2_calendar_event = (function(){ "use strict"; return et2_valueWidget.exten
{ {
var old_daywise = egw.dataGetUIDdata(old_cache_id); var old_daywise = egw.dataGetUIDdata(old_cache_id);
old_daywise = old_daywise && old_daywise.data ? old_daywise.data : []; old_daywise = old_daywise && old_daywise.data ? old_daywise.data : [];
old_daywise.splice(old_daywise.indexOf(this.options.value.id),1); old_daywise.splice(old_daywise.indexOf(this.options.value.row_id),1);
egw.dataStoreUID(old_cache_id,old_daywise); egw.dataStoreUID(old_cache_id,old_daywise);
if (new_daywise.indexOf(event.id) < 0) if (new_daywise.indexOf(event.row_id) < 0)
{ {
new_daywise.push(event.id); new_daywise.push(event.row_id);
} }
if(new_daywise.data !== null) if(new_daywise.data !== null)
{ {