diff --git a/content/planner.overlay.js.php b/content/planner.overlay.js.php
index 5b3ae72a7..67775bfcf 100755
--- a/content/planner.overlay.js.php
+++ b/content/planner.overlay.js.php
@@ -179,6 +179,8 @@ function treeProjektmenueSelect()
{
debug("whoops Documents load failed with exception: "+e);
}
+ // Gantt Chart laden
+ drawGantt();
}
else
{
diff --git a/content/planner.overlay.xul.php b/content/planner.overlay.xul.php
index 911ce5416..9a17fec39 100755
--- a/content/planner.overlay.xul.php
+++ b/content/planner.overlay.xul.php
@@ -110,9 +110,7 @@ echo '
-
+
@@ -122,9 +120,7 @@ echo '
-
+
diff --git a/content/projekt/gantt.overlay.js.php b/content/projekt/gantt.overlay.js.php
index 5b8877e14..7dfaabcd6 100755
--- a/content/projekt/gantt.overlay.js.php
+++ b/content/projekt/gantt.overlay.js.php
@@ -23,6 +23,7 @@ require_once('../../config/vilesci.config.inc.php');
?>
var global_year;
+var global_url;
function getProperties()
{
@@ -59,7 +60,8 @@ function showStudienjahr()
}
projekt_kurzbz=getTreeCellText(tree, "treecol-projektmenue-projekt_kurzbz", tree.currentIndex);
- var url = 'projekt/gantt.svg.php?projekt='+projekt_kurzbz+'&studienjahr='+(global_year-1)+'&ansicht=studienjahr'
+ var url = 'projekt/gantt.svg.php?projekt='+projekt_kurzbz+'&studienjahr='+(global_year-1)+'&ansicht=studienjahr';
+ global_url = url;
document.getElementById('iframe-ressource-projekt').contentWindow.location.href=url;
}
@@ -83,7 +85,8 @@ function showKalenderjahr()
}
projekt_kurzbz=getTreeCellText(tree, "treecol-projektmenue-projekt_kurzbz", tree.currentIndex);
- var url = 'projekt/gantt.svg.php?projekt='+projekt_kurzbz+'&studienjahr='+global_year+'&ansicht=kalenderjahr'
+ var url = 'projekt/gantt.svg.php?projekt='+projekt_kurzbz+'&studienjahr='+global_year+'&ansicht=kalenderjahr';
+ global_url = url;
document.getElementById('iframe-ressource-projekt').contentWindow.location.href=url;
}
@@ -156,10 +159,12 @@ function showYearPlus()
}
function printGantt()
-{
- alert(document.getElementById('iframe-ressource-projekt').src);
- foo = window.open(url);
- foo.print();
+{
+ foo = window.open(global_url);
+ foo.onload = function ()
+ {
+ foo.print();
+ }
}
diff --git a/content/projekt/gantt.overlay.xul.php b/content/projekt/gantt.overlay.xul.php
index 8e6da1364..2b0de4f12 100755
--- a/content/projekt/gantt.overlay.xul.php
+++ b/content/projekt/gantt.overlay.xul.php
@@ -27,73 +27,31 @@ header("Content-type: application/vnd.mozilla.xul+xml");
require_once('../../config/vilesci.config.inc.php');
echo '';
-echo '';
+/*echo '';*/
?>
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
\ No newline at end of file
diff --git a/content/projekt/gantt.svg.php b/content/projekt/gantt.svg.php
index 1162b7b0d..06e333a35 100755
--- a/content/projekt/gantt.svg.php
+++ b/content/projekt/gantt.svg.php
@@ -43,17 +43,22 @@ header("Content-type: application/xhtml+xml");
require_once('../../config/vilesci.config.inc.php');
require_once('../../include/projektphase.class.php');
+require_once('../../include/projekt.class.php');
require_once('../../include/functions.inc.php');
require_once('../../include/datum.class.php');
$projektphasen = new projektphase();
if(!$projektphasen->getProjektphasen($projekt_kurzbz))
- die('Kein gültiges Projekt übergeben');
+ die('Kein gültiges Projekt übergeben.');
+
+$projekt = new projekt();
+if(!$projekt->load($projekt_kurzbz))
+ die('Konnte Projekt nicht laden.');
$datum = new datum();
$widthPerWeek = 16;
-$startX = 270;
-$startY = 70;
+$startX = 20;
+$startY = 90;
// KW in der 28.12 liegt ist lezte KW
$datum_gesamt = $studienjahr.'-12-28';
$timestamp_gesamt = $datum->mktime_fromdate($datum_gesamt);
@@ -65,7 +70,7 @@ $height = (count($projektphasen->result)) * 50;
// Zeichne Kalenderjahr -> beginnend mit KW 1
if($ansicht=='kalenderjahr')
{
- echo '
+ echo '
';
@@ -77,7 +82,7 @@ if($ansicht=='kalenderjahr')
// Überschriften
echo'Kalenderjahr: '.$studienjahr.'';
echo' KW:';
-
+
// Zeichne Raster
for($i=1; $i<=$kw_gesamt; $i++)
{
@@ -138,7 +143,7 @@ if($ansicht=='kalenderjahr')
// beginnt im vorigen und endet im aktuellen
else if($year_beginn < $studienjahr && $year_end == $studienjahr)
{
- $width = ($kw_end)*$widthPerWeek;
+ $width = ($kw_end+1)*$widthPerWeek;
$x = $startX;
}
}
@@ -148,16 +153,18 @@ if($ansicht=='kalenderjahr')
echo''.$phase->bezeichnung.'';
$i++;
}
+ echo'Projekt: '.$projekt->titel.'';
echo '';
}
else if($ansicht == 'studienjahr')
{
- echo '
+ echo '
';
echo '