mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 00:12:15 +00:00
Notizen für Projekte und Projektphasen hinzugefügt
This commit is contained in:
@@ -46,15 +46,24 @@ function NotizInit(id)
|
||||
//RDF parsen
|
||||
|
||||
titel = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#titel" ));
|
||||
text = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#text" ));
|
||||
start = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#start" ));
|
||||
ende = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#ende" ));
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
//Defaultwerte bei Neuem Datensatz
|
||||
titel='';
|
||||
text='';
|
||||
start='';
|
||||
ende='';
|
||||
}
|
||||
|
||||
document.getElementById('notiz-textbox-titel').value=titel;
|
||||
document.getElementById('notiz-textbox-text').value=text;
|
||||
document.getElementById('notiz-box-start').value=start;
|
||||
document.getElementById('notiz-box-ende').value=ende;
|
||||
}
|
||||
|
||||
// ****
|
||||
|
||||
@@ -31,7 +31,8 @@ echo '<?xml version="1.0" encoding="UTF-8"?>'."\n";
|
||||
|
||||
echo '<?xml-stylesheet href="'.APP_ROOT.'skin/tempus.css" type="text/css"?>';
|
||||
echo '<?xml-stylesheet href="'.APP_ROOT.'content/bindings.css" type="text/css"?>';
|
||||
|
||||
echo '<?xml-stylesheet href="'.APP_ROOT.'content/datepicker/datepicker.css" type="text/css"?>';
|
||||
|
||||
if(isset($_GET['id']) && is_numeric($_GET['id']))
|
||||
$id=$_GET['id'];
|
||||
else
|
||||
@@ -63,6 +64,18 @@ else
|
||||
<label value="Titel" control="notiz-textbox-titel"/>
|
||||
<textbox id="notiz-textbox-titel" maxlength="256"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="Text" control="notiz-textbox-text"/>
|
||||
<textbox id="notiz-textbox-text" multiline="true"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="Start" control="notiz-box-start"/>
|
||||
<box class="Datum" id="notiz-box-start"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="Ende" control="notiz-box-ende"/>
|
||||
<box class="Datum" id="notiz-box-ende"/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
<hbox>
|
||||
|
||||
+43
-43
@@ -47,7 +47,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
</xul:toolbar>
|
||||
</xul:toolbox>
|
||||
<xul:tree anonid="tree-notiz"
|
||||
seltype="single" hidecolumnpicker="false" flex="1" style="height: 150px"
|
||||
seltype="single" hidecolumnpicker="false" flex="1"
|
||||
datasources="rdf:null" ref="http://www.technikum-wien.at/notiz/liste"
|
||||
>
|
||||
<xul:treecols>
|
||||
@@ -104,8 +104,10 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
</xul:rule>
|
||||
</xul:template>
|
||||
</xul:tree>
|
||||
<!--
|
||||
<xul:button onclick="alert('value:'+document.getBindingParent(this).value);" label="GetValue" />
|
||||
<xul:button onclick="alert('projekt_kurzbz:'+this.getAttribute('projekt_kurzbz'));" label="GetProjektKurzbz" />
|
||||
-->
|
||||
</xul:vbox>
|
||||
</content>
|
||||
<implementation>
|
||||
@@ -133,7 +135,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
<method name="NeueNotiz">
|
||||
<body>
|
||||
<![CDATA[
|
||||
debug('Neue Notiz');
|
||||
//debug('Neue Notiz');
|
||||
this.openNotiz();
|
||||
]]>
|
||||
</body>
|
||||
@@ -141,7 +143,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
<method name="RefreshNotiz">
|
||||
<body>
|
||||
<![CDATA[
|
||||
debug('Refresh Notiz');
|
||||
//debug('Refresh Notiz');
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
this.TreeNotizDatasource.Refresh(false); //non blocking
|
||||
]]>
|
||||
@@ -158,7 +160,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
<parameter name="addobserver"/>
|
||||
<body>
|
||||
<![CDATA[
|
||||
debug('LoadNotizTree');
|
||||
//debug('LoadNotizTree');
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
|
||||
try
|
||||
@@ -171,7 +173,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
datasource = datasource+"&person_id="+encodeURIComponent(person_id);
|
||||
datasource = datasource+"&prestudent_id="+encodeURIComponent(prestudent_id);
|
||||
datasource = datasource+"&bestellung_id="+encodeURIComponent(bestellung_id);
|
||||
|
||||
//debug('Source:'+datasource);
|
||||
var tree = document.getAnonymousElementByAttribute(this ,'anonid', 'tree-notiz');
|
||||
|
||||
//Alte DS entfernen
|
||||
@@ -186,43 +188,41 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
this.TreeNotizDatasource.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource);
|
||||
this.TreeNotizDatasource.QueryInterface(Components.interfaces.nsIRDFXMLSink);
|
||||
tree.database.AddDataSource(this.TreeNotizDatasource);
|
||||
if(addobserver)
|
||||
{
|
||||
this.TreeNotizDatasource.addXMLSinkObserver({
|
||||
notiz: this,
|
||||
onBeginLoad: function(aSink)
|
||||
{},
|
||||
|
||||
onInterrupt: function(aSink)
|
||||
{},
|
||||
|
||||
onResume: function(aSink)
|
||||
{},
|
||||
|
||||
onEndLoad: function(aSink)
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
|
||||
//aSink.removeXMLSinkObserver(this);
|
||||
debug('onEndLoad start Rebuild');
|
||||
var tree = document.getAnonymousElementByAttribute(this.notiz ,'anonid', 'tree-notiz');
|
||||
tree.builder.rebuild();
|
||||
},
|
||||
|
||||
onError: function(aSink, aStatus, aErrorMsg)
|
||||
{ alert("error! " + aErrorMsg); }
|
||||
});
|
||||
tree.builder.addListener({
|
||||
willRebuild : function(builder)
|
||||
{
|
||||
},
|
||||
didRebuild : function(builder)
|
||||
{
|
||||
debug("didrebuild");
|
||||
//builder.removeListener(this);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
this.TreeNotizDatasource.addXMLSinkObserver({
|
||||
notiz: this,
|
||||
onBeginLoad: function(aSink)
|
||||
{},
|
||||
|
||||
onInterrupt: function(aSink)
|
||||
{},
|
||||
|
||||
onResume: function(aSink)
|
||||
{},
|
||||
|
||||
onEndLoad: function(aSink)
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
|
||||
//aSink.removeXMLSinkObserver(this);
|
||||
//debug('onEndLoad start Rebuild');
|
||||
var tree = document.getAnonymousElementByAttribute(this.notiz ,'anonid', 'tree-notiz');
|
||||
tree.builder.rebuild();
|
||||
},
|
||||
|
||||
onError: function(aSink, aStatus, aErrorMsg)
|
||||
{ alert("error! " + aErrorMsg); }
|
||||
});
|
||||
tree.builder.addListener({
|
||||
willRebuild : function(builder)
|
||||
{
|
||||
},
|
||||
didRebuild : function(builder)
|
||||
{
|
||||
//debug("didrebuild");
|
||||
//builder.removeListener(this);
|
||||
}
|
||||
});
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
@@ -256,7 +256,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
this.LoadNotizTree(projekt_kurzbz,projektphase_id,projekttask_id,uid,person_id,prestudent_id,bestellung_id, true);
|
||||
</constructor>
|
||||
<destructor>
|
||||
debug('Notiz Binding Stop');
|
||||
//debug('Notiz Binding Stop');
|
||||
</destructor>
|
||||
</implementation>
|
||||
<handlers>
|
||||
|
||||
@@ -216,8 +216,20 @@ function treeProjektmenueSelect()
|
||||
}
|
||||
else
|
||||
document.getElementById('toolbarbutton-projektdokument-neu').disabled=true;
|
||||
|
||||
|
||||
|
||||
//Notizen Laden
|
||||
if(projekt_phase_id!='')
|
||||
{
|
||||
//Notizen zu einer Phase Laden
|
||||
notiz = document.getElementById('box-notizen');
|
||||
notiz.LoadNotizTree('',projekt_phase_id,'','','','','', '');
|
||||
}
|
||||
else if(projekt_kurzbz!='')
|
||||
{
|
||||
//Notizen zu einem Projekt Laden
|
||||
notiz = document.getElementById('box-notizen');
|
||||
notiz.LoadNotizTree(projekt_kurzbz,'','','','','','', '');
|
||||
}
|
||||
if(projekt_kurzbz!='')
|
||||
{
|
||||
//Neu Button bei Tasks aktivieren
|
||||
|
||||
@@ -127,7 +127,7 @@ echo '<?xul-overlay href="'.APP_ROOT.'content/projekt/gantt.overlay.xul.php"?>';
|
||||
</vbox>
|
||||
|
||||
<vbox id="box-notiz">
|
||||
<box class="Notiz" projekt_kurzbz="Abgabetool"/>
|
||||
<box class="Notiz" projekt_kurzbz="Abgabetool" flex="1" id="box-notizen"/>
|
||||
</vbox>
|
||||
|
||||
<vbox id="box-ressourcemenue">
|
||||
|
||||
@@ -102,7 +102,7 @@ function onselectProjekt()
|
||||
{
|
||||
//Ausgewaehltes Projekt holen
|
||||
var projekt_kurzbz = getTreeCellText(tree, "treecol-projekt-projekt_kurzbz", tree.currentIndex);
|
||||
|
||||
|
||||
if(projekt_kurzbz!='')
|
||||
{
|
||||
//Projekt wurde markiert
|
||||
@@ -119,7 +119,6 @@ function onselectProjekt()
|
||||
alert(e);
|
||||
return false;
|
||||
}
|
||||
|
||||
var req = new phpRequest('<?php echo APP_ROOT; ?>rdf/projekt.rdf.php','','');
|
||||
req.add('projekt_kurzbz',projekt_kurzbz);
|
||||
var response = req.execute();
|
||||
@@ -155,6 +154,10 @@ function onselectProjekt()
|
||||
document.getElementById('textbox-projekt-detail-beginn').value=beginn;
|
||||
document.getElementById('textbox-projekt-detail-ende').value=ende;
|
||||
document.getElementById('checkbox-projekt-detail-neu').checked=false;
|
||||
|
||||
//Notizen zu einem Projekt Laden
|
||||
notiz = document.getElementById('box-projekt-notizen');
|
||||
notiz.LoadNotizTree(projekt_kurzbz,'','','','','','', '');
|
||||
}
|
||||
// ****
|
||||
// * Speichert die Details
|
||||
|
||||
@@ -107,9 +107,9 @@ echo '<?xul-overlay href="'.APP_ROOT.'content/projekt/projektdetail.overlay.xul.
|
||||
<treechildren>
|
||||
<treeitem uri="rdf:*">
|
||||
<treerow dbID="rdf:http://www.technikum-wien.at/projekt/rdf#projekt_kurzbz" >
|
||||
<treecell label="rdf:http://www.technikum-wien.at/projekt/rdf#titel"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/projekt/rdf#projekt_kurzbz"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/projekt/rdf#nummer"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/projekt/rdf#titel"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/projekt/rdf#oe_kurzbz"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/projekt/rdf#beschreibung"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/projekt/rdf#beginn"/>
|
||||
@@ -134,10 +134,12 @@ echo '<?xul-overlay href="'.APP_ROOT.'content/projekt/projektdetail.overlay.xul.
|
||||
<tabs id="tabs-projekt-main" orient="horizontal">
|
||||
<tab id="tab-projekt-detail" label="Details" />
|
||||
<tab id="tab-projekt-ressource" label="Ressource" />
|
||||
<tab id="tab-projekt-notizen" label="Notizen" />
|
||||
</tabs>
|
||||
<tabpanels id="tabpanels-projekt-main" flex="1">
|
||||
<vbox id="box-projekt-detail" />
|
||||
<vbox id="box-projekt-ressource" />
|
||||
<box class="Notiz" id="box-projekt-notizen"/>
|
||||
</tabpanels>
|
||||
</tabbox>
|
||||
</vbox>
|
||||
|
||||
@@ -133,6 +133,10 @@ function onselectTreeProjektphase()
|
||||
document.getElementById('textbox-projektphase-detail-budget').value=budget;
|
||||
document.getElementById('textbox-projektphase-detail-personentage').value=personentage;
|
||||
document.getElementById('checkbox-projektphase-detail-neu').checked=false;
|
||||
|
||||
//Notizen zu einer Phase Laden
|
||||
notiz = document.getElementById('box-projektphase-notizen');
|
||||
notiz.LoadNotizTree('',projektphase_id,'','','','','', '');
|
||||
}
|
||||
// ****
|
||||
// * Asynchroner (Nicht blockierender) Refresh des Trees
|
||||
|
||||
@@ -134,10 +134,12 @@ echo '<?xul-overlay href="'.APP_ROOT.'content/projekt/projektphasedetail.overlay
|
||||
<tabs orient="horizontal" id="projektphase-tabs">
|
||||
<tab id="projektphase-tab-detail" label="Details" />
|
||||
<tab id="projektphase-tab-ressource" label="Ressourcen" />
|
||||
<tab id="projektphase-tab-notizen" label="Notizen" />
|
||||
</tabs>
|
||||
<tabpanels id="projektphase-tabpanels-main" flex="1">
|
||||
<vbox id="projektphase-detail" />
|
||||
<vbox id="projektphase-ressource" />
|
||||
<box class="Notiz" id="box-projektphase-notizen"/>
|
||||
</tabpanels>
|
||||
</tabbox>
|
||||
</vbox>
|
||||
|
||||
Reference in New Issue
Block a user