Bugfix: fixed Infocenter details page to be compatible with the fhc_controller_id parameter

This commit is contained in:
Paolo
2018-05-03 17:25:36 +02:00
parent e4cdac1acb
commit 1550c856f4
+35 -13
View File
@@ -1,7 +1,29 @@
/**
*
*/
function getUrlParameter(sParam)
{
var sPageURL = decodeURIComponent(window.location.search.substring(1)),
sURLVariables = sPageURL.split('&'),
sParameterName,
i;
for (i = 0; i < sURLVariables.length; i++)
{
sParameterName = sURLVariables[i].split('=');
if (sParameterName[0] === sParam)
{
return sParameterName[1];
}
}
}
var fhc_controller_id = getUrlParameter("fhc_controller_id");
/**
* javascript file for infocenterDetails page
*/
$(document).ready(
function ()
{
@@ -85,7 +107,7 @@ $(document).ready(
var personId = $("#hiddenpersonid").val();
var notizId = $("#notizform :input[name='hiddenNotizId']").val();
var data = $(this).serializeArray();
if (notizId !== '')
{
updateNotiz(notizId, personId, data);
@@ -93,24 +115,24 @@ $(document).ready(
else
{
saveNotiz(personId, data);
}
}
}
);
//update notiz - autofill notizform
$(document).on("click", "#notiztable tbody tr", function ()
{
var notizId = $(this).find("td:eq(3)").html();
var notizTitle = $(this).find("td:eq(1)").text();
var notizContent = this.title;
$("#notizform label:first").text("Notiz ändern").css("color", "red");
$("#notizform :input[type='reset']").css("display", "inline-block");
$("#notizform :input[name='hiddenNotizId']").val(notizId);
$("#notizform :input[name='notiztitel']").val(notizTitle);
$("#notizform :input[name='notiz']").val(notizContent);
$("#notizform :input[name='notiz']").val(notizContent);
}
);
@@ -131,7 +153,7 @@ function saveFormalGeprueft(personid, akteid, checked)
$.ajax({
type: "POST",
dataType: "json",
url: "../saveFormalGeprueft/" + personid,
url: "../saveFormalGeprueft/" + personid + '?fhc_controller_id=' + fhc_controller_id,
data: {"akte_id": akteid, "formal_geprueft": checked},
success: function (data, textStatus, jqXHR)
{
@@ -161,7 +183,7 @@ function zgvUebernehmen(personid, prestudentid, btn)
$.ajax({
type: "POST",
dataType: "json",
url: "../getLastPrestudentWithZgvJson/" + personid,
url: "../getLastPrestudentWithZgvJson/" + personid + '?fhc_controller_id=' + fhc_controller_id,
success: function (data, textStatus, jqXHR)
{
if (data !== null)
@@ -201,7 +223,7 @@ function saveZgv(data)
type: "POST",
dataType: "json",
data: data,
url: "../saveZgvPruefung/" + prestudentid,
url: "../saveZgvPruefung/" + prestudentid + '?fhc_controller_id=' + fhc_controller_id,
success: function (data, textStatus, jqXHR)
{
if (data === prestudentid)
@@ -227,7 +249,7 @@ function saveNotiz(personid, data)
type: "POST",
dataType: "json",
data: data,
url: "../saveNotiz/" + personid,
url: "../saveNotiz/" + personid + '?fhc_controller_id=' + fhc_controller_id,
success: function (data, textStatus, jqXHR)
{
refreshNotizen();
@@ -246,7 +268,7 @@ function updateNotiz(notizId, personId, data)
type: "POST",
dataType: "json",
data: data,
url: "../updateNotiz/" + notizId + "/" + personId,
url: "../updateNotiz/" + notizId + "/" + personId + '?fhc_controller_id=' + fhc_controller_id,
success: function (data, textStatus, jqXHR)
{
if (data)
@@ -295,7 +317,7 @@ function refreshNotizen()
//readd tablesorter
formatNotizTable()
}
);
);
}
function formatNotizTable()