added lines with actions for multiple persons in infocenter uebersicht (send message, select all, number of rows), message with no sender sends from logged user, layout tweaks writemessage page

This commit is contained in:
alex
2018-02-09 17:00:16 +01:00
parent d23e44643d
commit fe5e5cc313
8 changed files with 174 additions and 58 deletions
@@ -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>
@@ -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>
+23 -12
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({
@@ -206,7 +216,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 +296,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>