mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 12:19:28 +00:00
This commit is contained in:
@@ -1,183 +0,0 @@
|
|||||||
<?php
|
|
||||||
/* Copyright (C) 2011 FH Technikum-Wien
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as
|
|
||||||
* published by the Free Software Foundation; either version 2 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*
|
|
||||||
* Authors: Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at>
|
|
||||||
*/
|
|
||||||
|
|
||||||
require_once('../config/vilesci.config.inc.php');
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
// ****
|
|
||||||
// * Laedt die zu bearbeitenden Daten
|
|
||||||
// ****
|
|
||||||
function NotizInit(id)
|
|
||||||
{
|
|
||||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
|
||||||
|
|
||||||
if(id!='')
|
|
||||||
{
|
|
||||||
//Daten holen
|
|
||||||
var url = '<?php echo APP_ROOT ?>rdf/notiz.rdf.php?notiz_id='+id+'&'+gettimestamp();
|
|
||||||
|
|
||||||
var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].
|
|
||||||
getService(Components.interfaces.nsIRDFService);
|
|
||||||
|
|
||||||
var dsource = rdfService.GetDataSourceBlocking(url);
|
|
||||||
|
|
||||||
var subject = rdfService.GetResource("http://www.technikum-wien.at/notiz/" + id);
|
|
||||||
|
|
||||||
var predicateNS = "http://www.technikum-wien.at/notiz/rdf";
|
|
||||||
|
|
||||||
//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" ));
|
|
||||||
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=='true')
|
|
||||||
erledigt=true;
|
|
||||||
else
|
|
||||||
erledigt=false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//Defaultwerte bei Neuem Datensatz
|
|
||||||
titel='';
|
|
||||||
text='';
|
|
||||||
start='';
|
|
||||||
ende='';
|
|
||||||
id='';
|
|
||||||
verfasser=getUsername();
|
|
||||||
bearbeiter='';
|
|
||||||
erledigt=false;
|
|
||||||
}
|
|
||||||
|
|
||||||
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;
|
|
||||||
document.getElementById('notiz-box-ende').value=ende;
|
|
||||||
document.getElementById('notiz-textbox-verfasser').value=verfasser;
|
|
||||||
document.getElementById('notiz-checkbox-erledigt').checked=erledigt;
|
|
||||||
if(bearbeiter!='')
|
|
||||||
{
|
|
||||||
menulist = document.getElementById('notiz-menulist-bearbeiter');
|
|
||||||
NotizMenulistMitarbeiterLoad(menulist, bearbeiter);
|
|
||||||
MenulistSelectItemOnValue('notiz-menulist-bearbeiter', bearbeiter);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// ****
|
|
||||||
// * Speichern der Daten
|
|
||||||
// ****
|
|
||||||
function NotizSpeichern()
|
|
||||||
{
|
|
||||||
//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 = document.getElementById('notiz-textbox-verfasser').value;
|
|
||||||
var bearbeiter_uid = MenulistGetSelectedValue('notiz-menulist-bearbeiter');
|
|
||||||
var erledigt = document.getElementById('notiz-checkbox-erledigt').checked;
|
|
||||||
|
|
||||||
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("erledigt")).val(erledigt);
|
|
||||||
|
|
||||||
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="<?php echo APP_ROOT;?>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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ****
|
|
||||||
// * Laedt dynamisch die Personen fuer das DropDown Menue
|
|
||||||
// * Es muessen mindestens 3 Zeichen in das DropDown Menue eingegeben werden
|
|
||||||
// ****
|
|
||||||
function NotizMenulistMitarbeiterLoad(menulist, filter)
|
|
||||||
{
|
|
||||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
|
||||||
|
|
||||||
if(typeof(filter)=='undefined')
|
|
||||||
v = menulist.value;
|
|
||||||
else
|
|
||||||
v = filter;
|
|
||||||
|
|
||||||
if(v.length>2)
|
|
||||||
{
|
|
||||||
var url = '<?php echo APP_ROOT; ?>rdf/mitarbeiter.rdf.php?filter='+encodeURIComponent(v)+'&'+gettimestamp();
|
|
||||||
//nurmittitel=&
|
|
||||||
var oldDatasources = menulist.database.GetDataSources();
|
|
||||||
while(oldDatasources.hasMoreElements())
|
|
||||||
{
|
|
||||||
menulist.database.RemoveDataSource(oldDatasources.getNext());
|
|
||||||
}
|
|
||||||
//Refresh damit die entfernten DS auch wirklich entfernt werden
|
|
||||||
menulist.builder.rebuild();
|
|
||||||
|
|
||||||
var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);
|
|
||||||
if(typeof(filter)=='undefined')
|
|
||||||
var datasource = rdfService.GetDataSource(url);
|
|
||||||
else
|
|
||||||
var datasource = rdfService.GetDataSourceBlocking(url);
|
|
||||||
datasource.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource);
|
|
||||||
datasource.QueryInterface(Components.interfaces.nsIRDFXMLSink);
|
|
||||||
menulist.database.AddDataSource(datasource);
|
|
||||||
if(typeof(filter)!='undefined')
|
|
||||||
menulist.builder.rebuild();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,126 +0,0 @@
|
|||||||
<?php
|
|
||||||
/* Copyright (C) 2006 Technikum-Wien
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as
|
|
||||||
* published by the Free Software Foundation; either version 2 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*
|
|
||||||
* Authors: Christian Paminger <christian.paminger@technikum-wien.at>,
|
|
||||||
* Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at> and
|
|
||||||
* Rudolf Hangl <rudolf.hangl@technikum-wien.at>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
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");
|
|
||||||
header("Content-type: application/vnd.mozilla.xul+xml");
|
|
||||||
|
|
||||||
include('../config/vilesci.config.inc.php');
|
|
||||||
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
|
|
||||||
$id='';
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
<window id="window-notiz" title="Notiz"
|
|
||||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
|
||||||
onload="NotizInit('<?php echo ($id!=''?$id:'');?>')"
|
|
||||||
>
|
|
||||||
|
|
||||||
<script type="application/x-javascript" src="<?php echo APP_ROOT; ?>content/notiz.window.js.php" />
|
|
||||||
<script type="application/x-javascript" src="<?php echo APP_ROOT; ?>content/functions.js.php" />
|
|
||||||
<script type="text/javascript" language="JavaScript" src="<?php echo APP_ROOT; ?>include/js/jquery.js"></script>
|
|
||||||
<script type="text/javascript" language="JavaScript" src="<?php echo APP_ROOT; ?>include/js/jqSOAPClient.js"></script>
|
|
||||||
<script type="text/javascript" language="JavaScript" src="<?php echo APP_ROOT; ?>include/js/jqXMLUtils.js"></script>
|
|
||||||
<script type="text/javascript">
|
|
||||||
var projekt_kurzbz = '<?php echo (isset($_GET['projekt_kurzbz'])?addslashes($_GET['projekt_kurzbz']):'');?>';
|
|
||||||
var projektphase_id = '<?php echo (isset($_GET['projektphase_id'])?addslashes($_GET['projektphase_id']):'');?>';
|
|
||||||
var projekttask_id = '<?php echo (isset($_GET['projekttask_id'])?addslashes($_GET['projekttask_id']):'');?>';
|
|
||||||
var uid = '<?php echo (isset($_GET['uid'])?addslashes($_GET['uid']):'');?>';
|
|
||||||
var person_id = '<?php echo (isset($_GET['person_id'])?addslashes($_GET['person_id']):'');?>';
|
|
||||||
var prestudent_id = '<?php echo (isset($_GET['prestudent_id'])?addslashes($_GET['prestudent_id']):'');?>';
|
|
||||||
var bestellung_id = '<?php echo (isset($_GET['bestellung_id'])?addslashes($_GET['bestellung_id']):'');?>';
|
|
||||||
|
|
||||||
var opener_id = '<?php echo (isset($_GET['opener_id'])?addslashes($_GET['opener_id']):'');?>';
|
|
||||||
</script>
|
|
||||||
<vbox>
|
|
||||||
|
|
||||||
<textbox id="notiz-textbox-notiz_id" hidden="true"/>
|
|
||||||
|
|
||||||
<groupbox id="notiz-groupbox" flex="1">
|
|
||||||
<caption label="Details"/>
|
|
||||||
<grid id="notiz-grid-detail" style="overflow:auto;margin:4px;" flex="1">
|
|
||||||
<columns >
|
|
||||||
<column flex="1"/>
|
|
||||||
<column flex="5"/>
|
|
||||||
</columns>
|
|
||||||
<rows>
|
|
||||||
<row>
|
|
||||||
<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>
|
|
||||||
<row>
|
|
||||||
<label value="Erledigt" control="notiz-checkbox-erledigt"/>
|
|
||||||
<checkbox id="notiz-checkbox-erledigt"/>
|
|
||||||
</row>
|
|
||||||
<row>
|
|
||||||
<label value="Bearbeiter" control="notiz-menulist-bearbeiter"/>
|
|
||||||
<menulist id="notiz-menulist-bearbeiter"
|
|
||||||
editable="true"
|
|
||||||
datasources="rdf:null" flex="1"
|
|
||||||
ref="http://www.technikum-wien.at/mitarbeiter/liste"
|
|
||||||
oninput="NotizMenulistMitarbeiterLoad(this);"
|
|
||||||
oncommand=""
|
|
||||||
>
|
|
||||||
<template>
|
|
||||||
<menupopup>
|
|
||||||
<menuitem value="rdf:http://www.technikum-wien.at/mitarbeiter/rdf#uid"
|
|
||||||
label="rdf:http://www.technikum-wien.at/mitarbeiter/rdf#vorname rdf:http://www.technikum-wien.at/mitarbeiter/rdf#nachname ( rdf:http://www.technikum-wien.at/mitarbeiter/rdf#uid )"
|
|
||||||
uri="rdf:*"/>
|
|
||||||
</menupopup>
|
|
||||||
</template>
|
|
||||||
</menulist>
|
|
||||||
</row>
|
|
||||||
<row>
|
|
||||||
<label value="Verfasser" control="notiz-textbox-verfasser"/>
|
|
||||||
<textbox id="notiz-textbox-verfasser" disabled="true"/>
|
|
||||||
</row>
|
|
||||||
</rows>
|
|
||||||
</grid>
|
|
||||||
<hbox>
|
|
||||||
<spacer flex="1" />
|
|
||||||
<button id="notiz-button-speichern" oncommand="NotizSpeichern()" label="Speichern" />
|
|
||||||
</hbox>
|
|
||||||
</groupbox>
|
|
||||||
</vbox>
|
|
||||||
</window>
|
|
||||||
Reference in New Issue
Block a user