This commit is contained in:
Paolo
2018-02-09 18:21:31 +01:00
16 changed files with 193 additions and 111 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>
+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';
?>