diff --git a/content/notiz.window.js.php b/content/notiz.window.js.php index 3696d67ac..6166b8c99 100755 --- a/content/notiz.window.js.php +++ b/content/notiz.window.js.php @@ -52,7 +52,7 @@ function NotizInit(id) verfasser = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#verfasser_uid" )); bearbeiter = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#bearbeiter_uid" )); erledigt = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#erledigt" )); - if(erledigt=='Ja') + if(erledigt=='true') erledigt=true; else erledigt=false; diff --git a/content/notiz.xml.php b/content/notiz.xml.php index a6aad47df..8cc3f3727 100755 --- a/content/notiz.xml.php +++ b/content/notiz.xml.php @@ -50,46 +50,49 @@ echo ''; seltype="single" hidecolumnpicker="false" flex="1" datasources="rdf:null" ref="http://www.technikum-wien.at/notiz/liste" ondblclick="document.getBindingParent(this).openNotiz(document.getBindingParent(this).value);" + onclick="document.getBindingParent(this).updateErledigt(event);" + editable="true" > + @@ -104,7 +107,7 @@ echo ''; - + @@ -159,6 +162,52 @@ echo ''; ]]> + + + + soap/notiz.soap.php?"+gettimestamp(); + + SOAPClient.SendRequest(sr,function (respObj) { + try + { + var id = respObj.Body[0].setErledigtResponse[0].message[0].Text; + } + catch(e) + { + var fehler = respObj.Body[0].Fault[0].faultstring[0].Text; + alert('Fehler: '+fehler); + return; + } + }); + } + ]]> + + @@ -234,15 +283,18 @@ echo ''; { alert("error! " + aErrorMsg); } }); tree.builder.addListener({ + notiz: this, willRebuild : function(builder) { }, didRebuild : function(builder) { - //debug("didrebuild"); - //builder.removeListener(this); + //Workaround damit das Resize des Trees funktioniert + var tree = document.getAnonymousElementByAttribute(this.notiz ,'anonid', 'tree-notiz'); + tree.columns.restoreNaturalOrder(); } }); + } catch(e) { @@ -299,7 +351,7 @@ echo ''; || uid!='' || person_id!='' || prestudent_id!='' || bestellung_id!='' || user!='') { this.LoadNotizTree(projekt_kurzbz,projektphase_id,projekttask_id,uid,person_id,prestudent_id,bestellung_id, user); - } + } //debug('Notiz Binding Stop'); diff --git a/content/projekt/ressource.xml.php b/content/projekt/ressource.xml.php index df8005c66..3c3fbc279 100644 --- a/content/projekt/ressource.xml.php +++ b/content/projekt/ressource.xml.php @@ -298,8 +298,12 @@ echo ''; }, didRebuild : function(builder) { + var tree = document.getAnonymousElementByAttribute(this.ressource ,'anonid', 'tree-ressource'); + + //Workaround damit das Resize des Trees funktioniert + tree.columns.restoreNaturalOrder(); + //Nach dem Laden alle Subtrees aufklappen - var tree = document.getAnonymousElementByAttribute(this.ressource ,'anonid', 'tree-ressource'); var treeView = tree.treeBoxObject.view; for (var i = 0; i < treeView.rowCount; i++) { diff --git a/rdf/notiz.rdf.php b/rdf/notiz.rdf.php index eb309fc66..34fb9d0ad 100644 --- a/rdf/notiz.rdf.php +++ b/rdf/notiz.rdf.php @@ -71,7 +71,7 @@ foreach($notiz->result as $row) formatDatum($row->ende,'d.m.Y').']]> start.']]> ende.']]> - erledigt?'Ja':'Nein').']]> + erledigt?'true':'false').']]> insertamum.']]> insertvon.']]> updateamum.']]> diff --git a/skin/planner.css b/skin/planner.css index 1bb2f020c..9b36f0bdd 100755 --- a/skin/planner.css +++ b/skin/planner.css @@ -1,5 +1,6 @@ @import url("chrome://global/skin/"); + button { font-size: x-small; @@ -46,4 +47,17 @@ treechildren::-moz-tree-row(odd) { background-color: #EEEEEE; } treechildren::-moz-tree-row(odd, selected) { background-color: #FFFFAA; } treechildren::-moz-tree-row(even, selected) { background-color: #FFFFAA; } treechildren::-moz-tree-cell-text(selected) { color: #000000; } -treechildren::-moz-tree-cell-text(odd, selected) { color: #000000; } \ No newline at end of file +treechildren::-moz-tree-cell-text(odd, selected) { color: #000000; } +treechildren::-moz-tree-checkbox +{ + /* unchecked checkbox treecells. This style MUST come before treechildren::-moz-tree-checkbox(checked) otherwise it won't take effect. */ + list-style-image: url("../skin/images/false_red.png"); +} + +treechildren::-moz-tree-checkbox(checked) +{ + /* css for checked cells. cbox-check.gif isn't available in Firefox 1, 2, and 3 on Mac OS X, so you should specify a URL to an image + in your extension or elsewhere. */ + /*list-style-image: url("chrome://global/skin/checkbox/cbox-check.gif");*/ + list-style-image: url("../skin/images/true_green.png"); +} \ No newline at end of file diff --git a/soap/notiz.soap.php b/soap/notiz.soap.php index c43792ddf..19214b8fd 100755 --- a/soap/notiz.soap.php +++ b/soap/notiz.soap.php @@ -33,6 +33,7 @@ require_once('../include/benutzerberechtigung.class.php'); $SOAPServer = new SoapServer(APP_ROOT."/soap/notiz.wsdl.php?".microtime()); $SOAPServer->addFunction("saveNotiz"); $SOAPServer->addFunction("deleteNotiz"); +$SOAPServer->addFunction("setErledigt"); $SOAPServer->handle(); // WSDL Chache auf aus @@ -134,6 +135,38 @@ function deleteNotiz($notiz_id) else return new SoapFault("Server", $projekttask->errormsg); } + +/** + * + * Setzt den erledigt Status + * @param $notiz_id + * @param $erledigt + */ +function setErledigt($notiz_id, $erledigt) +{ + $user = get_uid(); + + $rechte = new benutzerberechtigung(); + $rechte->getBerechtigungen($user); + + if(!$rechte->isBerechtigt('basis/notiz', null, 'su')) + return new SoapFault("Server", "Sie haben keine Berechtigung zum Speichern von Notizen"); + + $notiz = new notiz(); + if($notiz->load($notiz_id)) + { + $notiz->erledigt=$erledigt; + + if($notiz->save()) + { + return true; + } + else + return new SoapFault("Server", $notiz->errormsg); + } + else + return new SoapFault("Server", "Fehler beim Laden"); +} ?> diff --git a/soap/notiz.wsdl.php b/soap/notiz.wsdl.php index bd82277e7..e166612a7 100755 --- a/soap/notiz.wsdl.php +++ b/soap/notiz.wsdl.php @@ -40,6 +40,13 @@ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"> + + + + + + + @@ -50,6 +57,10 @@ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"> + + + + @@ -71,7 +82,16 @@ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"> - + + + " /> + + + + + + +