|
|
@ -193,22 +193,15 @@ $show_quick_help = $show['show'];
|
|
|
|
<?php if ($modsForHesk_settings['rich_text_for_tickets']): ?>
|
|
|
|
<?php if ($modsForHesk_settings['rich_text_for_tickets']): ?>
|
|
|
|
<script type="text/javascript">
|
|
|
|
<script type="text/javascript">
|
|
|
|
/* <![CDATA[ */
|
|
|
|
/* <![CDATA[ */
|
|
|
|
tinyMCE.init({
|
|
|
|
$(document).ready(function() {
|
|
|
|
mode: "textareas",
|
|
|
|
$('.htmlEditor').summernote({
|
|
|
|
editor_selector: "htmlEditor",
|
|
|
|
height: 200,
|
|
|
|
elements: "content",
|
|
|
|
toolbar: [
|
|
|
|
theme: "advanced",
|
|
|
|
['style', ['bold', 'italic', 'underline', 'clear']],
|
|
|
|
convert_urls: false,
|
|
|
|
['font', ['strikethrough', 'superscript', 'subscript']],
|
|
|
|
plugins: "autolink",
|
|
|
|
['para', ['ul', 'ol']]
|
|
|
|
|
|
|
|
]
|
|
|
|
theme_advanced_buttons1: "cut,copy,paste,|,undo,redo,|,formatselect,fontselect,fontsizeselect,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull",
|
|
|
|
});
|
|
|
|
theme_advanced_buttons2: "sub,sup,|,charmap,|,bullist,numlist,|,outdent,indent,insertdate,inserttime,preview,|,forecolor,backcolor,|,hr,removeformat,visualaid,|,link,unlink,anchor,image,cleanup,code",
|
|
|
|
|
|
|
|
theme_advanced_buttons3: "",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
theme_advanced_toolbar_location: "top",
|
|
|
|
|
|
|
|
theme_advanced_toolbar_align: "left",
|
|
|
|
|
|
|
|
theme_advanced_statusbar_location: "bottom",
|
|
|
|
|
|
|
|
theme_advanced_resizing: true
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
/* ]]> */
|
|
|
|
/* ]]> */
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
@ -539,8 +532,7 @@ $show_quick_help = $show['show'];
|
|
|
|
if (myMsg == '') {
|
|
|
|
if (myMsg == '') {
|
|
|
|
if (document.form1.mode[1].checked) {
|
|
|
|
if (document.form1.mode[1].checked) {
|
|
|
|
if (useHtmlEditor) {
|
|
|
|
if (useHtmlEditor) {
|
|
|
|
tinymce.get("message").setContent('');
|
|
|
|
$("#message").summernote('reset');
|
|
|
|
tinymce.get("message").execCommand('mceInsertRawHTML', false, '');
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
$('#message').val('');
|
|
|
|
$('#message').val('');
|
|
|
@ -552,8 +544,8 @@ $show_quick_help = $show['show'];
|
|
|
|
if (document.getElementById) {
|
|
|
|
if (document.getElementById) {
|
|
|
|
if (document.getElementById('moderep').checked) {
|
|
|
|
if (document.getElementById('moderep').checked) {
|
|
|
|
if (useHtmlEditor) {
|
|
|
|
if (useHtmlEditor) {
|
|
|
|
tinymce.get("message").setContent('');
|
|
|
|
$("#message").summernote('reset');
|
|
|
|
tinymce.get("message").execCommand('mceInsertRawHTML', false, myMsg);
|
|
|
|
$("#message").summernote('editor.insertText', myMsg));
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
myMsg = $('<textarea />').html(myMsg).text();
|
|
|
|
myMsg = $('<textarea />').html(myMsg).text();
|
|
|
|
$('#message').val(myMsg).trigger('input');
|
|
|
|
$('#message').val(myMsg).trigger('input');
|
|
|
@ -563,9 +555,9 @@ $show_quick_help = $show['show'];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
if (useHtmlEditor) {
|
|
|
|
if (useHtmlEditor) {
|
|
|
|
var oldMsg = tinymce.get("message").getContent();
|
|
|
|
var oldMsg = $("#message").val();
|
|
|
|
tinymce.get("message").setContent('');
|
|
|
|
$("#message").summernote('reset');
|
|
|
|
tinymce.get("message").execCommand('mceInsertRawHTML', false, oldMsg + myMsg);
|
|
|
|
$("#message").summernote('editor.insertText', oldMsg + myMsg));
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
var oldMsg = document.getElementById('message').value;
|
|
|
|
var oldMsg = document.getElementById('message').value;
|
|
|
|
var theMsg = $('<textarea />').html(oldMsg + myMsg).text();
|
|
|
|
var theMsg = $('<textarea />').html(oldMsg + myMsg).text();
|
|
|
@ -998,8 +990,8 @@ if ($modsForHesk_settings['rich_text_for_tickets']) {
|
|
|
|
$message = hesk_SESSION('as_message', '');
|
|
|
|
$message = hesk_SESSION('as_message', '');
|
|
|
|
echo "
|
|
|
|
echo "
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
tinymce.get('message').setContent('');
|
|
|
|
$(\"#message\").summernote('reset');
|
|
|
|
tinymce.get('message').execCommand('mceInsertRawHTML', false, '".$message."');
|
|
|
|
$(\"#message\").summernote('editor.insertText', '".$message."'));
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
";
|
|
|
|
";
|
|
|
|
}
|
|
|
|
}
|
|
|
|