Merge branch 'master' into signatur

This commit is contained in:
Andreas Österreicher
2018-02-12 11:19:04 +01:00
22 changed files with 314 additions and 158 deletions
-5
View File
@@ -116,7 +116,6 @@ $config['fhc_acl'] = array
'lehre.tbl_vertrag' => 'basis/vertrag',
'lehre.tbl_vertragsstatus' => 'basis/vertragsstatus',
'lehre.tbl_vertragstyp' => 'basis/vertragstyp',
'lehre.tbl_zeitfenster' => 'basis/zeitfenster',
'lehre.tbl_zeugnis' => 'basis/zeugnis',
'lehre.tbl_zeugnisnote' => 'basis/zeugnisnote',
'lehre.vw_studienplan' => 'lehre/studienplan',
@@ -125,8 +124,6 @@ $config['fhc_acl'] = array
'public.tbl_ampel' => 'basis/ampel',
'public.tbl_aufmerksamdurch' => 'basis/aufmerksamdurch',
'public.tbl_aufnahmeschluessel' => 'basis/aufnahmeschluessel',
'public.tbl_aufnahmetermin' => 'basis/aufnahmetermin',
'public.tbl_aufnahmetermintyp' => 'basis/aufnahmetermintyp',
'public.tbl_bankverbindung' => 'basis/bankverbindung',
'public.tbl_benutzer' => 'basis/benutzer',
'public.tbl_benutzerfunktion' => 'basis/benutzerfunktion',
@@ -240,8 +237,6 @@ $config['fhc_acl'] = array
DMS_PATH => 'fs/dms',
'public.tbl_sprache' => 'admin',
'PhrasesLib.getPhrase' => 'system/PhrasesLib'
);
+1 -1
View File
@@ -55,7 +55,7 @@ $config['roles'] = array
(
'basis/adresse','basis/akte','basis/kontakt','basis/log','basis/nation','basis/notiz','basis/notizzuordnung',
'basis/person','basis/prestudent','basis/prestudentstatus','basis/status','basis/zgv','basis/zgvmaster',
'lehre/studienplan','system/filters','fs/dms'
'lehre/studienplan','system/filters','fs/dms','basis/message','basis/benutzerrolle', 'basis/sprache'
)
)
);
+44 -10
View File
@@ -27,8 +27,19 @@ class Messages extends VileSci_Controller
/**
* write
*/
public function write($sender_id, $msg_id = null, $receiver_id = null)
public function write($sender_id = null, $msg_id = null, $receiver_id = null)
{
if ($sender_id === null)
{
$user_person = $this->PersonModel->getByUid($this->uid);
if (isError($user_person))
{
show_error($user_person->retval);
}
$sender_id = $user_person->retval[0]->person_id;
}
$prestudent_id = $this->input->post('prestudent_id');
$person_id = $this->input->post('person_id');
$personOnly = false;
@@ -68,7 +79,7 @@ class Messages extends VileSci_Controller
$benutzerResult = $this->BenutzerfunktionModel->getByPersonId($sender_id);
if (hasData($benutzerResult))
{
foreach($benutzerResult->retval as $val)
foreach ($benutzerResult->retval as $val)
{
$oe_kurzbz[] = $val->oe_kurzbz;
}
@@ -95,6 +106,12 @@ class Messages extends VileSci_Controller
$v = $this->load->view('system/messageWrite', $data);
}
/**
* gets Message Variables and their data for Prestudent
* @param $prestudent_id
* @param $variablesArray to be filled with variable names
* @param $msgVarsData to be filled with variable data
*/
private function getPrestudentMsgData($prestudent_id, &$variablesArray, &$msgVarsData)
{
$msgVarsData = $this->MessageModel->getMsgVarsDataByPrestudentId($prestudent_id);
@@ -111,7 +128,7 @@ class Messages extends VileSci_Controller
{
$variablesArray = array();
// Skip person_id and prestudent_id
for($i = 2; $i < count($variables->retval); $i++)
for ($i = 2; $i < count($variables->retval); $i++)
{
$variablesArray['{'.str_replace(" ", "_", strtolower($variables->retval[$i])).'}'] = $variables->retval[$i];
}
@@ -121,6 +138,12 @@ class Messages extends VileSci_Controller
array_shift($variables->retval); // Remove prestudent_id
}
/**
* gets Message Variables and their data for Person
* @param $person_id
* @param $variablesArray to be filled with variable names
* @param $msgVarsData to be filled with variable data
*/
private function getPersonMsgData($person_id, &$variablesArray, &$msgVarsData)
{
$msgVarsData = $this->MessageModel->getMsgVarsDataByPersonId($person_id);
@@ -137,7 +160,7 @@ class Messages extends VileSci_Controller
{
$variablesArray = array();
// Skip person_id
for($i = 1; $i < count($variables->retval); $i++)
for ($i = 1; $i < count($variables->retval); $i++)
{
$variablesArray['{'.str_replace(" ", "_", strtolower($variables->retval[$i])).'}'] = $variables->retval[$i];
}
@@ -148,8 +171,19 @@ class Messages extends VileSci_Controller
/**
* send
*/
public function send($sender_id)
public function send($sender_id = null)
{
if ($sender_id === null)
{
$user_person = $this->PersonModel->getByUid($this->uid);
if (isError($user_person))
{
show_error($user_person->retval);
}
$sender_id = $user_person->retval[0]->person_id;
}
$error = false;
$subject = $this->input->post('subject');
@@ -165,7 +199,7 @@ class Messages extends VileSci_Controller
// get message data of prestudents or persons
$prestudentsData = array();
if($prestudents !== null)
if ($prestudents !== null)
{
$data = $this->MessageModel->getMsgVarsDataByPrestudentId($prestudents);
//
@@ -182,7 +216,7 @@ class Messages extends VileSci_Controller
{
$parsedText = "";
$dataArray = (array)$data->retval[$i];
foreach($dataArray as $key => $val)
foreach ($dataArray as $key => $val)
{
$newKey = str_replace(" ", "_", strtolower($key));
$dataArray[$newKey] = $dataArray[$key];
@@ -191,7 +225,7 @@ class Messages extends VileSci_Controller
$parsedText = $this->messagelib->parseMessageText($body, $dataArray);
$oe_kurzbz = null;
if(hasData($prestudentsData))
if (hasData($prestudentsData))
{
for ($p = 0; $p < count($prestudentsData->retval); $p++)
{
@@ -247,7 +281,7 @@ class Messages extends VileSci_Controller
{
$person_id = $this->input->get('person_id');
}
else if ($this->input->post('person_id') !== null)
elseif ($this->input->post('person_id') !== null)
{
$person_id = $this->input->get('person_id');
}
@@ -310,7 +344,7 @@ class Messages extends VileSci_Controller
if (hasData($data))
{
$dataArray = (array)$data->retval[0];
foreach($dataArray as $key => $val)
foreach ($dataArray as $key => $val)
{
$newKey = str_replace(" ", "_", strtolower($key));
$dataArray[$newKey] = $dataArray[$key];
@@ -11,9 +11,10 @@ class InfoCenter extends VileSci_Controller
// App and Verarbeitungstaetigkeit name for logging
const APP = 'infocenter';
const TAETIGKEIT = 'bewerbung';
const FILTER_ID = 'filter_id';
// URL prefix for this controller
const URL_PREFIX = '/system/infocenter/InfoCenter/';
const URL_PREFIX = '/system/infocenter/InfoCenter';
// Used to log with PersonLogLib
private $logparams = array(
@@ -165,7 +166,7 @@ class InfoCenter extends VileSci_Controller
)
);
redirect(self::URL_PREFIX.'showDetails/'.$person_id.'#DokPruef');
redirect(self::URL_PREFIX.'/showDetails/'.$person_id.'#DokPruef');
}
/**
@@ -337,7 +338,7 @@ class InfoCenter extends VileSci_Controller
$this->_log($person_id, 'savenotiz', array($titel));
redirect(self::URL_PREFIX.'showDetails/'.$person_id.'#NotizAkt');
redirect(self::URL_PREFIX.'/showDetails/'.$person_id.'#NotizAkt');
}
/**
@@ -368,6 +369,21 @@ class InfoCenter extends VileSci_Controller
->_display();
}
/**
*
*/
public function deleteCustomFilter()
{
$filter_id = $this->input->get('filter_id');
if (is_numeric($filter_id))
{
$this->FiltersModel->deleteCustomFilter($filter_id);
redirect(self::URL_PREFIX);
}
}
// -----------------------------------------------------------------------------------------------------------------
// Private methods
@@ -386,6 +402,9 @@ class InfoCenter extends VileSci_Controller
*/
private function _setNavigationMenuArray()
{
$listFiltersSent = array();
$listFiltersNotSent = array();
$filtersSent = $this->FiltersModel->getFilterList('infocenter', 'PersonActions', '%InfoCenterSentApplication%');
if (hasData($filtersSent))
{
@@ -446,7 +465,7 @@ class InfoCenter extends VileSci_Controller
'children' => array()
);
$this->_fillFilters($listCustomFilters, $filtersarray['personal']);
$this->_fillCustomFilters($listCustomFilters, $filtersarray['personal']);
}
$this->navigationMenuArray = array(
@@ -471,12 +490,26 @@ class InfoCenter extends VileSci_Controller
{
$toPrint = "%s=%s";
$tofill['children'][] = array(
'link' => sprintf($toPrint, base_url('index.ci.php/system/infocenter/InfoCenter?filterId'), $filterId),
'link' => sprintf($toPrint, base_url('index.ci.php/system/infocenter/InfoCenter?filter_id'), $filterId),
'description' => $description
);
}
}
private function _fillCustomFilters($filters, &$tofill)
{
foreach ($filters as $filterId => $description)
{
$toPrint = "%s=%s";
$tofill['children'][] = array(
'link' => sprintf($toPrint, base_url('index.ci.php/system/infocenter/InfoCenter?filter_id'), $filterId),
'description' => $description,
'subscriptLink' => sprintf($toPrint, base_url('index.ci.php/system/infocenter/InfoCenter/deleteCustomFilter?filter_id'), $filterId),
'subscriptDescription' => 'Remove'
);
}
}
/**
* Loads all necessary Person data: Stammdaten (name, svnr, contact, ...), Dokumente, Logs and Notizen
* @param $person_id
@@ -627,7 +660,7 @@ class InfoCenter extends VileSci_Controller
$this->PrestudentModel->addSelect('person_id');
$person_id = $this->PrestudentModel->load($prestudent_id)->retval[0]->person_id;
redirect(self::URL_PREFIX.'showDetails/'.$person_id.'#'.$section);
redirect(self::URL_PREFIX.'/showDetails/'.$person_id.'#'.$section);
}
/**
+12 -11
View File
@@ -9,7 +9,7 @@
* @license GPLv3
* @since Version 1.0.0
*/
/**
* FHC Helper
*
@@ -33,7 +33,7 @@ if (! defined('BASEPATH')) exit('No direct script access allowed');
function generateToken($length = 64)
{
// For PHP 7 you can use random_bytes()
if(function_exists('random_bytes'))
if (function_exists('random_bytes'))
{
$token = base64_encode(random_bytes($length));
//base64 is about 33% longer, so we need to truncate the result
@@ -41,7 +41,7 @@ function generateToken($length = 64)
}
// for PHP >=5.3 and <7
if(function_exists('openssl_random_pseudo_bytes'))
if (function_exists('openssl_random_pseudo_bytes'))
{
$token = base64_encode(openssl_random_pseudo_bytes($length, $strong));
// is the token strong enough?
@@ -51,12 +51,13 @@ function generateToken($length = 64)
//fallback to mt_rand if php < 5.3 or no openssl available
$characters = '0123456789';
$characters .= 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz/+';
$characters .= 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz/+';
$charactersLength = strlen($characters)-1;
$token = '';
//select some random characters
for ($i = 0; $i < $length; $i++)
$token .= $characters[mt_rand(0, $charactersLength)];
return $token;
}
@@ -96,18 +97,18 @@ function loadResource($path, $resources = null, $subdir = false)
{
$path .= '/';
}
// Loads in $tmpResources all the given resources
$tmpResources = $resources;
if ($resources == null)
{
$tmpResources = array();
}
else if (!is_array($resources))
elseif (!is_array($resources))
{
$tmpResources = array($resources);
}
// Loads in $tmpPaths path and eventually the subdirectories
$tmpPaths = array($path);
// NOTE: Used @ to prevent ugly error messages
@@ -133,12 +134,12 @@ function loadResource($path, $resources = null, $subdir = false)
}
closedir($dirHandler);
}
// Loops through the resources
foreach($tmpResources as $tmpResource)
foreach ($tmpResources as $tmpResource)
{
// Loops through the paths
foreach($tmpPaths as $tmpPath)
foreach ($tmpPaths as $tmpPath)
{
$fileName = $tmpPath.$tmpResource.'.php'; // Php extension
if (file_exists($fileName))
@@ -147,4 +148,4 @@ function loadResource($path, $resources = null, $subdir = false)
}
}
}
}
}
@@ -1,14 +0,0 @@
<?php
class Aufnahmetermin_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'public.tbl_aufnahmetermin';
$this->pk = 'aufnahmetermin_id';
}
}
@@ -1,14 +0,0 @@
<?php
class Aufnahmetermintyp_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'public.tbl_aufnahmetermintyp';
$this->pk = 'aufnahmetermintyp_kurzbz';
}
}
@@ -1,14 +0,0 @@
<?php
class Zeitfenster_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'lehre.tbl_zeitfenster';
$this->pk = array('wochentag', 'studiengang_kz', 'ort_kurzbz', 'stunde');
}
}
+10 -2
View File
@@ -29,7 +29,7 @@ class Filters_model extends DB_Model
'filter_kurzbz ILIKE' => $filter_kurzbz
);
return $this->FiltersModel->loadWhere($filterParametersArray);
return $this->loadWhere($filterParametersArray);
}
/**
@@ -49,6 +49,14 @@ class Filters_model extends DB_Model
'uid' => $uid
);
return $this->FiltersModel->loadWhere($filterParametersArray);
return $this->loadWhere($filterParametersArray);
}
/**
*
*/
public function deleteCustomFilter($filter_id)
{
return $this->delete($filter_id);
}
}
@@ -8,7 +8,8 @@
'fontawesome' => true,
'sbadmintemplate' => true,
'tablesorter' => true,
'customCSSs' => 'skin/tablesort_bootstrap.css'
'customCSSs' => 'skin/tablesort_bootstrap.css',
'customJSs' => array('include/js/infocenterPersonDataset.js', 'include/js/bootstrapper.js')
)
);
?>
@@ -40,11 +41,7 @@
</div>
</div>
<script>
//javascript hacks for bootstrap
$("select").addClass("form-control");
$("input[type=text]").addClass("form-control");
$("input[type=button]").addClass("btn btn-default");
$("#tableDataset").addClass('table table-bordered table-responsive table-condensed');
$("#tableDataset").addClass('table table-bordered table-responsive');
</script>
</body>
@@ -139,11 +139,11 @@
}
);
$filterId = isset($_GET['filterId']) ? $_GET['filterId'] : null;
$filterId = isset($_GET[InfoCenter::FILTER_ID]) ? $_GET[InfoCenter::FILTER_ID] : null;
if (isset($filterId) && is_numeric($filterId))
{
$filterWidgetArray['filterId'] = $filterId;
$filterWidgetArray[InfoCenter::FILTER_ID] = $filterId;
}
else
{
@@ -10,7 +10,8 @@ $this->load->view(
'tablesorter' => true,
'tinymce' => true,
'sbadmintemplate' => true,
'customCSSs' => array('skin/admintemplate.css', 'skin/tablesort_bootstrap.css')
'customCSSs' => array('skin/admintemplate.css', 'skin/tablesort_bootstrap.css'),
'customJSs' => 'include/js/bootstrapper.js'
)
);
?>
@@ -127,10 +128,6 @@ $this->load->view(
$(document).ready(
function ()
{
//javascript bootstrap hack - not nice!
$("select").addClass('form-control');
$("table").addClass('table-condensed');
//initialise table sorter
addTablesorter("doctable", [[2, 1], [1, 0]], ["zebra"]);
addTablesorter("nachgdoctable", [[2, 0], [1, 1]], ["zebra"]);
@@ -148,14 +145,6 @@ $this->load->view(
"dateFormat": "dd.mm.yy"
});
//add submit event to message send link
$("#sendmsglink").click(
function()
{
$("#sendmsgform").submit();
}
);
//add click events to "formal geprüft" checkboxes
<?php foreach($dokumente as $dokument): ?>
@@ -98,12 +98,18 @@
</div>
<?php if (isset($stammdaten->zugangscode)): ?>
<div class="col-lg-6 text-right">
<a
href="<?php echo base_url('addons/bewerbung/cis/registration.php?code='.html_escape($stammdaten->zugangscode)) ?>"
target='_blank'><i
class="glyphicon glyphicon-new-window"></i>&nbsp;Zugang
Bewerbung</a>
<a href="<?php echo base_url('addons/bewerbung/cis/registration.php?code='.html_escape($stammdaten->zugangscode)) ?>"
target='_blank'><i class="glyphicon glyphicon-new-window"></i>&nbsp;Zugang Bewerbung</a>
</div>
<?php endif; ?>
</div>
</div>
</div>
<script>
//add submit event to message send link
$("#sendmsglink").click(
function ()
{
$("#sendmsgform").submit();
}
);
</script>
+9 -3
View File
@@ -1,4 +1,8 @@
<div class="col-lg-8">
<?php
$msgExists = count($messages) > 0;
$widthColumn = $msgExists === true ? 8 : 12;
?>
<div class="col-lg-<?php echo $widthColumn ?>">
<table id="msgtable" class="table table-bordered table-condensed tablesort-hover tablesort-active">
<thead>
<tr>
@@ -22,6 +26,7 @@
</tbody>
</table>
</div>
<?php if ($msgExists === true): ?>
<div class="col-lg-4">
<br>
<div class="text-center"><label for="msgbody" id="msgsubject"></label></div>
@@ -29,6 +34,7 @@
<textarea id="msgbody"></textarea>
</div>
</div>
<?php endif; ?>
<script>
tinymce.init({
menubar: false,
@@ -36,8 +42,8 @@
readonly: 1,
selector: "#msgbody",
statusbar: false,
height: 300,
//callback to avoid conflict with ajax (getting first message body)
plugins: "autoresize",
//callback to avoid conflict with ajax (for getting body of first message)
init_instance_callback: "initMsgBody"
});
+25 -13
View File
@@ -16,7 +16,12 @@ $this->load->view(
<body>
<style>
input[type=text] {
height: 30px;
height: 28px;
padding: 0px;
}
.msgfield label {
margin-bottom: 0px !important;
margin-top: 3px;
}
</style>
<?php
@@ -33,8 +38,9 @@ $href = str_replace("/system/Messages/write", "/system/Messages/send", $_SERVER[
<form id="sendForm" method="post" action="<?php echo $href; ?>">
<div class="row">
<div class="form-group">
<label class="col-lg-1">To:</label>
<div class="col-lg-1">
<label>To:</label>
</div>
<div class="col-lg-11">
<?php
for ($i = 0; $i < count($receivers); $i++)
@@ -53,7 +59,9 @@ $href = str_replace("/system/Messages/write", "/system/Messages/send", $_SERVER[
</div>
<div class="row">
<div class="form-group form-inline">
<label class="col-lg-1">Subject:</label>&nbsp;
<div class="col-lg-1 msgfield">
<label>Subject:</label>
</div>&nbsp;
<?php
$subject = '';
if (isset($message))
@@ -67,9 +75,9 @@ $href = str_replace("/system/Messages/write", "/system/Messages/send", $_SERVER[
</div>
</div>
</div>
<br>
<div class="row">
<div class="col-lg-10">
<br>
<label>Message:</label>
<?php
$body = '';
@@ -84,9 +92,9 @@ $href = str_replace("/system/Messages/write", "/system/Messages/send", $_SERVER[
if (isset($variables)):
?>
<div class="col-lg-2">
<div class="form-group text-center">
<div class="form-group">
<label>Variables:</label>
<select id="variables" class="form-control" size="13" multiple="multiple">
<select id="variables" class="form-control" size="14" multiple="multiple">
<?php
foreach ($variables as $key => $val)
{
@@ -100,6 +108,7 @@ $href = str_replace("/system/Messages/write", "/system/Messages/send", $_SERVER[
</div>
<?php endif; ?>
</div>
<br>
<div class="row">
<div class="col-lg-3 text-right">
<?php
@@ -118,7 +127,7 @@ $href = str_replace("/system/Messages/write", "/system/Messages/send", $_SERVER[
<hr>
<div class="row">
<div class="col-lg-12">
Preview:
<label>Preview:</label>
</div>
</div>
<div class="well">
@@ -186,7 +195,8 @@ $href = str_replace("/system/Messages/write", "/system/Messages/send", $_SERVER[
</div>
<script>
tinymce.init({
selector: "#bodyTextArea"
selector: "#bodyTextArea",
height: 155
});
tinymce.init({
@@ -194,7 +204,8 @@ $href = str_replace("/system/Messages/write", "/system/Messages/send", $_SERVER[
toolbar: false,
readonly: 1,
selector: "#tinymcePreview",
statusbar: true
statusbar: true,
plugins: "autoresize"
});
$(document).ready(function ()
@@ -206,7 +217,7 @@ $href = str_replace("/system/Messages/write", "/system/Messages/send", $_SERVER[
if ($("#bodyTextArea"))
{
//if editor active add at cursor position, otherwise at end
if(tinymce.activeEditor.id === "bodyTextArea")
if (tinymce.activeEditor.id === "bodyTextArea")
tinymce.activeEditor.execCommand('mceInsertContent', false, $(this).children(":selected").val());
else
tinyMCE.get("bodyTextArea").setContent(tinyMCE.get("bodyTextArea").getContent() + $(this).children(":selected").val());
@@ -286,8 +297,9 @@ $href = str_replace("/system/Messages/write", "/system/Messages/send", $_SERVER[
function parseMessageText(receiver_id, text)
{
<?php
$url = str_replace("/system/Messages/write", "/system/Messages/parseMessageText", $_SERVER["REQUEST_URI"]);
$url = substr($url, 0, strrpos($url, '/'));
//replacing url (can have sender id at end)
$url = preg_replace("/\/system\/Messages\/write(\/.*)?/", "/system/Messages/parseMessageText", $_SERVER["REQUEST_URI"]);
$idtype = $personOnly === true ? 'person_id' : 'prestudent_id';
?>
+6 -10
View File
@@ -1,16 +1,6 @@
<script language="Javascript" type="text/javascript">
$(document).ready(function() {
// Checks if the table contains data (rows)
if ($('#tableDataset').find('tbody:empty').length == 0
&& $('#tableDataset').find('tr:empty').length == 0)
{
$("#tableDataset").tablesorter(
{
widgets: ["zebra", "filter"]
});
}
$("#addField").change(function() {
$("#filterForm").submit();
});
@@ -72,9 +62,15 @@
<br>
<div id="datasetActionsTop">
</div>
<div>
<?php FilterWidget::loadViewTableDataset($dataset); ?>
</div>
<div id="datasetActionsBottom">
</div>
</form>
</div>
</div>
+42 -21
View File
@@ -1,8 +1,8 @@
<div class="navbar-default sidebar" role="navigation">
<div class="sidebar-nav navbar-collapse">
<ul class="nav" id="side-menu">
<li id="collapseicon" class="text-right" style="cursor: pointer; color: #337ab7"><i
class="fa fa-angle-double-left fa-fw"></i>
<li id="collapseicon" class="text-right" style="cursor: pointer; color: #337ab7">
<i class="fa fa-angle-double-left fa-fw"></i>
</li>
<?php NavigationMenuWidget::printNavigationMenu(); ?>
</ul>
@@ -10,7 +10,7 @@
<i id="collapseinicon" class="fa fa-angle-double-right fa-fw"></i>
</div>
<style>
#collapseinicon{
#collapseinicon {
display: none;
cursor: pointer;
color: #337ab7;
@@ -22,25 +22,46 @@
height: 20px;
background-color: #F8F8F8;
}
.nav > li > span {
position: relative;
display: block;
}
.nav > li > span > a {
display: inline;
padding-top: 10px;
padding-bottom: 10px;
padding-right: 123px;
}
.menuSubscriptLink {
font-size: 10px;
padding-left: 0px !important;
padding-right: 0px !important;
}
.sidebar ul li span a.active {
background-color: transparent;
font-weight: bold;
text-decoration: underline;
}
</style>
<script>
//hiding/showing navigation menu - works only with sb admin 2 template!!
$("#collapseicon").click(
function ()
{
$("#page-wrapper").css('margin-left', '0px');
$("#side-menu").hide();
$("#collapseinicon").show();
}
);
$("#collapseinicon").click(
function ()
{
$("#page-wrapper").css('margin-left', '250px');
$("#side-menu").show();
$("#collapseinicon").hide();
}
);
// Hiding/showing navigation menu - works only with sb admin 2 template!!
</script>
$("#collapseicon").click(function() {
$("#page-wrapper").css('margin-left', '0px');
$("#side-menu").hide();
$("#collapseinicon").show();
});
$("#collapseinicon").click(function() {
$("#page-wrapper").css('margin-left', '250px');
$("#side-menu").show();
$("#collapseinicon").hide();
});
</script>
+1 -1
View File
@@ -8,7 +8,7 @@ class FilterWidget extends Widget
const APP_PARAMETER = 'app';
const DATASET_NAME_PARAMETER = 'datasetName';
const FILTER_KURZBZ = 'filterKurzbz';
const FILTER_ID = 'filterId';
const FILTER_ID = 'filter_id';
const QUERY_PARAMETER = 'query';
const DB_RESULT = 'dbResult';
const ADDITIONAL_COLUMNS = 'additionalColumns';
+18 -4
View File
@@ -7,7 +7,7 @@ class NavigationMenuWidget extends Widget
{
private $navigationMenu;
private static $NavigationMenuWidgetInstance;
private static $navigationMenuWidgetInstance;
/**
*
@@ -16,7 +16,7 @@ class NavigationMenuWidget extends Widget
{
$this->navigationMenu = $widgetData;
self::$NavigationMenuWidgetInstance = $this;
self::$navigationMenuWidgetInstance = $this;
$this->view('widgets/navigationMenu');
}
@@ -26,7 +26,7 @@ class NavigationMenuWidget extends Widget
*/
public static function printNavigationMenu()
{
foreach (self::$NavigationMenuWidgetInstance->navigationMenu as $item)
foreach (self::$navigationMenuWidgetInstance->navigationMenu as $item)
{
self::printNavItem($item);
}
@@ -41,6 +41,11 @@ class NavigationMenuWidget extends Widget
echo '<li class="'.$expanded.'">';
if (isset($item['subscriptLink']) && isset($item['subscriptDescription']))
{
echo '<span>';
}
echo '<a href="'.$item['link'].'"'.$expanded.'>';
if (isset($item['icon']))
@@ -48,7 +53,6 @@ class NavigationMenuWidget extends Widget
echo '<i class="fa fa-'.$item['icon'].' fa-fw"></i> ';
}
// echo '<span>'.$item['description'].'</span>'.'<span style="">test</span>';
echo $item['description'];
if (!empty($item['children']))
@@ -58,6 +62,16 @@ class NavigationMenuWidget extends Widget
echo '</a>';
if (isset($item['subscriptLink']) && isset($item['subscriptDescription']))
{
echo '<a class="menuSubscriptLink" href="'.$item['subscriptLink'].'">'.$item['subscriptDescription'].'</a>';
}
if (isset($item['subscriptLink']) && isset($item['subscriptDescription']))
{
echo '</span>';
}
if (!empty($item['children']))
{
$level = '';
+2 -1
View File
@@ -6,6 +6,7 @@ $(document).ready(
function()
{
$("input[type=text], select").addClass("form-control");
$("button").addClass("btn btn-default");
$("button, input[type=button]").addClass("btn btn-default");
$("table").addClass('table-condensed');
}
);
+82
View File
@@ -0,0 +1,82 @@
/**
*/
$(document).ready(
function()
{
// Checks if the table contains data (rows)
if ($('#tableDataset').find('tbody:empty').length == 0
&& $('#tableDataset').find('tr:empty').length == 0)
{
$("#tableDataset").tablesorter(
{
widgets: ["zebra", "filter"]
});
}
appendTableActionsHtml();
setTableActions();
}
);
function appendTableActionsHtml()
{
var currurl = window.location.href;
var url = currurl.replace(/infocenter\/InfoCenter(.*)/, "Messages/write");
var formHtml = '<form id="sendMsgsForm" method="post" action="'+ url +'" target="_blank"></form>';
$("#filterForm").before(formHtml);
var selectAllHtml =
'<a href="javascript:void(0)" class="selectAll">' +
'<i class="fa fa-check"></i>&nbsp;Alle</a>&nbsp;&nbsp;' +
'<a href="javascript:void(0)" class="unselectAll">' +
'<i class="fa fa-times"></i>&nbsp;Keinen</a>&nbsp;&nbsp;&nbsp;&nbsp;';
var messageHtml = 'Mit Ausgew&auml;hlten:&nbsp;&nbsp;' +
'<a href="javascript:void(0)" class="sendMsgsLink">' +
'<i class="fa fa-envelope"></i>&nbsp;Nachricht senden</a>';
var personcount = $("#tableDataset tbody tr").length;
var persontext = personcount === 1 ? "Person" : "Personen";
var countHtml = $("#tableDataset tbody tr").length +" "+persontext;
$("#datasetActionsTop, #datasetActionsBottom").append(
"<div class='pull-left'>"+selectAllHtml+"&nbsp;&nbsp;"+ messageHtml+"</div>"+
"<div class='pull-right'>"+countHtml+"</div>"+
"<div class='clearfix'></div>"
);
$("#datasetActionsBottom").append("<br><br>");
}
function setTableActions()
{
$(".sendMsgsLink").click(function() {
var idsel = $("#tableDataset input:checked[name=PersonId\\[\\]]");
if(idsel.length > 0)
{
var form = $("#sendMsgsForm");
form.find("input[type=hidden]").remove();
for (var i = 0; i < idsel.length; i++)
{
var id = $(idsel[i]).val();
form.append("<input type='hidden' name='person_id[]' value='" + id + "'>");
}
form.submit();
}
});
$(".selectAll").click(function()
{
//trs only if not filtered by tablesorter
var trs = $("#tableDataset tbody tr").not(".filtered");
trs.find("input[name=PersonId\\[\\]]").prop("checked", true);
}
);
$(".unselectAll").click(function()
{
var trs = $("#tableDataset tbody tr").not(".filtered");
trs.find("input[name=PersonId\\[\\]]").prop("checked", false);
}
);
}
+4 -1
View File
@@ -92,7 +92,10 @@ printValue("php-curl", extension_loaded('curl'));
$returnArray = array();
exec('unoconv --version',$returnArray);
if(isset($returnArray[0]))
$unoconvVersion = explode(' ',$returnArray[0])[1];
{
$hlp = explode(' ',$returnArray[0]);
$unoconvVersion = $hlp[1];
}
else
$unoconvVersion = false;