mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-25 08:34:29 +00:00
Planner
- Aufwandstyp pro Projekt einstellbar - Aufwand kann bei Ressourcezuordnung eingetragen werden - Ressourcenauslastung für Tasks - Aufwandssumme wird in Ressourcenauslastung angezeigt - Fehler beim Speichern und in der Anzeige behoben wenn Sonderzeichen in den Beschreibungen verwendet wurden
This commit is contained in:
@@ -335,7 +335,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
|
||||
var notiz = new SOAPObject("notiz");
|
||||
notiz.appendChild(new SOAPObject("notiz_id")).val(notiz_id);
|
||||
notiz.appendChild(new SOAPObject("titel")).val(titel);
|
||||
notiz.appendChild(new SOAPObject("titel")).cdataval(titel);
|
||||
notiz.appendChild(new SOAPObject("text")).cdataval(text);
|
||||
notiz.appendChild(new SOAPObject("verfasser_uid")).val(verfasser_uid);
|
||||
notiz.appendChild(new SOAPObject("bearbeiter_uid")).val(bearbeiter_uid);
|
||||
|
||||
@@ -58,8 +58,33 @@ function treeProjektmenueSelect()
|
||||
//Projekte neu laden
|
||||
try
|
||||
{
|
||||
// Wenn eine OE angeklickt wird, den Phase Projekte anzeigen
|
||||
document.getElementById('tabs-planner-main').selectedItem=document.getElementById('tab-projekte');
|
||||
// Wenn eine OE angeklickt wird, den Tab Projekte anzeigen
|
||||
if(oe!='' && projekt_kurzbz=='' && projekt_phase_id=='')
|
||||
{
|
||||
// Wenn der Ressourceauslastung Tab geoeffnet ist
|
||||
if(document.getElementById('tabs-planner-main').selectedItem==document.getElementById('tab-ressourceauslastung'))
|
||||
{
|
||||
// und dort der Projekttask Tab geoffnet ist, dann die Anzeige dort neu laden
|
||||
if(document.getElementById('ressource-tabs').selectedItem==document.getElementById('tab-ressource-projekttask'))
|
||||
{
|
||||
reloadRessourceTasks();
|
||||
}
|
||||
if(document.getElementById('ressource-tabs').selectedItem==document.getElementById('tab-ressource-projektphase'))
|
||||
{
|
||||
// wenn der Phasen Karteireiter offen ist werden die Phasen dort neu geladen
|
||||
reloadRessourcePhasen();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Wenn der Tab Phase oder Tasks ausgewaehlt ist auf die Projekte wechseln
|
||||
if(document.getElementById('tabs-planner-main').selectedItem==document.getElementById('tab-projektphase')
|
||||
|| document.getElementById('tabs-planner-main').selectedItem==document.getElementById('tab-projekttask'))
|
||||
{
|
||||
document.getElementById('tabs-planner-main').selectedItem=document.getElementById('tab-projekte');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var datasource="<?php echo APP_ROOT; ?>rdf/projekt.rdf.php?oe="+oe+"&filter="+global_filter+"&"+gettimestamp();
|
||||
var treeProjekt=document.getElementById('tree-projekt');
|
||||
@@ -94,8 +119,32 @@ function treeProjektmenueSelect()
|
||||
// Projektphasen neu laden
|
||||
if(projekt_kurzbz!='')
|
||||
{
|
||||
// Wenn eine Projekt angeklickt wird, den Phase Karteireiter anzeigen
|
||||
document.getElementById('tabs-planner-main').selectedItem=document.getElementById('tab-projektphase');
|
||||
// Wenn ein Projekt angeklickt wird, ggf Karteireiter wechseln
|
||||
|
||||
// Wenn der Ressourceauslastung Tab geoeffnet ist
|
||||
if(document.getElementById('tabs-planner-main').selectedItem==document.getElementById('tab-ressourceauslastung'))
|
||||
{
|
||||
// und dort der Projekttask Tab geoffnet ist, dann die Anzeige dort neu laden
|
||||
if(document.getElementById('ressource-tabs').selectedItem==document.getElementById('tab-ressource-projekttask'))
|
||||
{
|
||||
reloadRessourceTasks();
|
||||
}
|
||||
if(document.getElementById('ressource-tabs').selectedItem==document.getElementById('tab-ressource-projektphase'))
|
||||
{
|
||||
// wenn der Phasen Karteireiter offen ist werden die Phasen dort neu geladen
|
||||
reloadRessourcePhasen();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Wenn der Tab Projekte oder Tasks ausgewaehlt ist auf die Phasen wechseln
|
||||
if(document.getElementById('tabs-planner-main').selectedItem==document.getElementById('tab-projekte')
|
||||
|| document.getElementById('tabs-planner-main').selectedItem==document.getElementById('tab-projekttask'))
|
||||
{
|
||||
document.getElementById('tabs-planner-main').selectedItem=document.getElementById('tab-projektphase');
|
||||
}
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
var datasources="<?php echo APP_ROOT; ?>rdf/projektphase.rdf.php?"+gettimestamp();
|
||||
@@ -135,8 +184,12 @@ function treeProjektmenueSelect()
|
||||
// Projekttasks neu laden
|
||||
if(projekt_phase_id!='')
|
||||
{
|
||||
// Wenn eine Phase angeklickt wird, den Task Karteireiter anzeigen
|
||||
document.getElementById('tabs-planner-main').selectedItem=document.getElementById('tab-projekttask');
|
||||
// Wenn eine Phase angeklickt wird, den Task Karteireiter anzeigen wenn projekt oder phasen tab geoeffnet ist
|
||||
if(document.getElementById('tabs-planner-main').selectedItem==document.getElementById('tab-projekte')
|
||||
|| document.getElementById('tabs-planner-main').selectedItem==document.getElementById('tab-projektphase'))
|
||||
{
|
||||
document.getElementById('tabs-planner-main').selectedItem=document.getElementById('tab-projekttask');
|
||||
}
|
||||
LoadTasks(projekt_phase_id);
|
||||
}
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ echo '<?xul-overlay href="'.APP_ROOT.'content/projekt/ressource.overlay.xul.php"
|
||||
<tab id="tab-projektphase" label="Phasen" />
|
||||
<tab id="tab-projekttask" label="Tasks" selected="true" />
|
||||
<tab id="tab-dokumente" label="Dokumente" />
|
||||
<tab id="tab-ressource" label="Ressourcen" />
|
||||
<tab id="tab-ressourceauslastung" label="Ressourcen" />
|
||||
<tab id="tab-bestellung" label="Bestellungen" />
|
||||
<tab id="tab-ganttx" label="Gantt" />
|
||||
<tab id="tab-notiz" label="Eigene Notizen" />
|
||||
|
||||
@@ -171,7 +171,7 @@ function getOeGanttZeitraum($beginn, $ende)
|
||||
|
||||
// zeichne balken
|
||||
echo '<rect x="'.$x.'" y="'.($startY+10+$i*50).'" width ="'.$width.'" height ="30" fill="'.$projekt->farbe.'" stroke="black" />';
|
||||
echo'<text x="'.($startX-10).'" y="'.($startY+30+$i*50).'" style="font-size:15px" text-anchor="end">'.$projekt->titel.'</text>';
|
||||
echo'<text x="'.($startX-10).'" y="'.($startY+30+$i*50).'" style="font-size:15px" text-anchor="end">'.htmlspecialchars($projekt->titel).'</text>';
|
||||
|
||||
// Zeichne Phasen in Projektbalken
|
||||
$projektphasen = new projektphase();
|
||||
@@ -365,7 +365,7 @@ function getOeGantt()
|
||||
|
||||
// zeichne balken
|
||||
echo '<rect x="'.$x.'" y="'.($startY+10+$i*50).'" width ="'.$width.'" height ="30" fill="'.$projekt->farbe.'" stroke="black" />';
|
||||
echo'<text x="'.($startX-10).'" y="'.($startY+30+$i*50).'" style="font-size:15px" text-anchor="end">'.$projekt->titel.'</text>';
|
||||
echo'<text x="'.($startX-10).'" y="'.($startY+30+$i*50).'" style="font-size:15px" text-anchor="end">'.htmlspecialchars($projekt->titel).'</text>';
|
||||
|
||||
// Zeichne Phasen in Projektbalken
|
||||
$projektphasen = new projektphase();
|
||||
@@ -420,7 +420,7 @@ function getOeGantt()
|
||||
|
||||
$i++;
|
||||
}
|
||||
echo'<text x="10%" y="'.((($i+1)*50)+$startY).'" style="font-size:16px">Organisationseinheit: '.$projekt->oe_kurzbz.'</text>';
|
||||
echo'<text x="10%" y="'.((($i+1)*50)+$startY).'" style="font-size:16px">Organisationseinheit: '.htmlspecialchars($projekt->oe_kurzbz).'</text>';
|
||||
|
||||
echo '</svg>';
|
||||
}
|
||||
@@ -574,9 +574,9 @@ function getOeGantt()
|
||||
}
|
||||
|
||||
// zeichne balken
|
||||
echo "test:".$test.$projekt->titel."jahr".$studienjahr;
|
||||
//echo "test:".$test.$projekt->titel."jahr".$studienjahr;
|
||||
echo '<rect x="'.$x.'" y="'.($startY+10+$i*50).'" width ="'.$width.'" height ="30" fill="'.$projekt->farbe.'" stroke="black" />';
|
||||
echo'<text x="'.($startX-10).'" y="'.($startY+30+$i*50).'" style="font-size:15px" text-anchor="end">'.$projekt->titel.'</text>';
|
||||
echo'<text x="'.($startX-10).'" y="'.($startY+30+$i*50).'" style="font-size:15px" text-anchor="end">'.htmlspecialchars($projekt->titel).'</text>';
|
||||
|
||||
// Zeichne Phasen in Projektbalken
|
||||
$projektphasen = new projektphase();
|
||||
@@ -832,10 +832,10 @@ function getProjektGantt()
|
||||
$style = 'style ="stroke:pink;stroke-width:10;"';
|
||||
// zeichne balken
|
||||
echo '<rect x="'.$x.'" y="'.($startY+10+$i*50).'" width ="'.$width.'" height ="30" fill="'.$phase->farbe.'" stroke="black" '.$style.'/>';
|
||||
echo'<text x="'.($startX-10).'" y="'.($startY+30+$i*50).'" style="font-size:15px" text-anchor="end">'.$phase->bezeichnung.'</text>';
|
||||
echo'<text x="'.($startX-10).'" y="'.($startY+30+$i*50).'" style="font-size:15px" text-anchor="end">'.htmlspecialchars($phase->bezeichnung).'</text>';
|
||||
$i++;
|
||||
}
|
||||
echo'<text x="10%" y="'.((($i+1)*50)+$startY).'" style="font-size:16px">Projekt: '.$projekt->titel.'</text>';
|
||||
echo'<text x="10%" y="'.((($i+1)*50)+$startY).'" style="font-size:16px">Projekt: '.htmlspecialchars($projekt->titel).'</text>';
|
||||
|
||||
echo '</svg>';
|
||||
}
|
||||
@@ -1000,11 +1000,11 @@ function getProjektGantt()
|
||||
$style = 'style ="stroke:pink;stroke-width:10;"';
|
||||
|
||||
echo '<rect x="'.$x.'" y="'.($startY+10+$i*50).'" width ="'.$width.'" height ="30" fill="'.$phase->farbe.'" stroke="black" '.$style.' />';
|
||||
echo'<text x="'.($startX-10).'" y="'.($startY+30+$i*50).'" style="font-size:15px" text-anchor="end">'.$phase->bezeichnung.'</text>';
|
||||
echo'<text x="'.($startX-10).'" y="'.($startY+30+$i*50).'" style="font-size:15px" text-anchor="end">'.htmlspecialchars($phase->bezeichnung).'</text>';
|
||||
$i++;
|
||||
}
|
||||
|
||||
echo'<text x="10%" y="'.((($i+1)*50)+$startY).'" style="font-size:16px">Projekt: '.$projekt->titel.'</text>';
|
||||
echo'<text x="10%" y="'.((($i+1)*50)+$startY).'" style="font-size:16px">Projekt: '.htmlspecialchars($projekt->titel).'</text>';
|
||||
|
||||
// aktuelle KW markieren
|
||||
$timestamp_now = time();
|
||||
|
||||
@@ -150,7 +150,7 @@ function onselectProjekt()
|
||||
var ende=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#ende" ));
|
||||
var budget=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#budget" ));
|
||||
var farbe=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#farbe" ));
|
||||
var personentage=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#personentage" ));
|
||||
var aufwandstyp_kurzbz=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#aufwandstyp_kurzbz" ));
|
||||
|
||||
//Daten den Feldern zuweisen
|
||||
|
||||
@@ -165,6 +165,7 @@ function onselectProjekt()
|
||||
document.getElementById('textbox-projekt-detail-budget').value=budget;
|
||||
document.getElementById('textbox-projekt-detail-farbe').value=farbe;
|
||||
document.getElementById('checkbox-projekt-detail-neu').checked=false;
|
||||
MenulistSelectItemOnValue('menulist-projekt-detail-aufwandstyp', aufwandstyp_kurzbz);
|
||||
|
||||
|
||||
//Notizen zu einem Projekt Laden
|
||||
@@ -194,6 +195,7 @@ function saveProjektDetail()
|
||||
budget = document.getElementById('textbox-projekt-detail-budget').value;
|
||||
farbe = document.getElementById('textbox-projekt-detail-farbe').value;
|
||||
neu = document.getElementById('checkbox-projekt-detail-neu').checked;
|
||||
aufwandstyp_kurzbz = MenulistGetSelectedValue('menulist-projekt-detail-aufwandstyp');
|
||||
|
||||
var soapBody = new SOAPObject("saveProjekt");
|
||||
//soapBody.appendChild(new SOAPObject("username")).val('joe');
|
||||
@@ -202,13 +204,15 @@ function saveProjektDetail()
|
||||
var projekt = new SOAPObject("projekt");
|
||||
projekt.appendChild(new SOAPObject("projekt_kurzbz")).val(projekt_kurzbz);
|
||||
projekt.appendChild(new SOAPObject("oe_kurzbz")).val(oe_kurzbz);
|
||||
projekt.appendChild(new SOAPObject("titel")).val(titel);
|
||||
projekt.appendChild(new SOAPObject("nummer")).val(nummer);
|
||||
projekt.appendChild(new SOAPObject("beschreibung")).val(beschreibung);
|
||||
projekt.appendChild(new SOAPObject("titel")).cdataval(titel);
|
||||
projekt.appendChild(new SOAPObject("nummer")).cdataval(nummer);
|
||||
projekt.appendChild(new SOAPObject("beschreibung")).cdataval(beschreibung);
|
||||
projekt.appendChild(new SOAPObject("beginn")).val(beginn);
|
||||
projekt.appendChild(new SOAPObject("ende")).val(ende);
|
||||
projekt.appendChild(new SOAPObject("budget")).val(budget);
|
||||
projekt.appendChild(new SOAPObject("farbe")).val(farbe);
|
||||
projekt.appendChild(new SOAPObject("aufwandstyp_kurzbz")).val(aufwandstyp_kurzbz);
|
||||
|
||||
if(neu)
|
||||
projekt.appendChild(new SOAPObject("neu")).val('true');
|
||||
else
|
||||
@@ -347,6 +351,7 @@ function ProjektDisableFields(val)
|
||||
document.getElementById('textbox-projekt-detail-budget').disabled=val;
|
||||
document.getElementById('textbox-projekt-detail-farbe').disabled=val;
|
||||
document.getElementById('button-projekt-detail-speichern').disabled=val;
|
||||
document.getElementById('menulist-projekt-detail-aufwandstyp').disabled=val;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -122,6 +122,24 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';
|
||||
<spacer />
|
||||
</hbox>
|
||||
</row>
|
||||
<row>
|
||||
<label value="Aufwandstyp" control="textbox-projekt-detail-aufwandstyp"/>
|
||||
<hbox>
|
||||
<menulist id="menulist-projekt-detail-aufwandstyp" disabled="true"
|
||||
xmlns:AUFWANDSTYP="http://www.technikum-wien.at/aufwandstyp/rdf#"
|
||||
datasources="<?php echo APP_ROOT;?>rdf/aufwandstyp.rdf.php"
|
||||
ref="http://www.technikum-wien.at/aufwandstyp" >
|
||||
<template>
|
||||
<menupopup >
|
||||
<menuitem value="rdf:http://www.technikum-wien.at/aufwandstyp/rdf#aufwandstyp_kurzbz"
|
||||
label="rdf:http://www.technikum-wien.at/aufwandstyp/rdf#bezeichnung"
|
||||
uri="rdf:*"/>
|
||||
</menupopup>
|
||||
</template>
|
||||
</menulist>
|
||||
<spacer />
|
||||
</hbox>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
<hbox>
|
||||
|
||||
@@ -232,8 +232,8 @@ function saveProjektphaseDetail()
|
||||
phase.appendChild(new SOAPObject("projektphase_id")).val(projektphase_id);
|
||||
phase.appendChild(new SOAPObject("projektphase_fk")).val(projektphase_fk);
|
||||
phase.appendChild(new SOAPObject("projekt_kurzbz")).val(projekt_kurzbz);
|
||||
phase.appendChild(new SOAPObject("bezeichnung")).val(bezeichnung);
|
||||
phase.appendChild(new SOAPObject("beschreibung")).val(beschreibung);
|
||||
phase.appendChild(new SOAPObject("bezeichnung")).cdataval(bezeichnung);
|
||||
phase.appendChild(new SOAPObject("beschreibung")).cdataval(beschreibung);
|
||||
phase.appendChild(new SOAPObject("start")).val(start);
|
||||
phase.appendChild(new SOAPObject("ende")).val(ende);
|
||||
phase.appendChild(new SOAPObject("budget")).val(budget);
|
||||
|
||||
@@ -350,8 +350,8 @@ function saveProjekttaskDetail()
|
||||
var task = new SOAPObject("task");
|
||||
task.appendChild(new SOAPObject("projekttask_id")).val(projekttask_id);
|
||||
task.appendChild(new SOAPObject("projektphase_id")).val(projektphase_id);
|
||||
task.appendChild(new SOAPObject("bezeichnung")).val(bezeichnung);
|
||||
task.appendChild(new SOAPObject("beschreibung")).val(beschreibung);
|
||||
task.appendChild(new SOAPObject("bezeichnung")).cdataval(bezeichnung);
|
||||
task.appendChild(new SOAPObject("beschreibung")).cdataval(beschreibung);
|
||||
task.appendChild(new SOAPObject("aufwand")).val(aufwand);
|
||||
task.appendChild(new SOAPObject("mantis_id")).val(mantis_id);
|
||||
task.appendChild(new SOAPObject("scrumsprint_id")).val(scrumsprint_id);
|
||||
|
||||
Executable
+66
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
require_once('../../config/vilesci.config.inc.php');
|
||||
require_once('../../include/functions.inc.php');
|
||||
?>
|
||||
|
||||
|
||||
function reloadRessourceTasks()
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
var tree=document.getElementById('tree-projektmenue');
|
||||
|
||||
// Wenn auf die Ueberschrift geklickt wird, soll nix passieren
|
||||
if(tree.currentIndex==-1)
|
||||
return;
|
||||
|
||||
var projekt_kurzbz=getTreeCellText(tree, "treecol-projektmenue-projekt_kurzbz", tree.currentIndex);
|
||||
var path = '<?php echo APP_ROOT; ?>content/projekt/ressourcenauslastung.php?typ=task&projekt_kurzbz='+projekt_kurzbz+'&'+gettimestamp();
|
||||
|
||||
document.getElementById('iframe-ressource-projekttask').setAttribute('src',path);
|
||||
}
|
||||
|
||||
function reloadRessourcePhasen()
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
var tree=document.getElementById('tree-projektmenue');
|
||||
|
||||
// Wenn auf die Ueberschrift geklickt wird, soll nix passieren
|
||||
if(tree.currentIndex==-1)
|
||||
return;
|
||||
|
||||
var projekt_kurzbz=getTreeCellText(tree, "treecol-projektmenue-projekt_kurzbz", tree.currentIndex);
|
||||
var path = '<?php echo APP_ROOT; ?>content/projekt/ressourcenauslastung.php?typ=phase&projekt_kurzbz='+projekt_kurzbz+'&'+gettimestamp();
|
||||
|
||||
document.getElementById('iframe-ressource-projektphase').setAttribute('src',path);
|
||||
}
|
||||
|
||||
function RessourcePrintTask()
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
var tree=document.getElementById('tree-projektmenue');
|
||||
|
||||
// Wenn auf die Ueberschrift geklickt wird, soll nix passieren
|
||||
if(tree.currentIndex==-1)
|
||||
return;
|
||||
|
||||
var projekt_kurzbz=getTreeCellText(tree, "treecol-projektmenue-projekt_kurzbz", tree.currentIndex);
|
||||
var path = '<?php echo APP_ROOT; ?>content/projekt/ressourcenauslastung.php?typ=task&projekt_kurzbz='+projekt_kurzbz+'&'+gettimestamp();
|
||||
|
||||
var foo = window.open(path);
|
||||
foo.print();
|
||||
}
|
||||
|
||||
function RessourcePrintPhasen()
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
var tree=document.getElementById('tree-projektmenue');
|
||||
|
||||
// Wenn auf die Ueberschrift geklickt wird, soll nix passieren
|
||||
if(tree.currentIndex==-1)
|
||||
return;
|
||||
|
||||
var projekt_kurzbz=getTreeCellText(tree, "treecol-projektmenue-projekt_kurzbz", tree.currentIndex);
|
||||
var path = '<?php echo APP_ROOT; ?>content/projekt/ressourcenauslastung.php?typ=phase&projekt_kurzbz='+projekt_kurzbz+'&'+gettimestamp();
|
||||
var foo = window.open(path);
|
||||
foo.print();
|
||||
}
|
||||
@@ -43,7 +43,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';
|
||||
>
|
||||
|
||||
<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/ressource.overlay.js.php" />-->
|
||||
<script type="application/x-javascript" src="<?php echo APP_ROOT; ?>content/projekt/ressource.overlay.js.php" />
|
||||
<script type="application/x-javascript" src="<?php echo APP_ROOT; ?>content/functions.js.php" />
|
||||
|
||||
<!-- ************************ -->
|
||||
@@ -54,6 +54,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';
|
||||
<tabs orient="horizontal" id="ressource-tabs">
|
||||
<tab id="tab-ressource-projekt" label="Projekte" />
|
||||
<tab id="tab-ressource-projektphase" label="Projektphasen" />
|
||||
<tab id="tab-ressource-projekttask" label="Projekttasks" />
|
||||
</tabs>
|
||||
<tabpanels id="tabpanels-ressource-main" flex="1">
|
||||
<vbox>
|
||||
@@ -68,12 +69,22 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';
|
||||
<vbox>
|
||||
<toolbox>
|
||||
<toolbar>
|
||||
<toolbarbutton id="toolbarbutton-ressource-projektphase-aktualisieren" label="Aktualisieren" oncommand="document.getElementById('iframe-ressource-projektphase').setAttribute('src','<?php echo APP_ROOT; ?>content/projekt/ressourcenauslastung.php?typ=phase&'+gettimestamp());" image="../skin/images/refresh.png" tooltiptext="Neu laden"/>
|
||||
<toolbarbutton id="toolbarbutton-ressource-projektphase-drucken" label="Drucken" oncommand="foo = window.open('<?php echo APP_ROOT; ?>content/projekt/ressourcenauslastung.php?typ=phase');foo.print();" image="../skin/images/drucken.png" tooltiptext="Drucken"/>
|
||||
<toolbarbutton id="toolbarbutton-ressource-projektphase-aktualisieren" label="Aktualisieren" oncommand="reloadRessourcePhasen();" image="../skin/images/refresh.png" tooltiptext="Neu laden"/>
|
||||
<toolbarbutton id="toolbarbutton-ressource-projektphase-drucken" label="Drucken" oncommand="RessourcePrintPhasen()" image="../skin/images/drucken.png" tooltiptext="Drucken"/>
|
||||
</toolbar>
|
||||
</toolbox>
|
||||
|
||||
<iframe id="iframe-ressource-projektphase" flex="5" src="<?php echo APP_ROOT; ?>content/projekt/ressourcenauslastung.php?typ=phase" />
|
||||
<iframe id="iframe-ressource-projektphase" flex="5" src="about:blank" />
|
||||
</vbox>
|
||||
<vbox>
|
||||
<toolbox>
|
||||
<toolbar>
|
||||
<toolbarbutton id="toolbarbutton-ressource-projekttask-aktualisieren" label="Aktualisieren" oncommand="reloadRessourceTasks();" image="../skin/images/refresh.png" tooltiptext="Neu laden"/>
|
||||
<toolbarbutton id="toolbarbutton-ressource-projektask-drucken" label="Drucken" oncommand="RessourcePrintTask()" image="../skin/images/drucken.png" tooltiptext="Drucken"/>
|
||||
</toolbar>
|
||||
</toolbox>
|
||||
|
||||
<iframe id="iframe-ressource-projekttask" flex="5" src="about:blank" />
|
||||
</vbox>
|
||||
</tabpanels>
|
||||
</tabbox>
|
||||
|
||||
@@ -49,7 +49,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
<xul:tree anonid="tree-ressource"
|
||||
seltype="single" hidecolumnpicker="false" flex="1"
|
||||
datasources="rdf:null" ref="http://www.technikum-wien.at/ressource/liste"
|
||||
ondblclick="document.getBindingParent(this).openNotiz(document.getBindingParent(this).value);"
|
||||
ondblclick="document.getBindingParent(this).openRessource(document.getBindingParent(this).value);"
|
||||
ondrop="nsDragAndDrop.drop(event,
|
||||
{
|
||||
getSupportedFlavours : function ()
|
||||
@@ -157,6 +157,10 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
<xul:treecol anonid="treecol-ressource-descriptioin" label="Anzeige" flex="5" hidden="false" persist="hidden width ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/ressource/rdf#description" />
|
||||
<xul:splitter class="tree-splitter"/>
|
||||
<xul:treecol anonid="treecol-ressource-aufwand" label="Aufwand" flex="2" hidden="false" persist="hidden width ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/notiz/rdf#aufwand" />
|
||||
<xul:splitter class="tree-splitter"/>
|
||||
<xul:treecol anonid="treecol-ressource-typ" label="Typ" flex="2" hidden="false" persist="hidden width ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
@@ -185,6 +189,10 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
<xul:treecol anonid="treecol-ressource-firma_id" label="FirmaID" flex="2" hidden="true" persist="hidden width ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/ressource/rdf#firma_id" />
|
||||
<xul:splitter class="tree-splitter"/>
|
||||
<xul:treecol anonid="treecol-ressource-projekt_ressource_id" label="ProjektRessourceID" flex="2" hidden="true" persist="hidden width ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/ressource/rdf#projekt_ressource_id" />
|
||||
</xul:treecols>
|
||||
|
||||
<xul:template>
|
||||
@@ -194,6 +202,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
<xul:treerow>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/ressource/rdf#bezeichnung"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/ressource/rdf#rdf_description"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/ressource/rdf#aufwand"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/ressource/rdf#typ"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/ressource/rdf#ressource_id"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/ressource/rdf#beschreibung"/>
|
||||
@@ -201,6 +210,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
<treecell label="rdf:http://www.technikum-wien.at/ressource/rdf#student_uid"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/ressource/rdf#betriebsmittel_id"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/ressource/rdf#firma_id"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/ressource/rdf#projekt_ressource_id"/>
|
||||
</xul:treerow>
|
||||
</xul:treeitem>
|
||||
</xul:treechildren>
|
||||
@@ -468,7 +478,91 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
||||
<method name="openRessource">
|
||||
<parameter name="id"/>
|
||||
<body>
|
||||
<![CDATA[
|
||||
var projekt_kurzbz = this.getAttribute('projekt_kurzbz');
|
||||
var projektphase_id = this.getAttribute('projektphase_id');
|
||||
|
||||
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
tree = document.getAnonymousElementByAttribute(this ,'anonid', 'tree-ressource');
|
||||
var col = tree.columns.getColumnFor(document.getAnonymousElementByAttribute(this ,'anonid', 'treecol-ressource-aufwand'));
|
||||
aufwand = tree.view.getCellText(tree.currentIndex, col);
|
||||
|
||||
var col = tree.columns.getColumnFor(document.getAnonymousElementByAttribute(this ,'anonid', 'treecol-ressource-projekt_ressource_id'));
|
||||
var projekt_ressource_id = tree.view.getCellText(tree.currentIndex, col);
|
||||
|
||||
|
||||
var col = tree.columns.getColumnFor(document.getAnonymousElementByAttribute(this ,'anonid', 'treecol-ressource-beschreibung'));
|
||||
var beschreibung = tree.view.getCellText(tree.currentIndex, col);
|
||||
|
||||
|
||||
if(projekt_ressource_id!='')
|
||||
{
|
||||
if(aufwand = prompt("Aufwand:",aufwand))
|
||||
{
|
||||
try
|
||||
{
|
||||
var soapBody = new SOAPObject("saveProjektRessource");
|
||||
var projektRessource = new SOAPObject("projektRessource");
|
||||
|
||||
projektRessource.appendChild(new SOAPObject("projekt_ressource_id")).val(projekt_ressource_id);
|
||||
|
||||
if(projekt_kurzbz != '')
|
||||
{
|
||||
projektRessource.appendChild(new SOAPObject("projektphase_id")).val('');
|
||||
projektRessource.appendChild(new SOAPObject("projekt_kurzbz")).val(projekt_kurzbz);
|
||||
}
|
||||
else if(projektphase_id != '')
|
||||
{
|
||||
projektRessource.appendChild(new SOAPObject("projektphase_id")).val(projektphase_id);
|
||||
projektRessource.appendChild(new SOAPObject("projekt_kurzbz")).val('');
|
||||
}
|
||||
projektRessource.appendChild(new SOAPObject("ressource_id")).val(id);
|
||||
projektRessource.appendChild(new SOAPObject("funktion_kurzbz")).val('');
|
||||
projektRessource.appendChild(new SOAPObject("beschreibung")).val(beschreibung);
|
||||
projektRessource.appendChild(new SOAPObject("aufwand")).val(aufwand);
|
||||
|
||||
soapBody.appendChild(projektRessource);
|
||||
|
||||
var sr = new SOAPRequest("saveProjektRessource",soapBody);
|
||||
SOAPClient.Proxy="<?php echo APP_ROOT;?>soap/ressource_projekt.soap.php?"+gettimestamp();
|
||||
|
||||
function mycallb(obj)
|
||||
{
|
||||
var me=obj;
|
||||
this.invoke=function (respObj)
|
||||
{
|
||||
try
|
||||
{
|
||||
var id = respObj.Body[0].saveProjektRessourceResponse[0].message[0].Text;
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
var fehler = respObj.Body[0].Fault[0].faultstring[0].Text;
|
||||
alert('Fehler: '+fehler);
|
||||
return;
|
||||
}
|
||||
me.RefreshRessource();
|
||||
}
|
||||
}
|
||||
|
||||
var cb=new mycallb(this);
|
||||
|
||||
SOAPClient.SendRequest(sr,cb.invoke);
|
||||
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
debug("Ressource load failed with exception: "+e);
|
||||
}
|
||||
}
|
||||
}
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
<constructor>
|
||||
var projekt_kurzbz = this.getAttribute('projekt_kurzbz');
|
||||
var projektphase_id = this.getAttribute('projektphase_id');
|
||||
|
||||
@@ -22,6 +22,7 @@ require_once('../../include/functions.inc.php');
|
||||
require_once('../../include/ressource.class.php');
|
||||
require_once('../../include/datum.class.php');
|
||||
require_once('../../include/projektphase.class.php');
|
||||
require_once('../../include/projekttask.class.php');
|
||||
|
||||
$showweeks=52;
|
||||
$timestamp = time();
|
||||
@@ -33,19 +34,33 @@ $datum = date('Y-m-d',$timestamp);
|
||||
$endetimestamp = jump_week($timestamp,$showweeks);
|
||||
$endedatum = date('Y-m-d',$endetimestamp);
|
||||
|
||||
if(isset($_GET['projekt_kurzbz']) && $_GET['projekt_kurzbz']!='')
|
||||
{
|
||||
$projekt_kurzbz=$_GET['projekt_kurzbz'];
|
||||
}
|
||||
else
|
||||
$projekt_kurzbz=null;
|
||||
|
||||
if(isset($_GET['typ']) && $_GET['typ']=='projekt')
|
||||
{
|
||||
$ressource->getProjektRessourceDatum($datum, $endedatum);
|
||||
$typ = 'projekt';
|
||||
$anzahl_warnung = 6;
|
||||
}
|
||||
elseif(isset($_GET['typ']) && $_GET['typ']=='task')
|
||||
{
|
||||
$ressource->getTaskRessoureDatum($datum, $endedatum, $projekt_kurzbz);
|
||||
$typ = 'task';
|
||||
$anzahl_warnung = 6;
|
||||
}
|
||||
else
|
||||
{
|
||||
$ressource->getProjektphaseRessourceDatum($datum, $endedatum);
|
||||
$ressource->getProjektphaseRessourceDatum($datum, $endedatum, $projekt_kurzbz);
|
||||
$typ = 'phase';
|
||||
$anzahl_warnung = 6;
|
||||
}
|
||||
|
||||
|
||||
foreach($ressource->result as $row)
|
||||
$ressource_arr[]=$row->bezeichnung;
|
||||
|
||||
@@ -76,7 +91,7 @@ echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
||||
<body>
|
||||
<table>
|
||||
<tr>
|
||||
<th>Ressource ('.$typ.')</th>';
|
||||
<th>Ressource ('.$typ.(!is_null($projekt_kurzbz)?'/'.$projekt_kurzbz:'').')</th>';
|
||||
for($i=0;$i<$showweeks;$i++)
|
||||
{
|
||||
$timestamp_kw = jump_week($timestamp,$i);
|
||||
@@ -96,10 +111,10 @@ foreach($ressource_arr as $bezeichnung)
|
||||
$anzahl=0;
|
||||
$title='';
|
||||
reset($ressource->result);
|
||||
|
||||
$aufwandssumme=0;
|
||||
foreach($ressource->result as $row)
|
||||
{
|
||||
|
||||
$beistrich=false;
|
||||
$start = $datum_obj->mktime_fromdate($row->start);
|
||||
$ende = $datum_obj->mktime_fromdate($row->ende);
|
||||
if($row->bezeichnung == $bezeichnung
|
||||
@@ -110,8 +125,9 @@ foreach($ressource_arr as $bezeichnung)
|
||||
if($typ=='projekt' && $row->projekt_kurzbz!='')
|
||||
{
|
||||
$anzahl++;
|
||||
$title .= $row->projekt_kurzbz;
|
||||
$beistrich=true;
|
||||
$showrow=true;
|
||||
$title .= $row->projekt_kurzbz.',';
|
||||
}
|
||||
elseif($typ=='phase' && $row->projektphase_id!='')
|
||||
{
|
||||
@@ -119,22 +135,42 @@ foreach($ressource_arr as $bezeichnung)
|
||||
$showrow=true;
|
||||
$phase = new projektphase();
|
||||
$phase->load($row->projektphase_id);
|
||||
$title .= $phase->bezeichnung.'('.$phase->projekt_kurzbz.'),';
|
||||
$title .= $phase->bezeichnung.'('.$phase->projekt_kurzbz.')';
|
||||
$beistrich=true;
|
||||
}
|
||||
elseif($typ=='task' && $row->projekttask_id!='')
|
||||
{
|
||||
$anzahl++;
|
||||
$showrow=true;
|
||||
$task = new projekttask();
|
||||
$task->load($row->projekttask_id);
|
||||
$title.=$task->bezeichnung;
|
||||
$beistrich=true;
|
||||
}
|
||||
if($typ!='projekt' && $row->aufwand!='' && $row->aufwand!=0)
|
||||
{
|
||||
$title.='['.$row->aufwand.']';
|
||||
$beistrich=true;
|
||||
$aufwandssumme +=$row->aufwand;
|
||||
}
|
||||
if($beistrich)
|
||||
$title.=', ';
|
||||
}
|
||||
|
||||
}
|
||||
$title = mb_substr($title,0,-1);
|
||||
|
||||
$htmlrow.='<td title="'.$title.'" align="center">';
|
||||
if($anzahl>=$anzahl_warnung)
|
||||
$htmlrow.='<span class="warning">'.$anzahl.'</span>';
|
||||
$htmlrow.='<span class="warning">'.$anzahl.($typ!='projekt'?'/'.$aufwandssumme:'').'</span>';
|
||||
else
|
||||
$htmlrow.=$anzahl;
|
||||
$htmlrow.='</td>';
|
||||
$htmlrow.= $anzahl.($typ!='projekt'?'/'.$aufwandssumme:'');
|
||||
$htmlrow.= '</td>';
|
||||
}
|
||||
$htmlrow.='</tr>';
|
||||
if ($showrow)
|
||||
echo $htmlrow;
|
||||
ob_flush();
|
||||
}
|
||||
|
||||
echo '
|
||||
|
||||
Reference in New Issue
Block a user