From 2be7960cc8dde34d23a2edea7131cd59c712f2cb Mon Sep 17 00:00:00 2001 From: thomasb Date: Wed, 21 Sep 2011 20:43:47 +0000 Subject: Skip confirmation dialog when deleting a contact from a source that supports undelete operations git-svn-id: https://svn.roundcube.net/trunk@5264 208e9e7b-5314-0410-a742-e7e81cd9613c --- roundcubemail/program/include/rcmail.php | 3 ++- roundcubemail/program/js/app.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'roundcubemail') diff --git a/roundcubemail/program/include/rcmail.php b/roundcubemail/program/include/rcmail.php index ca62fa2bb..edda07ca7 100644 --- a/roundcubemail/program/include/rcmail.php +++ b/roundcubemail/program/include/rcmail.php @@ -483,7 +483,8 @@ class rcmail 'name' => rcube_label('personaladrbook'), 'groups' => $this->address_books['0']->groups, 'readonly' => $this->address_books['0']->readonly, - 'autocomplete' => in_array('sql', $autocomplete) + 'autocomplete' => in_array('sql', $autocomplete), + 'undelete' => $this->address_books['0']->undelete && $this->config->get('undo_timeout'), ); } diff --git a/roundcubemail/program/js/app.js b/roundcubemail/program/js/app.js index 4b88958d9..52b3f6055 100644 --- a/roundcubemail/program/js/app.js +++ b/roundcubemail/program/js/app.js @@ -3994,7 +3994,8 @@ function rcube_webmail() { // exit if no mailbox specified or if selection is empty var selection = this.contact_list.get_selection(); - if (!(selection.length || this.env.cid) || !confirm(this.get_label('deletecontactconfirm'))) + var undelete = this.env.address_sources[this.env.source].undelete; + if (!(selection.length || this.env.cid) || (!undelete && !confirm(this.get_label('deletecontactconfirm')))) return; var id, n, a_cids = [], qs = ''; -- cgit v1.2.3