#202 Add TinyMCE to manage canned page
This commit is contained in:
parent
84dda62e71
commit
222258a591
@ -75,9 +75,19 @@ else {return false;}
|
|||||||
}
|
}
|
||||||
|
|
||||||
function hesk_insertTag(tag) {
|
function hesk_insertTag(tag) {
|
||||||
var text_to_insert = '%%'+tag+'%%';
|
var text_to_insert = '%%'+tag+'%%';
|
||||||
hesk_insertAtCursor(document.form1.msg, text_to_insert);
|
var msg = '';
|
||||||
document.form1.msg.focus();
|
<?php
|
||||||
|
if ($modsForHesk_settings['rich_text_for_tickets']) { ?>
|
||||||
|
msg = tinymce.get("message").getContent();
|
||||||
|
tinymce.get("message").setContent('');
|
||||||
|
tinymce.get("message").execCommand('mceInsertRawHTML', false, msg + text_to_insert);
|
||||||
|
<?php } else { ?>
|
||||||
|
msg = document.getElementById('message').value;
|
||||||
|
document.getElementById('message').value = msg + text_to_insert;
|
||||||
|
<?php }
|
||||||
|
?>
|
||||||
|
document.form1.msg.focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
function hesk_insertAtCursor(myField, myValue) {
|
function hesk_insertAtCursor(myField, myValue) {
|
||||||
@ -270,35 +280,6 @@ function hesk_insertAtCursor(myField, myValue) {
|
|||||||
}
|
}
|
||||||
//-->
|
//-->
|
||||||
</script>
|
</script>
|
||||||
<!--<script language="javascript" type="text/javascript"><!--
|
|
||||||
var myMsgTxt = new Array();
|
|
||||||
myMsgTxt[0]='';
|
|
||||||
var myTitle = new Array();
|
|
||||||
myTitle[0]='';
|
|
||||||
|
|
||||||
<?php
|
|
||||||
/* echo $javascript_titles;
|
|
||||||
echo $javascript_messages;
|
|
||||||
*/?>
|
|
||||||
|
|
||||||
function setMessage(msgid) {
|
|
||||||
if (document.getElementById) {
|
|
||||||
document.getElementById('HeskMsg').innerHTML='<textarea class="form-control" name="msg" rows="15" cols="70">'+myMsgTxt[msgid]+'</textarea>';
|
|
||||||
document.getElementById('HeskTitle').innerHTML='<input type="text" class="form-control" name="name" size="40" maxlength="50" value="'+myTitle[msgid]+'">';
|
|
||||||
} else {
|
|
||||||
document.form1.msg.value=myMsgTxt[msgid];
|
|
||||||
document.form1.name.value=myTitle[msgid];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (msgid==0) {
|
|
||||||
document.form1.a[0].checked=true;
|
|
||||||
} else {
|
|
||||||
document.form1.a[1].checked=true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//-->
|
|
||||||
<!--</script>-->
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
/* This will handle error, success and notice messages */
|
/* This will handle error, success and notice messages */
|
||||||
hesk_handle_messages();
|
hesk_handle_messages();
|
||||||
|
@ -52,4 +52,4 @@ $modsForHesk_settings['request_location'] = 0;
|
|||||||
$modsForHesk_settings['category_order_column'] = 'cat_order';
|
$modsForHesk_settings['category_order_column'] = 'cat_order';
|
||||||
|
|
||||||
//-- Setting for using rich-text editor for tickets. 0 = Disable, 1 = Enable
|
//-- Setting for using rich-text editor for tickets. 0 = Disable, 1 = Enable
|
||||||
$modsForHesk_settings['rich_text_for_tickets'] = 1;
|
$modsForHesk_settings['rich_text_for_tickets'] = 0;
|
Loading…
x
Reference in New Issue
Block a user