alecpl
2010-03-04 a039c626eef6ad0e6c915d1618fbd0e6e40f57a2
program/js/app.js
@@ -1885,7 +1885,7 @@
    if (this.env.flag_for_deletion)
      this.mark_message('delete');
    // if there isn't a defined trash mailbox or we are in it
    else if (!this.env.trash_mailbox || String(this.env.mailbox).toLowerCase() == String(this.env.trash_mailbox).toLowerCase())
    else if (!this.env.trash_mailbox || this.env.mailbox == this.env.trash_mailbox)
      this.permanently_remove_messages();
    // if there is a trash mailbox defined and we're not currently in it
    else {
@@ -2316,6 +2316,7 @@
    var input_message = $("[name='_message']");
    var message = input_message.val();
    var is_html = ($("input[name='_is_html']").val() == '1');
    var sig_separator = this.env.sig_above && (this.env.compose_mode == 'reply' || this.env.compose_mode == 'forward') ? '---' : '-- ';
    var sig, cursor_pos, p = -1;
    if (!this.env.identity)
@@ -2333,7 +2334,7 @@
        sig = this.env.signatures[this.env.identity].is_html ? this.env.signatures[this.env.identity].plain_text : this.env.signatures[this.env.identity].text;
        
        if (sig.indexOf('-- ') != 0)
          sig = '-- \n'+sig;
          sig = sig_separator + '\n' + sig;
        p = this.env.sig_above ? message.indexOf(sig) : message.lastIndexOf(sig);
        if (p >= 0)
@@ -2344,7 +2345,7 @@
      if (show_sig && this.env.signatures && this.env.signatures[id]) {
        sig = this.env.signatures[id]['is_html'] ? this.env.signatures[id]['plain_text'] : this.env.signatures[id]['text'];
        if (sig.indexOf('-- ') != 0)
          sig = '-- \n'+sig;
          sig = sig_separator + '\n' + sig;
        if (this.env.sig_above) {
          if (p >= 0) { // in place of removed signature
@@ -2413,12 +2414,12 @@
        if (this.env.signatures[id].is_html) {
          sig = this.env.signatures[id].text;
          if (this.env.signatures[id].plain_text.indexOf('-- ') != 0)
            sig = '-- <br />' + sig;
            sig = sig_separator + '<br />' + sig;
        }
        else {
          sig = this.env.signatures[id].text;
          if (sig.indexOf('-- ') != 0)
            sig = '-- \n' + sig;
            sig = sig_separator + '\n' + sig;
          sig = '<pre>' + sig + '</pre>';
        }
@@ -2616,10 +2617,13 @@
      if (this.message_list) {
        this.message_list.clear();
        if (this.env.search_mods) {
          var head_arr = new Array();
          for (var n in this.env.search_mods)
            head_arr.push(n);
          addurl += '&_headers='+head_arr.join(',');
          var mods = this.env.search_mods[this.env.mailbox] ? this.env.search_mods[this.env.mailbox] : this.env.search_mods['*'];
          if (mods) {
            var head_arr = new Array();
            for (var n in mods)
              head_arr.push(n);
            addurl += '&_headers='+head_arr.join(',');
            }
          }
        } else if (this.contact_list) {
        this.contact_list.clear(true);