|
|
@ -2621,9 +2621,11 @@ function rcube_webmail()
|
|
|
|
input_to.focus();
|
|
|
|
input_to.focus();
|
|
|
|
else if (input_subject.val() == '')
|
|
|
|
else if (input_subject.val() == '')
|
|
|
|
input_subject.focus();
|
|
|
|
input_subject.focus();
|
|
|
|
else if (input_message && !html_mode)
|
|
|
|
else if (input_message)
|
|
|
|
input_message.focus();
|
|
|
|
input_message.focus();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.env.compose_focus_elem = document.activeElement;
|
|
|
|
|
|
|
|
|
|
|
|
// get summary of all field values
|
|
|
|
// get summary of all field values
|
|
|
|
this.compose_field_hash(true);
|
|
|
|
this.compose_field_hash(true);
|
|
|
|
|
|
|
|
|
|
|
@ -2789,12 +2791,12 @@ function rcube_webmail()
|
|
|
|
if (!show_sig)
|
|
|
|
if (!show_sig)
|
|
|
|
show_sig = this.env.show_sig;
|
|
|
|
show_sig = this.env.show_sig;
|
|
|
|
|
|
|
|
|
|
|
|
var id = obj.options[obj.selectedIndex].value;
|
|
|
|
var sig, cursor_pos, p = -1,
|
|
|
|
var input_message = $("[name='_message']");
|
|
|
|
id = obj.options[obj.selectedIndex].value,
|
|
|
|
var message = input_message.val();
|
|
|
|
input_message = $("[name='_message']"),
|
|
|
|
var is_html = ($("input[name='_is_html']").val() == '1');
|
|
|
|
message = input_message.val(),
|
|
|
|
var sig_separator = this.env.sig_above && (this.env.compose_mode == 'reply' || this.env.compose_mode == 'forward') ? '---' : '-- ';
|
|
|
|
is_html = ($("input[name='_is_html']").val() == '1'),
|
|
|
|
var sig, cursor_pos, p = -1;
|
|
|
|
sig_separator = this.env.sig_above && (this.env.compose_mode == 'reply' || this.env.compose_mode == 'forward') ? '---' : '-- ';
|
|
|
|
|
|
|
|
|
|
|
|
if (!this.env.identity)
|
|
|
|
if (!this.env.identity)
|
|
|
|
this.env.identity = id
|
|
|
|
this.env.identity = id
|
|
|
@ -2855,20 +2857,20 @@ function rcube_webmail()
|
|
|
|
this.set_caret_pos(input_message.get(0), cursor_pos);
|
|
|
|
this.set_caret_pos(input_message.get(0), cursor_pos);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (show_sig && this.env.signatures) { // html
|
|
|
|
else if (show_sig && this.env.signatures) { // html
|
|
|
|
var editor = tinyMCE.get(this.env.composebody);
|
|
|
|
var editor = tinyMCE.get(this.env.composebody),
|
|
|
|
var sigElem = editor.dom.get('_rc_sig');
|
|
|
|
sigElem = editor.dom.get('_rc_sig');
|
|
|
|
|
|
|
|
|
|
|
|
// Append the signature as a div within the body
|
|
|
|
// Append the signature as a div within the body
|
|
|
|
if (!sigElem) {
|
|
|
|
if (!sigElem) {
|
|
|
|
var body = editor.getBody();
|
|
|
|
var body = editor.getBody(),
|
|
|
|
var doc = editor.getDoc();
|
|
|
|
doc = editor.getDoc();
|
|
|
|
|
|
|
|
|
|
|
|
sigElem = doc.createElement('div');
|
|
|
|
sigElem = doc.createElement('div');
|
|
|
|
sigElem.setAttribute('id', '_rc_sig');
|
|
|
|
sigElem.setAttribute('id', '_rc_sig');
|
|
|
|
|
|
|
|
|
|
|
|
if (this.env.sig_above) {
|
|
|
|
if (this.env.sig_above) {
|
|
|
|
// if no existing sig and top posting then insert at caret pos
|
|
|
|
// if no existing sig and top posting then insert at caret pos
|
|
|
|
editor.getWin().focus(); // correct focus in IE
|
|
|
|
editor.getWin().focus(); // correct focus in IE & Chrome
|
|
|
|
|
|
|
|
|
|
|
|
var node = editor.selection.getNode();
|
|
|
|
var node = editor.selection.getNode();
|
|
|
|
if (node.nodeName == 'BODY') {
|
|
|
|
if (node.nodeName == 'BODY') {
|
|
|
|