mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-26 00:54:27 +00:00
- Added UDF tab in fas
- Added global constant FAS_UDF
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
|
||||||
class TestUDF extends VileSci_Controller
|
class UDF extends VileSci_Controller
|
||||||
{
|
{
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
@@ -24,10 +24,16 @@ class TestUDF extends VileSci_Controller
|
|||||||
|
|
||||||
$person = $this->PersonModel->load($person_id);
|
$person = $this->PersonModel->load($person_id);
|
||||||
|
|
||||||
|
$udfs = $this->PersonModel->getUDFs();
|
||||||
|
|
||||||
|
$udfs['person_id'] = 1;
|
||||||
|
$udfs['prestudent_id'] = 1;
|
||||||
|
$udfs['caller'] = 'system/UDF?person_id=1';
|
||||||
|
|
||||||
$data = array(
|
$data = array(
|
||||||
'udfs' => $this->PersonModel->getUDFs()
|
'udfs' => $udfs
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->load->view('system/testudf', $data);
|
$this->load->view('system/udf', $data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
<?php $this->load->view("templates/header", array("title" => "UDF")); ?>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<?php
|
|
||||||
echo $this->widgetlib->UDFWidget(
|
|
||||||
array(
|
|
||||||
UDFWidgetTpl::SCHEMA_ARG_NAME => 'public',
|
|
||||||
UDFWidgetTpl::TABLE_ARG_NAME => 'tbl_person',
|
|
||||||
UDFWidgetTpl::FIELD_ARG_NAME => 'udf_schuhgroesse',
|
|
||||||
DropdownWidget::SELECTED_ELEMENT => $udfs['udf_schuhgroesse']
|
|
||||||
),
|
|
||||||
array('name' => 'schuhgroesseName', 'id' => 'schuhgroesseId')
|
|
||||||
);
|
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<br/>
|
|
||||||
<br/>
|
|
||||||
<br/>
|
|
||||||
<br/>
|
|
||||||
<br/>
|
|
||||||
<br/>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<?php
|
|
||||||
echo $this->widgetlib->UDFWidget(
|
|
||||||
array(
|
|
||||||
UDFWidgetTpl::SCHEMA_ARG_NAME => 'public',
|
|
||||||
UDFWidgetTpl::TABLE_ARG_NAME => 'tbl_person',
|
|
||||||
UDFWidgetTpl::UDFS_ARG_NAME => $udfs
|
|
||||||
)
|
|
||||||
);
|
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
|
|
||||||
<?php $this->load->view("templates/footer"); ?>
|
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
<?php $this->load->view("templates/header", array("title" => "UDF")); ?>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<form action="/core/index.ci.php/api/v1/system/UDF/UDF" method="POST">
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<?php
|
||||||
|
echo $this->widgetlib->UDFWidget(
|
||||||
|
array(
|
||||||
|
UDFWidgetTpl::SCHEMA_ARG_NAME => 'public',
|
||||||
|
UDFWidgetTpl::TABLE_ARG_NAME => 'tbl_person',
|
||||||
|
UDFWidgetTpl::UDFS_ARG_NAME => $udfs
|
||||||
|
)
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<input type="submit" value="Save">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<input type="hidden" name="person_id" value="<?php echo $udfs['person_id']; ?>">
|
||||||
|
<input type="hidden" name="caller" value="<?php echo $udfs['caller']; ?>">
|
||||||
|
<!-- <input type="hidden" name="prestudent_id" value="<?php echo $udfs['prestudent_id']; ?>"> -->
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
|
<?php $this->load->view("templates/footer"); ?>
|
||||||
@@ -99,6 +99,9 @@ define('FAS_REIHUNGSTEST_PUNKTE', false);
|
|||||||
// Legt fest ob Messages im FAS angezeigt werden true|false
|
// Legt fest ob Messages im FAS angezeigt werden true|false
|
||||||
define('FAS_MESSAGES',false);
|
define('FAS_MESSAGES',false);
|
||||||
|
|
||||||
|
// Enable (true) or disable (false) the UDF tab
|
||||||
|
define('FAS_UDF', true);
|
||||||
|
|
||||||
// Legt fest ob Aufnahmegruppen bei Reihungstests verwaltet werden true|false
|
// Legt fest ob Aufnahmegruppen bei Reihungstests verwaltet werden true|false
|
||||||
define('FAS_REIHUNGSTEST_AUFNAHMEGRUPPEN',false);
|
define('FAS_REIHUNGSTEST_AUFNAHMEGRUPPEN',false);
|
||||||
|
|
||||||
|
|||||||
@@ -484,6 +484,11 @@ else
|
|||||||
if(!defined('FAS_MESSAGES') || FAS_MESSAGES==true)
|
if(!defined('FAS_MESSAGES') || FAS_MESSAGES==true)
|
||||||
echo '<tab id="student-tab-messages" label="Messages" onclick="StudentMessagesIFrameLoad();"/>';
|
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>
|
</tabs>
|
||||||
<tabpanels id="student-tabpanels-main" flex="1">
|
<tabpanels id="student-tabpanels-main" flex="1">
|
||||||
@@ -516,9 +521,13 @@ else
|
|||||||
?>
|
?>
|
||||||
<iframe id="student-aufnahmetermine" style="margin: 0px;" src="" />
|
<iframe id="student-aufnahmetermine" style="margin: 0px;" src="" />
|
||||||
<?php
|
<?php
|
||||||
if(!defined('FAS_MESSAGES') || FAS_MESSAGES==true)
|
if(!defined('FAS_MESSAGES') || FAS_MESSAGES==true)
|
||||||
echo '<iframe id="student-messages" style="margin: 0px;" src="" />';
|
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>
|
</tabpanels>
|
||||||
</tabbox>
|
</tabbox>
|
||||||
</vbox>
|
</vbox>
|
||||||
|
|||||||
@@ -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
|
// * Laedt den Anwesenheit IFrame
|
||||||
// ****
|
// ****
|
||||||
|
|||||||
@@ -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 <[email protected]>
|
||||||
|
*/
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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 <[email protected]>
|
||||||
|
*/
|
||||||
|
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>
|
||||||
Reference in New Issue
Block a user