Skip confirmation dialog when deleting a contact from a source that supports undelete operations

release-0.7
thomascube 13 years ago
parent 5f71297bc9
commit d06e57fdf2

@ -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'),
);
}

@ -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 = '';

Loading…
Cancel
Save