mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-25 08:34:29 +00:00
NEW: edit ressource funktion
This commit is contained in:
Regular → Executable
+81
@@ -0,0 +1,81 @@
|
||||
<?php
|
||||
require_once('../../config/vilesci.config.inc.php');
|
||||
require_once('../../include/functions.inc.php');
|
||||
|
||||
?>
|
||||
|
||||
function updateProjektRessource()
|
||||
{
|
||||
if(projekt_ressource_id!='')
|
||||
{
|
||||
|
||||
aufwand = document.getElementById("textbox-ressource-aufwand").value;
|
||||
if (document.getElementById("leitung").selected)
|
||||
funktion_kurzbz = 'Leitung';
|
||||
else
|
||||
funktion_kurzbz = 'Mitarbeiter';
|
||||
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
var soapBody = new SOAPObject("saveProjektRessource");
|
||||
var projektRessource = new SOAPObject("projektRessource");
|
||||
|
||||
projektRessource.appendChild(new SOAPObject("projekt_ressource_id")).val(projekt_ressource_id);
|
||||
|
||||
if(projekt_kurzbz != '')
|
||||
{
|
||||
projektRessource.appendChild(new SOAPObject("projektphase_id")).val('');
|
||||
projektRessource.appendChild(new SOAPObject("projekt_kurzbz")).val(projekt_kurzbz);
|
||||
}
|
||||
else if(projektphase_id != '')
|
||||
{
|
||||
projektRessource.appendChild(new SOAPObject("projektphase_id")).val(projektphase_id);
|
||||
projektRessource.appendChild(new SOAPObject("projekt_kurzbz")).val('');
|
||||
}
|
||||
|
||||
projektRessource.appendChild(new SOAPObject("ressource_id")).val(ressource_id);
|
||||
projektRessource.appendChild(new SOAPObject("funktion_kurzbz")).val(funktion_kurzbz);
|
||||
projektRessource.appendChild(new SOAPObject("beschreibung")).val(beschreibung);
|
||||
projektRessource.appendChild(new SOAPObject("aufwand")).val(aufwand);
|
||||
|
||||
soapBody.appendChild(projektRessource);
|
||||
|
||||
var sr = new SOAPRequest("saveProjektRessource",soapBody);
|
||||
SOAPClient.Proxy="<?php echo APP_ROOT;?>soap/ressource_projekt.soap.php?"+gettimestamp();
|
||||
|
||||
function mycallb(obj)
|
||||
{
|
||||
var me=obj;
|
||||
this.invoke=function (respObj)
|
||||
{
|
||||
try
|
||||
{
|
||||
var id = respObj.Body[0].saveProjektRessourceResponse[0].message[0].Text;
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
var fehler = respObj.Body[0].Fault[0].faultstring[0].Text;
|
||||
alert('Fehler: '+fehler);
|
||||
return;
|
||||
}
|
||||
me.RefreshRessource();
|
||||
}
|
||||
}
|
||||
|
||||
var cb=new mycallb(this);
|
||||
|
||||
//SOAPClient.SendRequest(sr,cb.invoke);
|
||||
SOAPClient.SendRequest(sr);
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
debug("Ressource load failed with exception: "+e);
|
||||
}
|
||||
|
||||
}
|
||||
//window.opener.location.reload(false);
|
||||
window.close();
|
||||
|
||||
}
|
||||
+117
@@ -0,0 +1,117 @@
|
||||
<?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 <[email protected]>,
|
||||
* Andreas Oesterreicher <[email protected]> and
|
||||
* Gerald Raab <[email protected]> and
|
||||
* Rudolf Hangl <[email protected]>.
|
||||
*/
|
||||
|
||||
$projekt_ressource_id = $_GET["id"];
|
||||
|
||||
require_once('../../config/vilesci.config.inc.php');
|
||||
require_once('../../include/functions.inc.php');
|
||||
require_once('../../include/ressource.class.php');
|
||||
|
||||
$ressource = new ressource();
|
||||
$ressource->getSingleProjektRessource($projekt_ressource_id);
|
||||
$aufwand = $ressource->aufwand;
|
||||
$funktion_kurzbz = $ressource->funktion_kurzbz;
|
||||
$ressource_id = $ressource->ressource_id;
|
||||
$projektphase_id = $ressource->projektphase_id;
|
||||
$beschreibung = $ressource->beschreibung;
|
||||
$projekt_kurzbz = $ressource->projekt_kurzbz;
|
||||
|
||||
if ($funktion_kurzbz == "Leitung")
|
||||
{
|
||||
$leitung_sel = ' selected="true"';
|
||||
$mitarbeiter_sel = '';
|
||||
}
|
||||
else
|
||||
{
|
||||
$leitung_sel = '';
|
||||
$mitarbeiter_sel = ' selected="true"';
|
||||
}
|
||||
|
||||
|
||||
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");
|
||||
require_once('../../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"?>';
|
||||
?>
|
||||
|
||||
<window id="window-ressource-neu" title="Projektressource verwalten"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
>
|
||||
<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" language="JavaScript" src="<?php echo APP_ROOT; ?>content/functions.js.php"></script>
|
||||
<script type="text/javascript" language="JavaScript" src="<?php echo APP_ROOT; ?>content/projekt/projekt_ressource.window.js.php"></script>
|
||||
<script type="text/javascript">
|
||||
var projekt_ressource_id = '<?php echo $projekt_ressource_id ?>';
|
||||
var aufwand = '<?php echo $aufwand; ?>';
|
||||
var funktion_kurzbz = '<?php echo $funktion_kurzbz; ?>';
|
||||
var projekt_kurzbz = '<?php echo $projekt_kurzbz; ?>';
|
||||
var projektphase_id = '<?php echo $projektphase_id; ?>';
|
||||
var ressource_id = '<?php echo $ressource_id; ?>';
|
||||
var funktion_kurzbz = '<?php echo $funktion_kurzbz; ?>';
|
||||
var beschreibung = '<?php echo $beschreibung; ?>';
|
||||
</script>
|
||||
|
||||
<vbox>
|
||||
|
||||
<checkbox id="checkbox-ressource-neu" hidden="true"/>
|
||||
<groupbox id="groupbox-ressource" flex="1">
|
||||
<caption label="Details"/>
|
||||
<grid id="grid-ressource-detail" style="overflow:auto;margin:4px;" flex="1">
|
||||
<columns >
|
||||
<column flex="1"/>
|
||||
<column flex="5"/>
|
||||
</columns>
|
||||
<rows>
|
||||
|
||||
<row>
|
||||
<label value="ProjektRessourceID" control="textbox-ressource-projekt_ressource_id"/>
|
||||
<textbox id="textbox-ressource-projekt_ressource_id" value="<?php echo $projekt_ressource_id; ?>" disabled="true" />
|
||||
</row>
|
||||
<row>
|
||||
<label value="Funktion" control="textbox-ressource-funktionradio"/>
|
||||
<radiogroup>
|
||||
<radio id="leitung" label="Leitung" <?php echo $leitung_sel; ?>/>
|
||||
<radio id="mitarbeiter" label="Mitarbeiter" <?php echo $mitarbeiter_sel; ?>/>
|
||||
</radiogroup>
|
||||
</row>
|
||||
<row>
|
||||
<label value="Aufwand" control="textbox-ressource-aufwand"/>
|
||||
<textbox id="textbox-ressource-aufwand" value="<?php echo $aufwand; ?>" maxlength="256"/>
|
||||
</row>
|
||||
|
||||
</rows>
|
||||
</grid>
|
||||
<hbox>
|
||||
<spacer flex="1" />
|
||||
<button id="button-ressource-speichern" oncommand="updateProjektRessource()" label="Speichern" />
|
||||
</hbox>
|
||||
</groupbox>
|
||||
</vbox>
|
||||
</window>
|
||||
Regular → Executable
+1
@@ -224,6 +224,7 @@ function saveRessource()
|
||||
SOAPClient.SendRequest(sr, clb_saveRessource);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ****
|
||||
|
||||
Regular → Executable
+601
-581
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user