Skip confirmation popup if backend support undelete (#393)

This commit is contained in:
Thomas 2011-09-22 23:05:17 +02:00
parent df8a75da05
commit 778bc7cefc
2 changed files with 3 additions and 2 deletions

View file

@ -1533,7 +1533,7 @@ function rcube_calendar_ui(settings)
var update_event_confirm = function(action, event, data)
{
if (!data) data = event;
var decline = false, notify = false, html = '';
var decline = false, notify = false, html = '', cal = me.calendars[event.calendar];
// event has attendees, ask whether to notify them
if (has_attendees(event)) {
@ -1618,7 +1618,7 @@ function rcube_calendar_ui(settings)
return false;
}
// show regular confirm box when deleting
else if (action == 'remove') {
else if (action == 'remove' && !cal.undelete) {
if (!confirm(rcmail.gettext('deleteventconfirm', 'calendar')))
return false;
}

View file

@ -161,6 +161,7 @@ class calendar_ui
$prop['attendees'] = $this->cal->driver->attendees;
$prop['freebusy'] = $this->cal->driver->freebusy;
$prop['attachments'] = $this->cal->driver->attachments;
$prop['undelete'] = $this->cal->driver->undelete;
$jsenv[$id] = $prop;
$html_id = html_identifier($id);