From 097eeb46a12ba2d1d33e9ae5660e7634c2363f72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96sterreicher?= Date: Tue, 3 Jun 2014 08:25:53 +0000 Subject: [PATCH] =?UTF-8?q?Planner=20=20=20=20-=20Aufwandstyp=20pro=20Proj?= =?UTF-8?q?ekt=20einstellbar=20=20=20=20-=20Aufwand=20kann=20bei=20Ressour?= =?UTF-8?q?cezuordnung=20eingetragen=20werden=20=20=20=20-=20Ressourcenaus?= =?UTF-8?q?lastung=20f=C3=BCr=20Tasks=20=20=20=20-=20Aufwandssumme=20wird?= =?UTF-8?q?=20in=20Ressourcenauslastung=20angezeigt=20=20=20=20-=20Fehler?= =?UTF-8?q?=20beim=20Speichern=20und=20in=20der=20Anzeige=20behoben=20wenn?= =?UTF-8?q?=20Sonderzeichen=20in=20den=20Beschreibungen=20verwendet=20wurd?= =?UTF-8?q?en?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- content/notiz.xml.php | 2 +- content/planner.overlay.js.php | 65 ++++++++++- content/planner.overlay.xul.php | 2 +- content/projekt/gantt.svg.php | 18 +-- content/projekt/projekt.overlay.js.php | 13 ++- content/projekt/projektdetail.overlay.xul.php | 18 +++ content/projekt/projektphase.overlay.js.php | 4 +- content/projekt/projekttask.overlay.js.php | 4 +- content/projekt/ressource.overlay.js.php | 66 +++++++++++ content/projekt/ressource.overlay.xul.php | 19 ++- content/projekt/ressource.xml.php | 98 +++++++++++++++- content/projekt/ressourcenauslastung.php | 54 +++++++-- include/projekt.class.php | 10 +- include/ressource.class.php | 109 +++++++++++++++--- rdf/aufwandstyp.rdf.php | 41 +++++++ rdf/projekt.rdf.php | 7 +- rdf/ressource.rdf.php | 2 + soap/projekt.soap.php | 2 + soap/projekt.wsdl.php | 1 + soap/ressource_projekt.soap.php | 1 + soap/ressource_projekt.wsdl.php | 1 + 21 files changed, 474 insertions(+), 63 deletions(-) create mode 100755 content/projekt/ressource.overlay.js.php create mode 100755 rdf/aufwandstyp.rdf.php diff --git a/content/notiz.xml.php b/content/notiz.xml.php index b5ed1bfaa..ec0a245b4 100755 --- a/content/notiz.xml.php +++ b/content/notiz.xml.php @@ -335,7 +335,7 @@ echo ''; 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); diff --git a/content/planner.overlay.js.php b/content/planner.overlay.js.php index 575e0ea73..e71db9680 100755 --- a/content/planner.overlay.js.php +++ b/content/planner.overlay.js.php @@ -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="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="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); } diff --git a/content/planner.overlay.xul.php b/content/planner.overlay.xul.php index a4f09e2a0..d4ca54f07 100755 --- a/content/planner.overlay.xul.php +++ b/content/planner.overlay.xul.php @@ -108,7 +108,7 @@ echo ' - + diff --git a/content/projekt/gantt.svg.php b/content/projekt/gantt.svg.php index 8d2da19e8..f66970267 100755 --- a/content/projekt/gantt.svg.php +++ b/content/projekt/gantt.svg.php @@ -171,7 +171,7 @@ function getOeGanttZeitraum($beginn, $ende) // zeichne balken echo ''; - echo''.$projekt->titel.''; + echo''.htmlspecialchars($projekt->titel).''; // Zeichne Phasen in Projektbalken $projektphasen = new projektphase(); @@ -365,7 +365,7 @@ function getOeGantt() // zeichne balken echo ''; - echo''.$projekt->titel.''; + echo''.htmlspecialchars($projekt->titel).''; // Zeichne Phasen in Projektbalken $projektphasen = new projektphase(); @@ -420,7 +420,7 @@ function getOeGantt() $i++; } - echo'Organisationseinheit: '.$projekt->oe_kurzbz.''; + echo'Organisationseinheit: '.htmlspecialchars($projekt->oe_kurzbz).''; echo ''; } @@ -574,9 +574,9 @@ function getOeGantt() } // zeichne balken - echo "test:".$test.$projekt->titel."jahr".$studienjahr; + //echo "test:".$test.$projekt->titel."jahr".$studienjahr; echo ''; - echo''.$projekt->titel.''; + echo''.htmlspecialchars($projekt->titel).''; // Zeichne Phasen in Projektbalken $projektphasen = new projektphase(); @@ -832,10 +832,10 @@ function getProjektGantt() $style = 'style ="stroke:pink;stroke-width:10;"'; // zeichne balken echo ''; - echo''.$phase->bezeichnung.''; + echo''.htmlspecialchars($phase->bezeichnung).''; $i++; } - echo'Projekt: '.$projekt->titel.''; + echo'Projekt: '.htmlspecialchars($projekt->titel).''; echo ''; } @@ -1000,11 +1000,11 @@ function getProjektGantt() $style = 'style ="stroke:pink;stroke-width:10;"'; echo ''; - echo''.$phase->bezeichnung.''; + echo''.htmlspecialchars($phase->bezeichnung).''; $i++; } - echo'Projekt: '.$projekt->titel.''; + echo'Projekt: '.htmlspecialchars($projekt->titel).''; // aktuelle KW markieren $timestamp_now = time(); diff --git a/content/projekt/projekt.overlay.js.php b/content/projekt/projekt.overlay.js.php index 150072124..cbf1edda1 100755 --- a/content/projekt/projekt.overlay.js.php +++ b/content/projekt/projekt.overlay.js.php @@ -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; } diff --git a/content/projekt/projektdetail.overlay.xul.php b/content/projekt/projektdetail.overlay.xul.php index 1e61eb214..a4621e867 100755 --- a/content/projekt/projektdetail.overlay.xul.php +++ b/content/projekt/projektdetail.overlay.xul.php @@ -122,6 +122,24 @@ echo ''; + + diff --git a/content/projekt/projektphase.overlay.js.php b/content/projekt/projektphase.overlay.js.php index ad027a6ca..65aa98d47 100755 --- a/content/projekt/projektphase.overlay.js.php +++ b/content/projekt/projektphase.overlay.js.php @@ -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); diff --git a/content/projekt/projekttask.overlay.js.php b/content/projekt/projekttask.overlay.js.php index e299660e5..3817aefcf 100755 --- a/content/projekt/projekttask.overlay.js.php +++ b/content/projekt/projekttask.overlay.js.php @@ -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); diff --git a/content/projekt/ressource.overlay.js.php b/content/projekt/ressource.overlay.js.php new file mode 100755 index 000000000..40b7d4d99 --- /dev/null +++ b/content/projekt/ressource.overlay.js.php @@ -0,0 +1,66 @@ + + + +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 = '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 = '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 = '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 = 'content/projekt/ressourcenauslastung.php?typ=phase&projekt_kurzbz='+projekt_kurzbz+'&'+gettimestamp(); + var foo = window.open(path); + foo.print(); +} \ No newline at end of file diff --git a/content/projekt/ressource.overlay.xul.php b/content/projekt/ressource.overlay.xul.php index 5b6826f8f..ef88842fc 100755 --- a/content/projekt/ressource.overlay.xul.php +++ b/content/projekt/ressource.overlay.xul.php @@ -43,7 +43,7 @@ echo ''; >