thomascube
2010-03-24 84a3312f0b16fdf02061d8bbdc62228290b0beeb
program/js/app.js
@@ -2204,11 +2204,18 @@
  // delete selected messages from the current mailbox
  this.delete_messages = function()
    {
    var selection = this.message_list ? this.message_list.get_selection() : new Array();
    var selection = this.message_list ? $.merge([], this.message_list.get_selection()) : new Array();
    // exit if no mailbox specified or if selection is empty
    if (!this.env.uid && !selection.length)
      return;
    // also select childs of collapsed rows
    for (var uid, i=0; i < selection.length; i++) {
      uid = selection[i];
      if (this.message_list.rows[uid].has_children && !this.message_list.rows[uid].expanded)
        this.message_list.select_childs(uid);
    }
    // if config is set to flag for deletion
    if (this.env.flag_for_deletion) {
@@ -2221,8 +2228,7 @@
    // if there is a trash mailbox defined and we're not currently in it
    else {
      // if shift was pressed delete it immediately
      if (this.message_list && this.message_list.shiftkey)
        {
      if (this.message_list && this.message_list.shiftkey) {
        if (confirm(this.get_label('deletemessagesconfirm')))
          this.permanently_remove_messages();
        }