mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-21 08:52:21 +00:00
Infocenter changes
- new button for Freigabe zum Reihungstest, sending message to bewerber when freigabe - button Freigabe for Studiengang with Statusgrund - Ausbildungssemester can be saved - Using Vorlagen for Freigabe Mail to assistance and message to bewerber - Added Nation of address at details page - Scroll to top button on details page - moved messageList js to own file
This commit is contained in:
@@ -35,67 +35,3 @@ $widthColumn = $msgExists === true ? 8 : 12;
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<script>
|
||||
tinymce.init({
|
||||
menubar: false,
|
||||
toolbar: false,
|
||||
readonly: 1,
|
||||
selector: "#msgbody",
|
||||
statusbar: false,
|
||||
plugins: "autoresize",
|
||||
autoresize_bottom_margin: 10,
|
||||
autoresize_min_height: 140,
|
||||
autoresize_max_height: 495,
|
||||
//callback to avoid conflict with ajax (for getting body of first message)
|
||||
init_instance_callback: "initMsgBody",
|
||||
responsive: true
|
||||
});
|
||||
|
||||
function initMsgBody()
|
||||
{
|
||||
var tblrows = $("#msgtable tbody tr");
|
||||
|
||||
if (tblrows.length > 0)
|
||||
{
|
||||
//in the begging last sent message is shown
|
||||
var firstelement = tblrows.first();
|
||||
var id = firstelement.attr('id');
|
||||
|
||||
getMsgBody(id);
|
||||
firstelement.find("td").addClass("tablesort-active");
|
||||
|
||||
//add click event on message table for message preview
|
||||
tblrows.click(
|
||||
function ()
|
||||
{
|
||||
$("#msgtable").find("td").removeClass("tablesort-active");
|
||||
$(this).find("td").addClass("tablesort-active");
|
||||
getMsgBody(this.id);
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
//retrieve message data from message and reiver id via AJAX
|
||||
function getMsgBody(id)
|
||||
{
|
||||
var msgid = id.substr(0, id.indexOf('_'));
|
||||
var recid = id.substr(id.indexOf('_') + 1);
|
||||
|
||||
$.ajax(
|
||||
{
|
||||
dataType: "json",
|
||||
url: "<?php echo site_url("system/Messages/getMessageFromIds/") ?>" + msgid + "/" + recid,
|
||||
success: function (data, textStatus, jqXHR)
|
||||
{
|
||||
$("#msgsubject").text(data[0].subject);
|
||||
tinyMCE.get("msgbody").setContent(data[0].body);
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown)
|
||||
{
|
||||
alert(textStatus + " - " + errorThrown + " - " + jqXHR.responseText);
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user