thomascube
2011-09-21 d06e57fdf21879a4e93d6c00b939ca42094d3e86
Skip confirmation dialog when deleting a contact from a source that supports undelete operations

2 files modified
6 ■■■■■ changed files
program/include/rcmail.php 3 ●●●● patch | view | raw | blame | history
program/js/app.js 3 ●●●● patch | view | raw | blame | history
program/include/rcmail.php
@@ -483,7 +483,8 @@
        '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'),
      );
    }
program/js/app.js
@@ -3994,7 +3994,8 @@
  {
    // 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 = '';