diff --git a/cis/private/tools/zeitaufzeichnung.php b/cis/private/tools/zeitaufzeichnung.php index 464058ec4..2b23bf744 100644 --- a/cis/private/tools/zeitaufzeichnung.php +++ b/cis/private/tools/zeitaufzeichnung.php @@ -138,6 +138,7 @@ $pause_bis = (isset($_POST['pause_bis'])?$_POST['pause_bis']:date('H:i')); $von_pause = $von_datum.' '.$pause_von; $bis_pause = $bis_datum.' '.$pause_bis; $homeofficeChecked = ''; +//$reload = false; $beschreibung = (isset($_POST['beschreibung'])?$_POST['beschreibung']:''); $service_id = (isset($_POST['service_id'])?$_POST['service_id']:''); @@ -282,6 +283,18 @@ echo ' } ) + function isVisible() + { + resetPhasen() + } + + $("#triggerPhasenReset").bind("isVisible", isVisible); + + $("#triggerPhasenReset").show("slow", function() + { + $(this).trigger("isVisible"); + }); + }); function setbisdatum() @@ -527,6 +540,12 @@ echo ' $("#projektphaseformgroup").hide(); } + function resetPhasen() + { + var uid = $("#uidpass").val(); + getProjektphasen($("#projekt").val(),uid); + } + function getProjektphasen(projekt_kurzbz, uid) { $.ajax @@ -578,6 +597,48 @@ echo ' ); } + function appendProjektphasenzeiten(projektphase_id) + { + $.ajax + ( + { + type: "GET", + url: "zeitaufzeichnung_projektphasenzeiten.php", + dataType: "json", + data: + { + "projektphase_id":projektphase_id + + }, + success: function(json) + { + //append Projektphasenzeiten if any + if (json.length > 0) + { + var projphasenhtml = ""; + for (var i = 0; i < json.length; i++) + { + projphasenhtml += "