| | |
| | | { |
| | | this.enable_command('compose', 'add-contact', false); |
| | | parent.rcmail.show_messageframe(true); |
| | | parent.rcmail.mark_message('read', this.uid); |
| | | } |
| | | |
| | | if ((this.env.action=='show' || this.env.action=='preview') && this.env.blockedobjects) |
| | |
| | | // start interval for keep-alive/recent_check signal |
| | | this.start_keepalive = function() |
| | | { |
| | | if (this.env.keep_alive && this.task=='mail' && this.gui_objects.messagelist) |
| | | if (this.env.keep_alive && !this.env.framed && this.task=='mail' && this.gui_objects.messagelist) |
| | | this._int = setInterval(this.ref+'.check_for_recent()', this.env.keep_alive * 1000); |
| | | else if (this.env.keep_alive && this.task!='login') |
| | | else if (this.env.keep_alive && !this.env.framed && this.task!='login') |
| | | this._int = setInterval(this.ref+'.send_keep_alive()', this.env.keep_alive * 1000); |
| | | } |
| | | |
| | |
| | | for (var n=0; n<selection.length; n++) |
| | | { |
| | | id = selection[n]; |
| | | a_uids[a_uids.length] = id; |
| | | if ((flag=='read' && this.message_list.rows[id].unread) || (flag=='unread' && !this.message_list.rows[id].unread)) |
| | | a_uids[a_uids.length] = id; |
| | | } |
| | | } |
| | | |
| | | // nothing to do |
| | | if (!a_uids.length) |
| | | return; |
| | | |
| | | switch (flag) |
| | | { |
| | |
| | | if (this.env.identity && this.env.signatures && this.env.signatures[this.env.identity]) |
| | | { |
| | | sig = this.env.signatures[this.env.identity]['text']; |
| | | if (sig.indexOf('--')!=0) |
| | | sig = '--\n'+sig; |
| | | |
| | | if (sig.indexOf('-- ')!=0) |
| | | sig = '-- \n'+sig; |
| | | |
| | | p = message.lastIndexOf(sig); |
| | | if (p>=0) |
| | | message = message.substring(0, p-1) + message.substring(p+sig.length, message.length); |
| | | } |
| | | |
| | | |
| | | // add the new signature string |
| | | if (this.env.signatures && this.env.signatures[id]) |
| | | { |
| | | sig = this.env.signatures[id]['text']; |
| | | if (sig.indexOf('--')!=0) |
| | | sig = '--\n'+sig; |
| | | if (this.env.signatures[id]['is_html']) |
| | | { |
| | | sig = this.env.signatures[id]['plain_text']; |
| | | } |
| | | if (sig.indexOf('-- ')!=0) |
| | | sig = '-- \n'+sig; |
| | | message += '\n'+sig; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | var eid = tinyMCE.getEditorId('_message'); |
| | | // editor is a TinyMCE_Control object |
| | | var editor = tinyMCE.getInstanceById(eid); |
| | | var msgDoc = editor.getDoc(); |
| | | var msgBody = msgDoc.body; |
| | | var eid = tinyMCE.getEditorId('_message'); |
| | | // editor is a TinyMCE_Control object |
| | | var editor = tinyMCE.getInstanceById(eid); |
| | | var msgDoc = editor.getDoc(); |
| | | var msgBody = msgDoc.body; |
| | | |
| | | if (this.env.signatures && this.env.signatures[id]) |
| | | if (this.env.signatures && this.env.signatures[id]) |
| | | { |
| | | // Append the signature as a span within the body |
| | | var sigElem = msgDoc.getElementById("_rc_sig"); |
| | | if (!sigElem) |
| | | { |
| | | // Append the signature as a span within the body |
| | | var sigElem = msgDoc.getElementById("_rc_sig"); |
| | | if (!sigElem) |
| | | { |
| | | sigElem = msgDoc.createElement("span"); |
| | | sigElem.setAttribute("id", "_rc_sig"); |
| | | msgBody.appendChild(sigElem); |
| | | } |
| | | if (this.env.signatures[id]['is_html']) |
| | | { |
| | | sigElem.innerHTML = this.env.signatures[id]['text']; |
| | | } |
| | | else |
| | | { |
| | | sigElem.innerHTML = '<pre>' + this.env.signatures[id]['text'] + '</pre>'; |
| | | } |
| | | sigElem = msgDoc.createElement("span"); |
| | | sigElem.setAttribute("id", "_rc_sig"); |
| | | msgBody.appendChild(sigElem); |
| | | } |
| | | if (this.env.signatures[id]['is_html']) |
| | | { |
| | | sigElem.innerHTML = this.env.signatures[id]['text']; |
| | | } |
| | | else |
| | | { |
| | | sigElem.innerHTML = '<pre>' + this.env.signatures[id]['text'] + '</pre>'; |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (input_message) |