diff --git a/content/notiz.window.js.php b/content/notiz.window.js.php
index 502a4b32d..8701721b6 100755
--- a/content/notiz.window.js.php
+++ b/content/notiz.window.js.php
@@ -58,8 +58,10 @@ function NotizInit(id)
text='';
start='';
ende='';
+ id='';
}
+ document.getElementById('notiz-textbox-notiz_id').value=id;
document.getElementById('notiz-textbox-titel').value=titel;
document.getElementById('notiz-textbox-text').value=text;
document.getElementById('notiz-box-start').value=start;
@@ -71,5 +73,52 @@ function NotizInit(id)
// ****
function NotizSpeichern()
{
- alert('Noch nicht implementiert');
+ //Werte holen
+ //projekttask_id = document.getElementById('textbox-projekttaskdetail-projekttask_id').value;
+
+ var notiz_id = document.getElementById('notiz-textbox-notiz_id').value;
+ var titel = document.getElementById('notiz-textbox-titel').value;
+ var text = document.getElementById('notiz-textbox-text').value;
+ var start = document.getElementById('notiz-box-start').iso;
+ var ende = document.getElementById('notiz-box-ende').iso;
+ var verfasser_uid = getUsername();
+ var bearbeiter_uid = getUsername();
+
+ var soapBody = new SOAPObject("saveNotiz");
+ soapBody.appendChild(new SOAPObject("notiz_id")).val(notiz_id);
+ soapBody.appendChild(new SOAPObject("titel")).val(titel);
+ soapBody.appendChild(new SOAPObject("text")).val(text);
+ soapBody.appendChild(new SOAPObject("verfasser_uid")).val(verfasser_uid);
+ soapBody.appendChild(new SOAPObject("bearbeiter_uid")).val(bearbeiter_uid);
+ soapBody.appendChild(new SOAPObject("start")).val(start);
+ soapBody.appendChild(new SOAPObject("ende")).val(ende);
+
+ soapBody.appendChild(new SOAPObject("projekt_kurzbz")).val(projekt_kurzbz);
+ soapBody.appendChild(new SOAPObject("projektphase_id")).val(projektphase_id);
+ soapBody.appendChild(new SOAPObject("projekttask_id")).val(projekttask_id);
+ soapBody.appendChild(new SOAPObject("uid")).val(uid);
+ soapBody.appendChild(new SOAPObject("person_id")).val(person_id);
+ soapBody.appendChild(new SOAPObject("prestudent_id")).val(prestudent_id);
+ soapBody.appendChild(new SOAPObject("bestellung_id")).val(bestellung_id);
+
+ var sr = new SOAPRequest("saveNotiz",soapBody);
+
+ SOAPClient.Proxy="soap/notiz.soap.php?"+gettimestamp();
+ SOAPClient.SendRequest(sr, clb_saveNotiz);
+}
+
+function clb_saveNotiz(respObj)
+{
+ try
+ {
+ var id = respObj.Body[0].saveNotizResponse[0].message[0].Text;
+ window.opener.document.getElementById(opener_id).RefreshNotiz();
+ window.close();
+ }
+ catch(e)
+ {
+ var fehler = respObj.Body[0].Fault[0].faultstring[0].Text;
+ alert('Fehler: '+fehler);
+ return;
+ }
}
\ No newline at end of file
diff --git a/content/notiz.window.xul.php b/content/notiz.window.xul.php
index 009563f80..a7af878f1 100755
--- a/content/notiz.window.xul.php
+++ b/content/notiz.window.xul.php
@@ -47,7 +47,20 @@ else
+
+
+
+
diff --git a/content/notiz.xml.php b/content/notiz.xml.php
index a6ca5a6ed..5d8ab4997 100755
--- a/content/notiz.xml.php
+++ b/content/notiz.xml.php
@@ -69,11 +69,11 @@ echo '';
+ sort="rdf:http://www.technikum-wien.at/notiz/rdf#startISO" />
+ sort="rdf:http://www.technikum-wien.at/notiz/rdf#endeISO" />
';
class="sortDirectionIndicator"
sort="rdf:http://www.technikum-wien.at/notiz/rdf#notiz_id" />
+
+
+
@@ -98,6 +105,8 @@ echo '';
+
+
@@ -165,6 +174,14 @@ echo '';
try
{
+ this.setAttribute('projekt_kurzbz',projekt_kurzbz);
+ this.setAttribute('projektphase_id',projektphase_id);
+ this.setAttribute('projekttask_id',projekttask_id);
+ this.setAttribute('uid',uid);
+ this.setAttribute('person_id',person_id);
+ this.setAttribute('prestudent_id',prestudent_id);
+ this.setAttribute('bestellung_id',bestellung_id);
+
var datasource="rdf/notiz.rdf.php?ts="+gettimestamp();
datasource = datasource+"&projekt_kurzbz="+encodeURIComponent(projekt_kurzbz);
datasource = datasource+"&projektphase_id="+encodeURIComponent(projektphase_id);
@@ -235,10 +252,31 @@ echo '';
content/notiz.window.xul.php'+param,'Notiz','chrome, status=no, width=500, height=350, centerscreen, resizable');
]]>
@@ -253,7 +291,11 @@ echo '';
var prestudent_id = this.getAttribute('prestudent_id');
var bestellung_id = this.getAttribute('bestellung_id');
- this.LoadNotizTree(projekt_kurzbz,projektphase_id,projekttask_id,uid,person_id,prestudent_id,bestellung_id, true);
+ if(projekt_kurzbz!='' || projektphase_id!='' || projekttask_id!=''
+ || uid!='' || person_id!='' || prestudent_id!='' || bestellung_id!='')
+ {
+ this.LoadNotizTree(projekt_kurzbz,projektphase_id,projekttask_id,uid,person_id,prestudent_id,bestellung_id, true);
+ }
//debug('Notiz Binding Stop');
diff --git a/include/notiz.class.php b/include/notiz.class.php
index a469a9430..d336a198c 100644
--- a/include/notiz.class.php
+++ b/include/notiz.class.php
@@ -149,7 +149,7 @@ class notiz extends basis_db
'ende='.$this->addslashes($this->ende).', '.
'erledigt='.($this->erledigt?'true':'false').', '.
'updateamum='.$this->addslashes($this->updateamum).', '.
- 'updatevon='.$this->addslashes($this->updatevon).', '.
+ 'updatevon='.$this->addslashes($this->updatevon).' '.
'WHERE notiz_id='.$this->addslashes($this->notiz_id).';';
}
@@ -184,11 +184,39 @@ class notiz extends basis_db
}
else
{
- $this->errormsg = "Fehler beim Speichern des Datensatzes";
+ $this->errormsg = "Fehler beim Speichern des Datensatzes".$qry;
return false;
}
}
-
+
+ /**
+ * Speichert die Zuordnung einer Notiz
+ *
+ */
+ public function saveZuordnung()
+ {
+ $qry = "INSERT INTO public.tbl_notizzuordnung(notiz_id, projekt_kurzbz, projektphase_id, projekttask_id,
+ uid, person_id, prestudent_id, bestellung_id) VALUES(".
+ $this->addslashes($this->notiz_id).','.
+ $this->addslashes($this->projekt_kurzbz).','.
+ $this->addslashes($this->projektphase_id).','.
+ $this->addslashes($this->projekttask_id).','.
+ $this->addslashes($this->uid).','.
+ $this->addslashes($this->person_id).','.
+ $this->addslashes($this->prestudent_id).','.
+ $this->addslashes($this->bestellung_id).');';
+
+ if($this->db_query($qry))
+ {
+ return true;
+ }
+ else
+ {
+ $this->errormsg = 'Fehler beim Speichern der Daten'.$qry;
+ return false;
+ }
+
+ }
/**
*
diff --git a/rdf/notiz.rdf.php b/rdf/notiz.rdf.php
index 81e16c1c8..56bb3edf1 100644
--- a/rdf/notiz.rdf.php
+++ b/rdf/notiz.rdf.php
@@ -29,6 +29,7 @@ echo '';
// DAO
require_once('../config/vilesci.config.inc.php');
require_once('../include/notiz.class.php');
+require_once('../include/datum.class.php');
$rdf_url='http://www.technikum-wien.at/notiz';
@@ -50,6 +51,7 @@ $uid=(isset($_GET['uid'])?$_GET['uid']:null);
$person_id=(isset($_GET['person_id'])?$_GET['person_id']:null);
$prestudent_id=(isset($_GET['prestudent_id'])?$_GET['prestudent_id']:null);
$bestellung_id=(isset($_GET['bestellung_id'])?$_GET['bestellung_id']:null);
+$datum_obj = new datum();
if(!$notiz->getNotiz($erledigt, $projekt_kurzbz, $projektphase_id, $projekttask_id, $uid, $person_id, $prestudent_id, $bestellung_id))
die($notiz->errormsg);
@@ -64,8 +66,10 @@ foreach($notiz->result as $row)
text.']]>
verfasser_uid.']]>
bearbeiter_uid.']]>
- start.']]>
- ende.']]>
+ formatDatum($row->start,'d.m.Y').']]>
+ formatDatum($row->ende,'d.m.Y').']]>
+ start.']]>
+ ende.']]>
erledigt?'Ja':'Nein').']]>
insertamum.']]>
insertvon.']]>
diff --git a/skin/planner.css b/skin/planner.css
new file mode 100755
index 000000000..8c1189936
--- /dev/null
+++ b/skin/planner.css
@@ -0,0 +1,79 @@
+@import url("chrome://global/skin/");
+
+label.kalenderwoche
+{
+ font-size: medium;
+}
+button
+{
+ font-size: x-small;
+ min-width: 10px;
+}
+menubar,menupopup,toolbar,tabpanels,tabbox,iframe,box,hbox,vbox,tree,label,description
+{
+ border: 0px;
+ border-top: 0px;
+ border-bottom: 0px;
+ border-left: 0px;
+ border-right: 0px;
+ border-top-width: 0px;
+ border-bottom-width: 0px;
+ border-left-width: 0px;
+ border-right-width: 0px;
+ padding-top: 0px;
+ padding-bottom: 0px;
+ padding-left: 0px;
+ padding-right: 0px;
+}
+menupopup
+{
+ border: 1px solid black;
+}
+grid.lvaStundenplan
+{
+ font-size: x-small;
+}
+grid.lvaStundenplan button
+{
+ font-size: x-small;
+ border: 0px;
+ border-top: 0px;
+ border-bottom: 0px;
+ border-left: 0px;
+ border-right: 0px;
+ border-top-width: 0px;
+ border-bottom-width: 0px;
+ border-left-width: 0px;
+ border-right-width: 0px;
+ padding-top: 0px;
+ padding-bottom: 0px;
+ padding-left: 0px;
+ padding-right: 0px;
+}
+
+
+tree treecol {
+ background-color: #FFFFCC;
+ border: 1px solid black;
+}
+
+tree {
+ font-size:9pt;
+ font-family:Arial;
+}
+
+box.studentDetail {
+ -moz-binding: url('lehrveranstaltungbinding.xml.php#studentDetail');
+}
+
+label,textbox {
+ font-size:9pt;
+ font-family:Arial;
+}
+
+treechildren::-moz-tree-row(selected) { background-color: #FFFFAA; }
+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
diff --git a/soap/notiz.soap.php b/soap/notiz.soap.php
new file mode 100755
index 000000000..ba4528ec6
--- /dev/null
+++ b/soap/notiz.soap.php
@@ -0,0 +1,137 @@
+,
+ * Andreas Oesterreicher and
+ * Karl Burkhart .
+ */
+header("Cache-Control: no-cache");
+header("Cache-Control: post-check=0, pre-check=0",false);
+header("Expires Mon, 26 Jul 1997 05:00:00 GMT");
+header("Pragma: no-cache");
+
+require_once('../config/vilesci.config.inc.php');
+require_once('../include/notiz.class.php');
+require_once('../include/datum.class.php');
+require_once('../include/functions.inc.php');
+require_once('../include/benutzerberechtigung.class.php');
+
+$SOAPServer = new SoapServer(APP_ROOT."/soap/notiz.wsdl.php?".microtime());
+$SOAPServer->addFunction("saveNotiz");
+$SOAPServer->addFunction("deleteNotiz");
+$SOAPServer->handle();
+
+// WSDL Chache auf aus
+ini_set("soap.wsdl_cache_enabled", "0");
+
+/**
+ *
+ * Speichert die vom Webservice übergebenen Parameter in die DB
+ * @param string $notiz_id
+ * @param string $titel
+ * @param string $text
+ * @param string $verfasser_uid
+ * @param string $bearbeiter_uid
+ * @param string $start
+ * @param string $ende
+ * @param string $projekt_kurzbz
+ * @param string $projektphase_id
+ * @param string $projekttask_id
+ * @param string $uid
+ * @param string $person_id
+ * @param string $prestudent_id
+ * @param string $bestellung_id
+ */
+function saveNotiz($notiz_id, $titel, $text, $verfasser_uid, $bearbeiter_uid, $start, $ende, $projekt_kurzbz, $projektphase_id, $projekttask_id, $uid, $person_id, $prestudent_id, $bestellung_id)
+{
+ $user = get_uid();
+
+ $rechte = new benutzerberechtigung();
+ $rechte->getBerechtigungen($user);
+
+ if(!$rechte->isBerechtigt('basis/notiz', null, 'sui'))
+ return new SoapFault("Server", "Sie haben keine Berechtigung zum Speichern von Notizen");
+
+ $notiz = new notiz();
+ if($notiz_id != '')
+ {
+ if($notiz->load($notiz_id))
+ {
+ $notiz->new = false;
+ }
+ else
+ return new SoapFault("Server", "Fehler beim Laden");
+ }
+ else
+ {
+ $notiz->new=true;
+ $notiz->insertvon = $user;
+ $notiz->insertamum = date('Y-m-d H:i:s');
+ }
+
+ $notiz->titel=$titel;
+ $notiz->text=$text;
+ $notiz->verfasser_uid = $verfasser_uid;
+ $notiz->bearbeiter_uid = $bearbeiter_uid;
+ $notiz->start = $start;
+ $notiz->ende = $ende;
+
+ if($notiz->save())
+ {
+ if($notiz->new)
+ {
+ $notiz->projekt_kurzbz = $projekt_kurzbz;
+ $notiz->projektphase_id = $projektphase_id;
+ $notiz->projekttask_id = $projekttask_id;
+ $notiz->uid = $uid;
+ $notiz->person_id = $person_id;
+ $notiz->prestudent_id = $prestudent_id;
+ $notiz->bestellung_id = $bestellung_id;
+
+ if(!$notiz->saveZuordnung())
+ return new SoapFault("Server", $notiz->errormsg);
+ }
+ return $notiz->notiz_id;
+ }
+ else
+ return new SoapFault("Server", $notiz->errormsg);
+}
+
+/**
+ *
+ * Löscht die Notiz mit der vom Webservice übergebenen ID
+ * @param $notiz_id
+ */
+function deleteNotiz($notiz_id)
+{
+ $user = get_uid();
+
+ $rechte = new benutzerberechtigung();
+ $rechte->getBerechtigungen($user);
+
+ if(!$rechte->isBerechtigt('basis/notiz', null, 'suid'))
+ return new SoapFault("Server", "Sie haben keine Berechtigung zum Speichern von Notizen");
+
+ $notiz = new notiz();
+ if($notiz->delete($notiz_id))
+ return "OK";
+ else
+ return new SoapFault("Server", $projekttask->errormsg);
+}
+?>
+
+
diff --git a/soap/notiz.wsdl.php b/soap/notiz.wsdl.php
new file mode 100755
index 000000000..387d12cb7
--- /dev/null
+++ b/soap/notiz.wsdl.php
@@ -0,0 +1,81 @@
+";
+?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ " />
+
+
+
+
+
+
+
+
+ " />
+
+
+
+
+
+
+
+
+
+
+
+ "/>
+
+
+