- Added UDF tab in fas

- Added global constant FAS_UDF
This commit is contained in:
Paolo
2017-07-07 19:14:15 +02:00
parent df51fb2988
commit 5d16a79cd3
8 changed files with 213 additions and 45 deletions
+11 -2
View File
@@ -484,6 +484,11 @@ else
if(!defined('FAS_MESSAGES') || FAS_MESSAGES==true)
echo '<tab id="student-tab-messages" label="Messages" onclick="StudentMessagesIFrameLoad();"/>';
?>
<?php
if(!defined('FAS_UDF') || FAS_UDF==true)
echo '<tab id="student-tab-udf" label="UDF" onclick="StudentUDFIFrameLoad();"/>';
?>
</tabs>
<tabpanels id="student-tabpanels-main" flex="1">
@@ -516,9 +521,13 @@ else
?>
<iframe id="student-aufnahmetermine" style="margin: 0px;" src="" />
<?php
if(!defined('FAS_MESSAGES') || FAS_MESSAGES==true)
echo '<iframe id="student-messages" style="margin: 0px;" src="" />';
if(!defined('FAS_MESSAGES') || FAS_MESSAGES==true)
echo '<iframe id="student-messages" style="margin: 0px;" src="" />';
if(!defined('FAS_UDF') || FAS_UDF==true)
echo '<iframe id="student-udf" style="margin: 0px;" src="" />';
?>
</tabpanels>
</tabbox>
</vbox>
+21
View File
@@ -5432,6 +5432,27 @@ function StudentMessagesIFrameLoad()
}
}
// ****
// * Load UDF IFrame
// ****
function StudentUDFIFrameLoad()
{
var tree = document.getElementById('student-tree');
if (tree.currentIndex == -1) return;
try
{
//Ausgewaehlte person_id holen
var person_id = getTreeCellText(tree, 'student-treecol-person_id', tree.currentIndex);
var prestudent_id = getTreeCellText(tree, 'student-treecol-prestudent_id', tree.currentIndex);
url = 'udf.xul.php?person_id='+person_id+'&prestudent_id='+prestudent_id;
document.getElementById('student-udf').setAttribute('src', url);
}
catch(e) {}
}
// ****
// * Laedt den Anwesenheit IFrame
// ****
+67
View File
@@ -0,0 +1,67 @@
<?php
/* Copyright (C) 2016 fhcomplete.org
*
* 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');
?>
// ********** FUNKTIONEN ********** //
var UDFPersonID = null;
var UDFTreeDatasource = ''; // Datasource des Adressen Trees
var UDFSelectID = '';
var UDFIFrameIsInitialized = false;
var UDFTreeSinkObserver =
{
onBeginLoad : function(pSink) {},
onInterrupt : function(pSink) {},
onResume : function(pSink) {},
onError : function(pSink, pStatus, pError) {},
onEndLoad : function(pSink)
{
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
}
};
var UDFTreeListener =
{
willRebuild : function(builder) { },
didRebuild : function(builder)
{
//timeout nur bei Mozilla notwendig da sonst die rows
//noch keine values haben. Ab Seamonkey funktionierts auch
//ohne dem setTimeout
//window.setTimeout(KontaktAdressenTreeSelectID,10);
}
};
// ****
// * Laedt die Trees
// ****
function loadUDF(person_id, prestudent_id)
{
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var udfIFrame = document.getElementById('udfIFrame');
alert(udfIFrame.src);
if (udfIFrame != null)
{
udfIFrame.src = '/core/index.ci.php/system/UDF?person_id=' + person_id + '&prestudent_id' + prestudent_id;
}
}
+72
View File
@@ -0,0 +1,72 @@
<?php
/* Copyright (C) 2016 fhcomplete.org
*
* 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>
*/
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');
require_once('../include/functions.inc.php');
require_once('../include/variable.class.php');
require_once('../include/benutzer.class.php');
$user=get_uid();
$variable = new variable();
if(!$variable->loadVariables($user))
{
die('Fehler beim Laden der Variablen:'.$variable->errormsg);
}
$benutzer = new benutzer();
$benutzer->load($user);
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"?>';
$person_id = filter_input(INPUT_GET, 'person_id');
$prestudent_id= filter_input(INPUT_GET, 'prestudent_id');
echo '
<!DOCTYPE overlay [';
require('../locale/'.$variable->variable->locale.'/fas.dtd');
echo ']>
';
?>
<window id="udf-window" title="udf"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="loadUDF(<?php echo "'".$person_id."','".$prestudent_id."'"; ?>);"
>
<script type="application/x-javascript" src="<?php echo APP_ROOT; ?>content/udf.js.php" />
<script type="application/x-javascript" src="<?php echo APP_ROOT; ?>content/functions.js.php" />
<script type="application/x-javascript" src="<?php echo APP_ROOT; ?>content/phpRequest.js.php" />
<vbox flex="1">
<hbox flex="1">
<iframe id="udfIFrame" editortype="html" src="about:blank" flex="1" type="content-primary" style="min-width: 100px; min-height: 100px; border: 1px solid gray; margin: 10px;"/>
</hbox>
</vbox>
</window>