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:
alex
2018-11-30 16:48:28 +01:00
parent be03294685
commit a28df53718
13 changed files with 572 additions and 212 deletions
-64
View File
@@ -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>