Gantt Chart zu Planner hinzugefügt

This commit is contained in:
Karl Burkhart
2012-01-19 08:57:33 +00:00
parent bab46d01f3
commit 26bb03a90d
5 changed files with 54 additions and 84 deletions
+2
View File
@@ -179,6 +179,8 @@ function treeProjektmenueSelect()
{
debug("whoops Documents load failed with exception: "+e);
}
// Gantt Chart laden
drawGantt();
}
else
{
+2 -6
View File
@@ -110,9 +110,7 @@ echo '<?xul-overlay href="'.APP_ROOT.'content/projekt/ressource.overlay.xul.php"
<tab id="tab-dokumente" label="Dokumente" />
<tab id="tab-ressource" label="Ressourcen" />
<tab id="tab-bestellung" label="Bestellungen" />
<!--
<tab id="tab-gantt" label="Gantt" />
-->
<tab id="tab-ganttx" label="Gantt" />
<tab id="tab-notiz" label="Eigene Notizen" />
</tabs>
<tabpanels id="tabpanels-main" flex="1">
@@ -122,9 +120,7 @@ echo '<?xul-overlay href="'.APP_ROOT.'content/projekt/ressource.overlay.xul.php"
<vbox id="box-dokumente" />
<vbox id="box-ressource" />
<vbox id="box-bestellung" />
<!--
<vbox id="box-gantt" />
-->
<vbox id="box-ganttx" />
<vbox id="box-notiz" />
</tabpanels>
</tabbox>
+11 -6
View File
@@ -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();
}
}
+22 -64
View File
@@ -27,73 +27,31 @@ header("Content-type: application/vnd.mozilla.xul+xml");
require_once('../../config/vilesci.config.inc.php');
echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';
echo '<?xml-stylesheet href="gantt.css" type="text/css"?>';
/*echo '<?xml-stylesheet href="gantt.css" type="text/css"?>';*/
?>
<!DOCTYPE overlay >
<overlay id="gant"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
>
<script type="application/x-javascript" src="<?php echo APP_ROOT; ?>content/projekt/gantt.overlay.js.php" />
<overlay id="GanttOverlay"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
>
<script type="application/x-javascript" src="<?php echo APP_ROOT; ?>content/phpRequest.js.php" />
<!-- <script type="application/x-javascript" src="<?php echo APP_ROOT; ?>content/projekt/gantt.overlay.js.php" />-->
<script type="application/x-javascript" src="<?php echo APP_ROOT; ?>content/functions.js.php" />
<!-- ************************ -->
<!-- * Projekttask * -->
<!-- ************************ -->
<vbox id="box-gantt" flex="1" uid="" stg_kz="">
<popupset>
<popup id="projektphase-tree-popup">
<menuitem label="Entfernen" oncommand="TaskDelete();" id="projektphase-tree-popup-entf" disabled="false"/>
</popup>
</popupset>
<vbox id="box-ganttx" flex="1">
<toolbox>
<toolbar id="projektphase-nav-toolbar">
<toolbarbutton id="toolbarbutton-gantt-zoomin" label="Zoom In" oncommand="PhaseNeu();" disabled="true" image="../skin/images/NeuDokument.png" tooltiptext="Neuen Task anlegen" />
<toolbarbutton id="toolbarbutton-gantt-zoomout" label="Zoom Out" oncommand="PhaseDelete();" disabled="true" image="../skin/images/DeleteIcon.png" tooltiptext="Task löschen"/>
<toolbarbutton id="toolbarbutton-gantt-print" label="Drucken" oncommand="PhaseTreeRefresh()" disabled="false" image="../skin/images/refresh.png" tooltiptext="Liste neu laden"/>
<toolbar id="toolbar-bestellung-main">
<toolbarbutton id="toolbarbutton-notiz-filter" label="Ansicht " type="menu">
<menupopup>
<menuitem id="toolbarbutton-menuitem-gantt-studienjahr" label="Studienjahr" type="radio" name="sort" oncommand="drawGantt()" tooltiptext="Anzeige Studienjahr" checked="true"/>
<menuitem id="toolbarbutton-menuitem-gantt-kalenderjahr" label="Kalenderjahr" type="radio" name="sort" oncommand="drawGantt()" tooltiptext="Anzeige Kalenderjahr"/>
</menupopup>
</toolbarbutton>
<toolbarbutton id="toolbarbutton-gantt-zurueck" label="" oncommand="showYearMinus();" disabled="false" image="../skin/images/left.png" tooltiptext="Jahr zurück"/>
<toolbarbutton id="toolbarbutton-gantt-vor" label="Jahr" oncommand="showYear();" disabled="false" tooltiptext="aktuelles Jahr"/>
<toolbarbutton id="toolbarbutton-gantt-vor" label="" oncommand="showYearPlus();" disabled="false" image="../skin/images/right.png" tooltiptext="Jahr vor"/>
<toolbarbutton id="toolbarbutton-gantt-drucken" label="Drucken" oncommand="printGantt();" image="../skin/images/drucken.png" tooltiptext="Drucken"/>
</toolbar>
</toolbox>
<stack flex="1">
<vbox flex="1">
<svg-shape id="background-circle" flex="1" type="circle" />
</vbox>
<vbox flex="1">
<spacer flex="2"/>
<svg-shape flex="1" id="svg-button" type="rect" radius="12" label="Projekt Lernquadrat"/>
<spacer flex="2"/>
<hbox flex="4">
<svg-shape flex="1" id="phase1" type="rect" label="Analysephase"/>
<svg-shape flex="1" id="circ2" type="circle" label="2" />
<svg-shape flex="1" id="circ3" type="circle" label="3" />
</hbox>
<spacer flex="1"/>
</vbox>
</stack>
<splitter collapse="after" persist="state">
<grippy />
</splitter>
<!-- ************ -->
<!-- * Detail * -->
<!-- ************ -->
<vbox flex="1" style="overflow:auto;margin:0px;" persist="height">
<tabbox id="projektphase-tabbox" flex="3" orient="vertical">
<tabs orient="horizontal" id="projektphase-tabs">
<tab id="projektphase-tab-detail" label="Details" />
<tab id="projektphase-tab-mantis" label="Mantis" />
</tabs>
<tabpanels id="projektphase-tabpanels-main" flex="1">
<vbox id="projektphase-detail" />
<vbox id="projektphase-mantis" />
</tabpanels>
</tabbox>
</vbox>
</vbox>
<iframe id="iframe-ressource-projekt" flex="5" src="" />
</vbox>
</overlay>
+17 -8
View File
@@ -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 '<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
echo '<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">';
@@ -77,7 +82,7 @@ if($ansicht=='kalenderjahr')
// Überschriften
echo'<text x="30%" y="40" style="font-size:33px">Kalenderjahr: '.$studienjahr.'</text>';
echo'<text x="'.($startX-10).'" y="'.($startY-5).'" style="font-size:13px" text-anchor="end"> KW:</text>';
// 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'<text x="'.($startX-10).'" y="'.($startY+30+$i*50).'" style="font-size:15px" text-anchor="end">'.$phase->bezeichnung.'</text>';
$i++;
}
echo'<text x="10%" y="'.((($i+1)*50)+$startY).'" style="font-size:16px">Projekt: '.$projekt->titel.'</text>';
echo '</svg>';
}
else if($ansicht == 'studienjahr')
{
echo '<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
echo '<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">';
echo '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
width="100%" height="100%">';
width="100%" height="100%" viewBox="0 0 750 600">
>';
// Überschriften
echo'<text x="30%" y="40" style="font-size:33px">Studienjahr: '.$studienjahr.'/'.($studienjahr+1).'</text>';
@@ -307,6 +314,8 @@ else if($ansicht == 'studienjahr')
$i++;
}
echo'<text x="10%" y="'.((($i+1)*50)+$startY).'" style="font-size:16px">Projekt: '.$projekt->titel.'</text>';
// aktuelle KW markieren
$timestamp_now = time();
$kw_now = kalenderwoche($timestamp_now);