Changeset 5264 in subversion


Ignore:
Timestamp:
Sep 21, 2011 4:43:47 PM (20 months ago)
Author:
thomasb
Message:

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

Location:
trunk/roundcubemail/program
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/program/include/rcmail.php

    r5240 r5264  
    484484        'groups'   => $this->address_books['0']->groups, 
    485485        'readonly' => $this->address_books['0']->readonly, 
    486         'autocomplete' => in_array('sql', $autocomplete) 
     486        'autocomplete' => in_array('sql', $autocomplete), 
     487        'undelete' => $this->address_books['0']->undelete && $this->config->get('undo_timeout'), 
    487488      ); 
    488489    } 
  • trunk/roundcubemail/program/js/app.js

    r5262 r5264  
    39953995    // exit if no mailbox specified or if selection is empty 
    39963996    var selection = this.contact_list.get_selection(); 
    3997     if (!(selection.length || this.env.cid) || !confirm(this.get_label('deletecontactconfirm'))) 
     3997    var undelete = this.env.address_sources[this.env.source].undelete; 
     3998    if (!(selection.length || this.env.cid) || (!undelete && !confirm(this.get_label('deletecontactconfirm')))) 
    39983999      return; 
    39994000 
Note: See TracChangeset for help on using the changeset viewer.