From 778bc7cefccddf844bb8e34fe3c6ccd690efc43a Mon Sep 17 00:00:00 2001 From: Thomas Date: Thu, 22 Sep 2011 23:05:17 +0200 Subject: [PATCH] Skip confirmation popup if backend support undelete (#393) --- plugins/calendar/calendar_ui.js | 4 ++-- plugins/calendar/lib/calendar_ui.php | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/calendar/calendar_ui.js b/plugins/calendar/calendar_ui.js index aa8b3e99..72c89bce 100644 --- a/plugins/calendar/calendar_ui.js +++ b/plugins/calendar/calendar_ui.js @@ -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; } diff --git a/plugins/calendar/lib/calendar_ui.php b/plugins/calendar/lib/calendar_ui.php index f802091f..62cf0b4d 100644 --- a/plugins/calendar/lib/calendar_ui.php +++ b/plugins/calendar/lib/calendar_ui.php @@ -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);