Merge pull request #389 from mkoch227/bug-fix-encoded-characters
Properly insert ticket templates and canned responses
This commit is contained in:
commit
16aef469a9
@ -1983,7 +1983,8 @@ function hesk_printCanned()
|
||||
tinymce.get("message").setContent('');
|
||||
tinymce.get("message").execCommand('mceInsertRawHTML', false, myMsg);
|
||||
} else {
|
||||
document.getElementById('message').value = myMsg;
|
||||
myMsg = $('<textarea />').html(myMsg).text();
|
||||
$('#message').val(myMsg).trigger('input');
|
||||
}
|
||||
}
|
||||
else {
|
||||
@ -1992,8 +1993,9 @@ function hesk_printCanned()
|
||||
tinymce.get("message").setContent('');
|
||||
tinymce.get("message").execCommand('mceInsertRawHTML', false, oldMsg + myMsg);
|
||||
} else {
|
||||
var oldMsg = document.getElementById('message').value;
|
||||
document.getElementById('message').value = oldMsg + myMsg;
|
||||
var oldMsg = $('#message').text();
|
||||
var newMsg = $('<textarea />').html(oldMsg + myMsg).text();
|
||||
$('#message').val(newMsg).trigger('input');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -248,9 +248,9 @@ $num = hesk_dbNumRows($result);
|
||||
tinymce.get("message").execCommand('mceInsertRawHTML', false, '');
|
||||
}
|
||||
else {
|
||||
document.getElementById('message').value = '';
|
||||
$('#message').val('');
|
||||
}
|
||||
document.getElementById('subject').value = '';
|
||||
$('#subject').val('');
|
||||
return true;
|
||||
}
|
||||
if (document.getElementById) {
|
||||
@ -258,9 +258,11 @@ $num = hesk_dbNumRows($result);
|
||||
tinymce.get("message").setContent('');
|
||||
tinymce.get("message").execCommand('mceInsertRawHTML', false, myMsg);
|
||||
} else {
|
||||
document.getElementById('message').value = myMsg;
|
||||
myMsg = $('<textarea />').html(myMsg).text();
|
||||
$('#message').val(myMsg).trigger('input');
|
||||
}
|
||||
document.getElementById('subject').value = mySubject;
|
||||
mySubject = $('<textarea />').html(mySubject).text();
|
||||
$('#subject').val(mySubject).trigger('input');
|
||||
}
|
||||
else {
|
||||
document.form1.message.value = myMsg;
|
||||
|
@ -326,9 +326,9 @@ $num = hesk_dbNumRows($result);
|
||||
tinymce.get("message").execCommand('mceInsertRawHTML', false, '');
|
||||
}
|
||||
else {
|
||||
document.getElementById('message').value = '';
|
||||
$('#message').val('');
|
||||
}
|
||||
document.getElementById('subject').value = '';
|
||||
$('#subject').val('');
|
||||
return true;
|
||||
}
|
||||
if (document.getElementById) {
|
||||
@ -336,9 +336,11 @@ $num = hesk_dbNumRows($result);
|
||||
tinymce.get("message").setContent('');
|
||||
tinymce.get("message").execCommand('mceInsertRawHTML', false, myMsg);
|
||||
} else {
|
||||
document.getElementById('message').value = myMsg;
|
||||
myMsg = $('<textarea />').html(myMsg).text();
|
||||
$('#message').val(myMsg).trigger('input');
|
||||
}
|
||||
document.getElementById('subject').value = mySubject;
|
||||
mySubject = $('<textarea />').html(mySubject).text();
|
||||
$('#subject').val(mySubject).trigger('input');
|
||||
}
|
||||
else {
|
||||
document.form1.message.value = myMsg;
|
||||
|
@ -635,9 +635,9 @@ if (hesk_dbNumRows($res)) {
|
||||
tinymce.get("message").execCommand('mceInsertRawHTML', false, '');
|
||||
}
|
||||
else {
|
||||
document.getElementById('message').value = '';
|
||||
$('#message').val('');
|
||||
}
|
||||
document.getElementById('subject').value = '';
|
||||
$('#subject').val('');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@ -647,9 +647,11 @@ if (hesk_dbNumRows($res)) {
|
||||
tinymce.get("message").setContent('');
|
||||
tinymce.get("message").execCommand('mceInsertRawHTML', false, myMsg);
|
||||
} else {
|
||||
document.getElementById('message').value = myMsg;
|
||||
myMsg = $('<textarea />').html(myMsg).text();
|
||||
$('#message').val(myMsg).trigger('input');
|
||||
}
|
||||
document.getElementById('subject').value = mySubject;
|
||||
mySubject = $('<textarea />').html(mySubject).text();
|
||||
$('#subject').val(mySubject).trigger('input');
|
||||
}
|
||||
else {
|
||||
if (useHtmlEditor) {
|
||||
@ -658,10 +660,12 @@ if (hesk_dbNumRows($res)) {
|
||||
tinymce.get("message").execCommand('mceInsertRawHTML', false, oldMsg + myMsg);
|
||||
} else {
|
||||
var oldMsg = document.getElementById('message').value;
|
||||
document.getElementById('message').value = oldMsg + myMsg;
|
||||
var theMsg = $('<textarea />').html(oldMsg + myMsg).text();
|
||||
$('#message').val(theMsg).trigger('input');
|
||||
}
|
||||
if (document.getElementById('subject').value == '') {
|
||||
document.getElementById('subject').value = mySubject;
|
||||
mySubject = $('<textarea />').html(mySubject).text();
|
||||
$('#subject').val(mySubject).trigger('input');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -43,6 +43,7 @@ $modsForHesk_settings = array();
|
||||
if (is_dir(HESK_PATH . 'install')) {
|
||||
$modsForHesk_settings['rtl'] = 0;
|
||||
$modsForHesk_settings['use_bootstrap_theme'] = 1;
|
||||
$modsForHesk_settings['show_icons'] = 1;
|
||||
$modsForHesk_settings['navbarBackgroundColor'] = '#414a5c';
|
||||
$modsForHesk_settings['navbarBrandColor'] = '#d4dee7';
|
||||
$modsForHesk_settings['navbarBrandHoverColor'] = '#ffffff';
|
||||
|
Loading…
x
Reference in New Issue
Block a user