|
|
|
@ -635,9 +635,9 @@ if (hesk_dbNumRows($res)) {
|
|
|
|
|
tinymce.get("message").execCommand('mceInsertRawHTML', false, '');
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
$('#message').html('');
|
|
|
|
|
$('#message').val('');
|
|
|
|
|
}
|
|
|
|
|
$('#subject').html('');
|
|
|
|
|
$('#subject').val('');
|
|
|
|
|
}
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
@ -647,10 +647,11 @@ if (hesk_dbNumRows($res)) {
|
|
|
|
|
tinymce.get("message").setContent('');
|
|
|
|
|
tinymce.get("message").execCommand('mceInsertRawHTML', false, myMsg);
|
|
|
|
|
} else {
|
|
|
|
|
$('#message').html(myMsg);
|
|
|
|
|
myMsg = $('<textarea />').html(myMsg).text();
|
|
|
|
|
$('#message').val(myMsg).trigger('input');
|
|
|
|
|
}
|
|
|
|
|
mySubject = $('<textarea />').html(mySubject).text();
|
|
|
|
|
$('#subject').val(mySubject);
|
|
|
|
|
$('#subject').val(mySubject).trigger('input');
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
if (useHtmlEditor) {
|
|
|
|
@ -659,11 +660,12 @@ if (hesk_dbNumRows($res)) {
|
|
|
|
|
tinymce.get("message").execCommand('mceInsertRawHTML', false, oldMsg + myMsg);
|
|
|
|
|
} else {
|
|
|
|
|
var oldMsg = document.getElementById('message').value;
|
|
|
|
|
$('#message').html(oldMsg + myMsg);
|
|
|
|
|
var theMsg = $('<textarea />').html(oldMsg + myMsg).text();
|
|
|
|
|
$('#message').val(theMsg).trigger('input');
|
|
|
|
|
}
|
|
|
|
|
if (document.getElementById('subject').value == '') {
|
|
|
|
|
mySubject = $('<textarea />').html(mySubject).text();
|
|
|
|
|
$('#subject').val(mySubject);
|
|
|
|
|
$('#subject').val(mySubject).trigger('input');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|