Files
FHC-Core/public/js/messaging/writeReply.js
T
Paolo b94aad14fb - Added new config entris for messaging: ou_receivers_no_notice and ou_receivers_private
- MessageLib:
	- Renamed method sendAllNotices to sendAllEmailNotices
	- Renamed method _sendOneNotice to _sendNoticeEmails
	- Renamed method _sendNotice to _sendNoticeEmail
	- If the recipient contact is empty is not anymore a blocking error
- Recipient_model->getMessageById renamed to getMessagesById, not it accepts an array of message ids, could return more results
- Fixed bug in public/js/messaging/writeReply.js to send subject value
2020-02-17 18:29:07 +01:00

49 lines
1.1 KiB
JavaScript

// ****************************************************************************************
// Write a reply to a received message, used by view system/messages/ajaxWriteReply
// ****************************************************************************************
/**
*
*/
function sendReply()
{
FHC_AjaxClient.ajaxCallPost(
FHC_JS_DATA_STORAGE_OBJECT.called_path + '/sendMessageReply',
{
receiver_id: $('#receiver_id').val(),
relationmessage_id: $('#relationmessage_id').val(),
token: $('#token').val(),
subject: $('#subject').val(),
body: tinyMCE.get("body").getContent()
},
{
successCallback: function(data, textStatus, jqXHR) {
FHC_DialogLib.alertSuccess("Message sent succesfully");
},
errorCallback: function() {
FHC_DialogLib.alertError("Error");
},
veilTimeout: 300
}
);
}
/**
*
*/
$(document).ready(function () {
//
tinymce.init({
selector: "#body",
plugins: "autoresize",
autoresize_min_height: 150,
autoresize_max_height: 600,
autoresize_bottom_margin: 10
});
$('#sendButton').click(sendReply);
});