Fix removing temp/deleted events from UI (#912); consider undo_timeout setting in UI
This commit is contained in:
parent
8fa4ddb8f0
commit
8cff86aef2
2 changed files with 5 additions and 2 deletions
|
@ -209,7 +209,10 @@ class calendar extends rcube_plugin
|
||||||
default:
|
default:
|
||||||
$this->driver = new $driver_class($this);
|
$this->driver = new $driver_class($this);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($this->driver->undelete)
|
||||||
|
$this->driver->undelete = $this->rc->config->get('undo_timeout', 0) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1554,7 +1554,7 @@ function rcube_calendar_ui(settings)
|
||||||
|
|
||||||
// render event temporarily into the calendar
|
// render event temporarily into the calendar
|
||||||
if ((data.start && data.end) || data.id) {
|
if ((data.start && data.end) || data.id) {
|
||||||
var event = data.id ? $.extend(fc.fullCalendar('clientEvents', data.id)[0], data) : data;
|
var event = data.id ? $.extend(fc.fullCalendar('clientEvents', function(e){ return e.id == data.id; })[0], data) : data;
|
||||||
if (data.start)
|
if (data.start)
|
||||||
event.start = fromunixtime(data.start);
|
event.start = fromunixtime(data.start);
|
||||||
if (data.end)
|
if (data.end)
|
||||||
|
|
Loading…
Add table
Reference in a new issue