- Renamed parameter jquery into jquery19 in file application/views/templates/header.php

- Fixed includes in prestudentMultiAssign.php and messageWrite.php
- Fixed new lines in prestudentMultiAssign.php and messageWrite.php
This commit is contained in:
Paolo
2017-08-25 14:13:46 +02:00
parent fbb4a492b5
commit 2beba613e6
3 changed files with 613 additions and 613 deletions
@@ -1,323 +1,323 @@
<?php $this->load->view("templates/header", array("title" => "Users manager", "jquery" => true, "tablesort" => true, "jquery_checkboxes" => true, "jquery_custom" => true)); ?> <?php $this->load->view("templates/header", array("title" => "Users manager", "jquery19" => true, "tablesort" => true, "jquery_checkboxes" => true, "jquery_custom" => true)); ?>
<body> <body>
<form id="usersFiltersForm" action="" method="post"> <form id="usersFiltersForm" action="" method="post">
<table> <table>
<tr> <tr>
<td> <td>
<?php <?php
echo $this->widgetlib->widget( echo $this->widgetlib->widget(
'Studiengang_widget', 'Studiengang_widget',
array(DropdownWidget::SELECTED_ELEMENT => $studiengang), array(DropdownWidget::SELECTED_ELEMENT => $studiengang),
array('name' => 'studiengang', 'id' => 'studiengangFilter') array('name' => 'studiengang', 'id' => 'studiengangFilter')
); );
?> ?>
</td> </td>
<td> <td>
<?php <?php
echo $this->widgetlib->widget( echo $this->widgetlib->widget(
'Studiensemester_widget', 'Studiensemester_widget',
array(DropdownWidget::SELECTED_ELEMENT => $studiensemester), array(DropdownWidget::SELECTED_ELEMENT => $studiensemester),
array('name' => 'studiensemester', 'id' => 'studiensemesterFilter') array('name' => 'studiensemester', 'id' => 'studiensemesterFilter')
); );
?> ?>
</td> </td>
<td> <td>
<?php <?php
echo $this->widgetlib->widget( echo $this->widgetlib->widget(
'Reihungstest_widget', 'Reihungstest_widget',
array( array(
DropdownWidget::SELECTED_ELEMENT => $reihungstest, DropdownWidget::SELECTED_ELEMENT => $reihungstest,
'studiengang' => $studiengang, 'studiengang' => $studiengang,
'studiensemester' => $studiensemester 'studiensemester' => $studiensemester
), ),
array('name' => 'reihungstest', 'id' => 'reihungstestFilter') array('name' => 'reihungstest', 'id' => 'reihungstestFilter')
); );
?> ?>
</td> </td>
<td> <td>
<?php <?php
echo $this->widgetlib->widget( echo $this->widgetlib->widget(
'Aufnahmegruppe_widget', 'Aufnahmegruppe_widget',
array(DropdownWidget::SELECTED_ELEMENT => $aufnahmegruppe), array(DropdownWidget::SELECTED_ELEMENT => $aufnahmegruppe),
array('name' => 'aufnahmegruppe', 'id' => 'aufnahmegruppeFilter') array('name' => 'aufnahmegruppe', 'id' => 'aufnahmegruppeFilter')
); );
?> ?>
</td> </td>
<td> <td>
<?php <?php
echo $this->widgetlib->widget( echo $this->widgetlib->widget(
'Stufe_widget', 'Stufe_widget',
array(DropdownWidget::SELECTED_ELEMENT => $stufe), array(DropdownWidget::SELECTED_ELEMENT => $stufe),
array('name' => 'stufe', 'id' => 'stufeFilter') array('name' => 'stufe', 'id' => 'stufeFilter')
); );
?> ?>
</td> </td>
</tr> </tr>
</table> </table>
</form> </form>
<br> <br>
<form id="linkUsersForm" action="" method="post"> <form id="linkUsersForm" action="" method="post">
<?php <?php
if ($users != null) if ($users != null)
{ {
?> ?>
<table> <table>
<tr> <tr>
<td colspan="2"> <td colspan="2">
<strong>Assign to:</strong> <strong>Assign to:</strong>
</td> </td>
</tr> </tr>
<tr> <tr>
<td height="3px" colspan="2"></td> <td height="3px" colspan="2"></td>
</tr> </tr>
<tr> <tr>
<td> <td>
<?php <?php
echo $this->widgetlib->widget( echo $this->widgetlib->widget(
'Stufe_widget', 'Stufe_widget',
array('stufe' => $stufe), array('stufe' => $stufe),
array('name' => 'stufe', 'id' => 'stufeAssign') array('name' => 'stufe', 'id' => 'stufeAssign')
); );
?> ?>
</td> </td>
<td>&nbsp;</td> <td>&nbsp;</td>
<td> <td>
<input type="button" id="linkToStufe" value="Assign this stufe"> <input type="button" id="linkToStufe" value="Assign this stufe">
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<?php <?php
echo $this->widgetlib->widget( echo $this->widgetlib->widget(
'Aufnahmegruppe_widget', 'Aufnahmegruppe_widget',
array('aufnahmegruppe' => $aufnahmegruppe), array('aufnahmegruppe' => $aufnahmegruppe),
array('name' => 'aufnahmegruppe', 'id' => 'aufnahmegruppeAssign') array('name' => 'aufnahmegruppe', 'id' => 'aufnahmegruppeAssign')
); );
?> ?>
<td>&nbsp;</td> <td>&nbsp;</td>
<td> <td>
<input type="button" id="linkToGruppe" value="Assign to this group"> <input type="button" id="linkToGruppe" value="Assign to this group">
</td> </td>
</tr> </tr>
</table> </table>
<?php <?php
} }
?> ?>
<br> <br>
<br> <br>
<div> <div>
<?php <?php
if ($users != null) if ($users != null)
{ {
?> ?>
<table id="t0" class="tablesorter"> <table id="t0" class="tablesorter">
<thead> <thead>
<tr> <tr>
<th>&nbsp;</th> <th>&nbsp;</th>
<th class="clm_prestudent_id header">Prestudent ID</th> <th class="clm_prestudent_id header">Prestudent ID</th>
<th class="clm_person_id header">Person ID</th> <th class="clm_person_id header">Person ID</th>
<th class="header headerSortDown">Vorname</th> <th class="header headerSortDown">Vorname</th>
<th>Nachname</th> <th>Nachname</th>
<th>Geschlecht</th> <th>Geschlecht</th>
<th>Studiengang</th> <th>Studiengang</th>
<th>OrgForm</th> <th>OrgForm</th>
<th>Studienplan</th> <th>Studienplan</th>
<th>Geburtsdatum</th> <th>Geburtsdatum</th>
<th>Email</th> <th>Email</th>
<th>Stufe</th> <th>Stufe</th>
<th>Gruppe</th> <th>Gruppe</th>
<th>Punkte</th> <th>Punkte</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<?php <?php
for ($i = 0; $i < count($users); $i++) for ($i = 0; $i < count($users); $i++)
{ {
$user = $users[$i]; $user = $users[$i];
?> ?>
<tr> <tr>
<td> <td>
<input type="checkbox" name="prestudent_id[]" value="<?php echo $user->prestudent_id ?>"> <input type="checkbox" name="prestudent_id[]" value="<?php echo $user->prestudent_id ?>">
</td> </td>
<td> <td>
<?php echo $user->prestudent_id; ?> <?php echo $user->prestudent_id; ?>
</td> </td>
<td> <td>
<?php echo $user->person_id; ?> <?php echo $user->person_id; ?>
</td> </td>
<td> <td>
<?php echo $user->vorname; ?> <?php echo $user->vorname; ?>
</td> </td>
<td> <td>
<?php echo $user->nachname; ?> <?php echo $user->nachname; ?>
</td> </td>
<td> <td>
<?php echo $user->geschlecht; ?> <?php echo $user->geschlecht; ?>
</td> </td>
<td> <td>
<?php echo $user->kurzbzlang; ?> <?php echo $user->kurzbzlang; ?>
</td> </td>
<td> <td>
<?php echo $user->orgform_kurzbz; ?> <?php echo $user->orgform_kurzbz; ?>
</td> </td>
<td> <td>
<?php echo $user->studienplan; ?> <?php echo $user->studienplan; ?>
</td> </td>
<td> <td>
<?php echo $user->gebdatum; ?> <?php echo $user->gebdatum; ?>
</td> </td>
<td> <td>
<?php echo $user->email; ?> <?php echo $user->email; ?>
</td> </td>
<td> <td>
<?php echo $user->rt_stufe; ?> <?php echo $user->rt_stufe; ?>
</td> </td>
<td> <td>
<?php echo $user->aufnahmegruppe_kurzbz; ?> <?php echo $user->aufnahmegruppe_kurzbz; ?>
</td> </td>
<td> <td>
<?php echo $user->punkte; ?> <?php echo $user->punkte; ?>
</td> </td>
</tr> </tr>
<?php <?php
} }
?> ?>
</tbody> </tbody>
</table> </table>
<?php <?php
} }
else else
{ {
echo 'No users found.'; echo 'No users found.';
} }
?> ?>
</div> </div>
</form> </form>
<?php <?php
$hrefLinkToStufe = str_replace("/system/aufnahme/PrestudentMultiAssign", "/system/aufnahme/PrestudentMultiAssign/linkToStufe", $_SERVER["REQUEST_URI"]); $hrefLinkToStufe = str_replace("/system/aufnahme/PrestudentMultiAssign", "/system/aufnahme/PrestudentMultiAssign/linkToStufe", $_SERVER["REQUEST_URI"]);
$hrefLinkToAufnahmegruppe = str_replace("/system/aufnahme/PrestudentMultiAssign", "/system/aufnahme/PrestudentMultiAssign/linkToAufnahmegruppe", $_SERVER["REQUEST_URI"]); $hrefLinkToAufnahmegruppe = str_replace("/system/aufnahme/PrestudentMultiAssign", "/system/aufnahme/PrestudentMultiAssign/linkToAufnahmegruppe", $_SERVER["REQUEST_URI"]);
?> ?>
<script> <script>
$(document).ready(function() { $(document).ready(function() {
if ($("#linkToStufe")) if ($("#linkToStufe"))
{ {
$("#linkToStufe").click(function() { $("#linkToStufe").click(function() {
$.ajax({ $.ajax({
type: "POST", type: "POST",
dataType: "json", dataType: "json",
url: "<?php echo $hrefLinkToStufe; ?>", url: "<?php echo $hrefLinkToStufe; ?>",
data: $("#linkUsersForm").serialize(), data: $("#linkUsersForm").serialize(),
success: function(data, textStatus, jqXHR) { success: function(data, textStatus, jqXHR) {
alert(data.msg); alert(data.msg);
$("#usersFiltersForm").submit(); $("#usersFiltersForm").submit();
}, },
error: function(jqXHR, textStatus, errorThrown) { error: function(jqXHR, textStatus, errorThrown) {
alert(textStatus + " - " + errorThrown + " - " + jqXHR.responseText); alert(textStatus + " - " + errorThrown + " - " + jqXHR.responseText);
} }
}); });
}); });
} }
if ($("#linkToGruppe")) if ($("#linkToGruppe"))
{ {
$("#linkToGruppe").click(function() { $("#linkToGruppe").click(function() {
$.ajax({ $.ajax({
type: "POST", type: "POST",
dataType: "json", dataType: "json",
url: "<?php echo $hrefLinkToAufnahmegruppe; ?>", url: "<?php echo $hrefLinkToAufnahmegruppe; ?>",
data: $("#linkUsersForm").serialize(), data: $("#linkUsersForm").serialize(),
success: function(data, textStatus, jqXHR) { success: function(data, textStatus, jqXHR) {
alert(data.msg); alert(data.msg);
$("#usersFiltersForm").submit(); $("#usersFiltersForm").submit();
}, },
error: function(jqXHR, textStatus, errorThrown) { error: function(jqXHR, textStatus, errorThrown) {
alert(textStatus + " - " + errorThrown + " - " + jqXHR.responseText); alert(textStatus + " - " + errorThrown + " - " + jqXHR.responseText);
} }
}); });
}); });
} }
if ($('#studiengangFilter')) if ($('#studiengangFilter'))
{ {
$('#studiengangFilter').change(function() { $('#studiengangFilter').change(function() {
$('#usersFiltersForm').submit(); $('#usersFiltersForm').submit();
}); });
} }
if ($('#studiensemesterFilter')) if ($('#studiensemesterFilter'))
{ {
$('#studiensemesterFilter').change(function() { $('#studiensemesterFilter').change(function() {
$('#usersFiltersForm').submit(); $('#usersFiltersForm').submit();
}); });
} }
if ($('#aufnahmegruppeFilter')) if ($('#aufnahmegruppeFilter'))
{ {
$('#aufnahmegruppeFilter').change(function() { $('#aufnahmegruppeFilter').change(function() {
$('#usersFiltersForm').submit(); $('#usersFiltersForm').submit();
}); });
} }
if ($('#stufeFilter')) if ($('#stufeFilter'))
{ {
$('#stufeFilter').change(function() { $('#stufeFilter').change(function() {
$('#usersFiltersForm').submit(); $('#usersFiltersForm').submit();
}); });
} }
if ($('#reihungstestFilter')) if ($('#reihungstestFilter'))
{ {
$('#reihungstestFilter').change(function() { $('#reihungstestFilter').change(function() {
$('#usersFiltersForm').submit(); $('#usersFiltersForm').submit();
}); });
} }
$(".tablesorter").each(function(i, v) { $(".tablesorter").each(function(i, v) {
$("#"+v.id).tablesorter( $("#"+v.id).tablesorter(
{ {
widgets: ["zebra"], widgets: ["zebra"],
sortList: [[3,0],[4,0]], sortList: [[3,0],[4,0]],
headers: {0: { sorter: false}} headers: {0: { sorter: false}}
}); });
$("#toggle_"+v.id).on('click', function(e) { $("#toggle_"+v.id).on('click', function(e) {
$("#"+v.id).checkboxes('toggle'); $("#"+v.id).checkboxes('toggle');
e.preventDefault(); e.preventDefault();
if ($("input.chkbox:checked").size() > 0) if ($("input.chkbox:checked").size() > 0)
$("#mailSendButton").html('Mail an markierte Personen senden'); $("#mailSendButton").html('Mail an markierte Personen senden');
else else
$("#mailSendButton").html('Mail an alle senden'); $("#mailSendButton").html('Mail an alle senden');
}); });
$("#uncheck_"+v.id).on('click', function(e) { $("#uncheck_"+v.id).on('click', function(e) {
$("#"+v.id).checkboxes('uncheck'); $("#"+v.id).checkboxes('uncheck');
e.preventDefault(); e.preventDefault();
if ($("input.chkbox:checked").size() > 0) if ($("input.chkbox:checked").size() > 0)
$("#mailSendButton").html('Mail an markierte Personen senden'); $("#mailSendButton").html('Mail an markierte Personen senden');
else else
$("#mailSendButton").html('Mail an alle senden'); $("#mailSendButton").html('Mail an alle senden');
}); });
$("#"+v.id).checkboxes('range', true); $("#"+v.id).checkboxes('range', true);
}); });
$('.chkbox').change(function() $('.chkbox').change(function()
{ {
if ($("input.chkbox:checked").size() > 0) if ($("input.chkbox:checked").size() > 0)
$("#mailSendButton").html('Mail an markierte Personen senden'); $("#mailSendButton").html('Mail an markierte Personen senden');
else else
$("#mailSendButton").html('Mail an alle senden'); $("#mailSendButton").html('Mail an alle senden');
}); });
}); });
</script> </script>
</body> </body>
<?php $this->load->view("templates/footer"); ?> <?php $this->load->view("templates/footer"); ?>
+286 -286
View File
@@ -1,286 +1,286 @@
<?php $this->load->view("templates/header", array("title" => "MessageReply", "jquery" => true, "tinymce" => true)); ?> <?php $this->load->view("templates/header", array("title" => "MessageReply", "jquery19" => true, "tinymce" => true)); ?>
<body> <body>
<?php <?php
$href = str_replace("/system/Messages/write", "/system/Messages/send", $_SERVER["REQUEST_URI"]); $href = str_replace("/system/Messages/write", "/system/Messages/send", $_SERVER["REQUEST_URI"]);
?> ?>
<form id="sendForm" method="post" action="<?php echo $href; ?>"> <form id="sendForm" method="post" action="<?php echo $href; ?>">
<table> <table>
<tr> <tr>
<td> <td>
<strong>To:</strong> <strong>To:</strong>
</td> </td>
<td> <td>
<?php <?php
for ($i = 0; $i < count($receivers); $i++) for ($i = 0; $i < count($receivers); $i++)
{ {
$receiver = $receivers[$i]; $receiver = $receivers[$i];
// Every 10 recipients a new line // Every 10 recipients a new line
if ($i > 1 && $i % 10 == 0) if ($i > 1 && $i % 10 == 0)
{ {
echo '<br>'; echo '<br>';
} }
echo $receiver->Vorname . " " . $receiver->Nachname . "; "; echo $receiver->Vorname . " " . $receiver->Nachname . "; ";
} }
?> ?>
</td> </td>
</tr> </tr>
<tr> <tr>
<td height="3px"></td> <td height="3px"></td>
</tr> </tr>
<tr> <tr>
<td> <td>
<strong>Subject:</strong>&nbsp; <strong>Subject:</strong>&nbsp;
</td> </td>
<td> <td>
<?php <?php
$subject = ''; $subject = '';
if (isset($message)) if (isset($message))
{ {
$subject = 'Re: '.$message->subject; $subject = 'Re: '.$message->subject;
} }
?> ?>
<input id="subject" type="text" value="<?php echo $subject; ?>" name="subject" size="70"> <input id="subject" type="text" value="<?php echo $subject; ?>" name="subject" size="70">
</td> </td>
</tr> </tr>
</table> </table>
<table width="100%"> <table width="100%">
<tr> <tr>
<td width="80%"> <td width="80%">
<strong>Message:</strong><br> <strong>Message:</strong><br>
<?php <?php
$body = ''; $body = '';
if (isset($message)) if (isset($message))
{ {
$body = $message->body; $body = $message->body;
} }
?> ?>
<textarea id="bodyTextArea" name="body"><?php echo $body; ?></textarea> <textarea id="bodyTextArea" name="body"><?php echo $body; ?></textarea>
</td> </td>
<td width="3%">&nbsp;</td> <td width="3%">&nbsp;</td>
<td width="17%"> <td width="17%">
<?php <?php
if (isset($variables)) if (isset($variables))
{ {
?> ?>
<div> <div>
<strong>Variables:</strong><br> <strong>Variables:</strong><br>
<select id="variables" size="14" style="min-width:200px;"> <select id="variables" size="14" style="min-width:200px;">
<?php <?php
foreach($variables as $key => $val) foreach($variables as $key => $val)
{ {
?> ?>
<option value="<?php echo $key; ?>"><?php echo $val; ?></option> <option value="<?php echo $key; ?>"><?php echo $val; ?></option>
<?php <?php
} }
?> ?>
</select> </select>
</div> </div>
<?php <?php
} }
?> ?>
</td> </td>
</tr> </tr>
</table> </table>
<table> <table>
<tr> <tr>
<td> <td>
<?php <?php
echo $this->widgetlib->widget( echo $this->widgetlib->widget(
'Vorlage_widget', 'Vorlage_widget',
array('oe_kurzbz' => $oe_kurzbz, 'isAdmin' => $isAdmin), array('oe_kurzbz' => $oe_kurzbz, 'isAdmin' => $isAdmin),
array('name' => 'vorlage', 'id' => 'vorlageDnD') array('name' => 'vorlage', 'id' => 'vorlageDnD')
); );
?> ?>
</td> </td>
<td> <td>
&nbsp; &nbsp;
</td> </td>
<td> <td>
<button id="sendButton" type="button">Send</button> <button id="sendButton" type="button">Send</button>
</td> </td>
</tr> </tr>
</table> </table>
<br> <br>
<?php <?php
if (isset($receivers) && count($receivers) > 0) if (isset($receivers) && count($receivers) > 0)
{ {
?> ?>
<div> <div>
Preview: Preview:
</div> </div>
<div style="border: 1px; border-style: solid;"> <div style="border: 1px; border-style: solid;">
<table width="100%" style="margin: 3px;"> <table width="100%" style="margin: 3px;">
<tr> <tr>
<td> <td>
<strong>Recipient:</strong> <strong>Recipient:</strong>
<select id="recipients"> <select id="recipients">
<option value="-1">Select...</option> <option value="-1">Select...</option>
<?php <?php
foreach($receivers as $receiver) foreach($receivers as $receiver)
{ {
?> ?>
<option value="<?php echo $receiver->prestudent_id; ?>"><?php echo $receiver->Nachname . " " . $receiver->Vorname; ?></option> <option value="<?php echo $receiver->prestudent_id; ?>"><?php echo $receiver->Nachname . " " . $receiver->Vorname; ?></option>
<?php <?php
} }
?> ?>
</select> </select>
&nbsp; &nbsp;
<strong><a href="#" id="refresh">Refresh</a></strong> <strong><a href="#" id="refresh">Refresh</a></strong>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td width="100%"> <td width="100%">
<textarea id="tinymcePreview"></textarea> <textarea id="tinymcePreview"></textarea>
</td> </td>
</tr> </tr>
</table> </table>
</div> </div>
<?php <?php
} }
?> ?>
<?php <?php
for($i = 0; $i < count($receivers); $i++) for($i = 0; $i < count($receivers); $i++)
{ {
$receiver = $receivers[$i]; $receiver = $receivers[$i];
echo '<input type="hidden" name="prestudents[]" value="' . $receiver->prestudent_id . '">' . "\n"; echo '<input type="hidden" name="prestudents[]" value="' . $receiver->prestudent_id . '">' . "\n";
} }
?> ?>
<?php <?php
if (isset($message)) if (isset($message))
{ {
?> ?>
<input type="hidden" name="relationmessage_id" value="<?php echo $message->message_id; ?>"> <input type="hidden" name="relationmessage_id" value="<?php echo $message->message_id; ?>">
<?php <?php
} }
?> ?>
</form> </form>
<script> <script>
tinymce.init({ tinymce.init({
selector: "#bodyTextArea" selector: "#bodyTextArea"
}); });
tinymce.init({ tinymce.init({
menubar: false, menubar: false,
toolbar: false, toolbar: false,
readonly: 1, readonly: 1,
selector: "#tinymcePreview", selector: "#tinymcePreview",
statusbar: true statusbar: true
}); });
$(document).ready(function() { $(document).ready(function() {
if ($("#variables")) if ($("#variables"))
{ {
$("#variables").dblclick(function() { $("#variables").dblclick(function() {
if ($("#bodyTextArea")) if ($("#bodyTextArea"))
{ {
tinyMCE.get("bodyTextArea").setContent(tinyMCE.get("bodyTextArea").getContent() + $(this).children(":selected").val()); tinyMCE.get("bodyTextArea").setContent(tinyMCE.get("bodyTextArea").getContent() + $(this).children(":selected").val());
} }
}); });
} }
if ($("#recipients")) if ($("#recipients"))
{ {
$("#recipients").change(tinymcePreviewSetContent); $("#recipients").change(tinymcePreviewSetContent);
} }
if ($("#refresh")) if ($("#refresh"))
{ {
$("#refresh").click(tinymcePreviewSetContent); $("#refresh").click(tinymcePreviewSetContent);
} }
if ($("#sendButton") && $("#sendForm")) if ($("#sendButton") && $("#sendForm"))
{ {
$("#sendButton").click(function() { $("#sendButton").click(function() {
if ($("#subject") && $("#subject").val() != '' && tinyMCE.get("bodyTextArea").getContent() != '') if ($("#subject") && $("#subject").val() != '' && tinyMCE.get("bodyTextArea").getContent() != '')
{ {
$("#sendForm").submit(); $("#sendForm").submit();
} }
else else
{ {
alert("Subject and text are required fields!"); alert("Subject and text are required fields!");
} }
}); });
} }
if ($("#vorlageDnD")) if ($("#vorlageDnD"))
{ {
$("#vorlageDnD").change(function() { $("#vorlageDnD").change(function() {
if (this.value != '') if (this.value != '')
{ {
<?php <?php
$url = str_replace("/system/Messages/write", "/system/Messages/getVorlage", $_SERVER["REQUEST_URI"]); $url = str_replace("/system/Messages/write", "/system/Messages/getVorlage", $_SERVER["REQUEST_URI"]);
?> ?>
$.ajax({ $.ajax({
dataType: "json", dataType: "json",
url: "<?php echo $url; ?>", url: "<?php echo $url; ?>",
data: {"vorlage_kurzbz": this.value}, data: {"vorlage_kurzbz": this.value},
success: function(data, textStatus, jqXHR) { success: function(data, textStatus, jqXHR) {
tinyMCE.get("bodyTextArea").setContent(data.retval[0].text); tinyMCE.get("bodyTextArea").setContent(data.retval[0].text);
$("#subject").val(data.retval[0].subject); $("#subject").val(data.retval[0].subject);
}, },
error: function(jqXHR, textStatus, errorThrown) { error: function(jqXHR, textStatus, errorThrown) {
alert(textStatus + " - " + errorThrown); alert(textStatus + " - " + errorThrown);
} }
}); });
} }
}); });
} }
}); });
function tinymcePreviewSetContent() function tinymcePreviewSetContent()
{ {
if ($("#tinymcePreview")) if ($("#tinymcePreview"))
{ {
if ($("#recipients").children(":selected").val() > -1) if ($("#recipients").children(":selected").val() > -1)
{ {
parseMessageText($("#recipients").children(":selected").val(), tinyMCE.get("bodyTextArea").getContent()); parseMessageText($("#recipients").children(":selected").val(), tinyMCE.get("bodyTextArea").getContent());
} }
else else
{ {
tinyMCE.get("tinymcePreview").setContent(""); tinyMCE.get("tinymcePreview").setContent("");
} }
} }
} }
function parseMessageText(prestudent_id, text) function parseMessageText(prestudent_id, text)
{ {
<?php <?php
$url = str_replace("/system/Messages/write", "/system/Messages/parseMessageText", $_SERVER["REQUEST_URI"]); $url = str_replace("/system/Messages/write", "/system/Messages/parseMessageText", $_SERVER["REQUEST_URI"]);
$url = substr($url, 0, strrpos($url, '/')); $url = substr($url, 0, strrpos($url, '/'));
?> ?>
$.ajax({ $.ajax({
dataType: "json", dataType: "json",
url: "<?php echo $url; ?>", url: "<?php echo $url; ?>",
data: {"prestudent_id": prestudent_id, "text" : text}, data: {"prestudent_id": prestudent_id, "text" : text},
success: function(data, textStatus, jqXHR) { success: function(data, textStatus, jqXHR) {
tinyMCE.get("tinymcePreview").setContent(data); tinyMCE.get("tinymcePreview").setContent(data);
}, },
error: function(jqXHR, textStatus, errorThrown) { error: function(jqXHR, textStatus, errorThrown) {
alert(textStatus + " - " + errorThrown + " - " + jqXHR.responseText); alert(textStatus + " - " + errorThrown + " - " + jqXHR.responseText);
} }
}); });
} }
</script> </script>
</body> </body>
<?php $this->load->view("templates/footer"); ?> <?php $this->load->view("templates/footer"); ?>
+4 -4
View File
@@ -2,7 +2,7 @@
if (! defined('BASEPATH')) exit('No direct script access allowed'); if (! defined('BASEPATH')) exit('No direct script access allowed');
isset($title) ? $title = 'VileSci - '.$title : $title = 'VileSci'; isset($title) ? $title = 'VileSci - '.$title : $title = 'VileSci';
!isset($jquery) ? $jquery = false : $jquery = $jquery; !isset($jquery19) ? $jquery19 = false : $jquery19 = $jquery19;
!isset($jqueryComposer) ? $jqueryComposer = false : $jqueryComposer = $jqueryComposer; !isset($jqueryComposer) ? $jqueryComposer = false : $jqueryComposer = $jqueryComposer;
!isset($jqueryui) ? $jqueryui = false : $jqueryui = $jqueryui; !isset($jqueryui) ? $jqueryui = false : $jqueryui = $jqueryui;
!isset($jquery_checkboxes) ? $jquery_checkboxes = false : $jquery_checkboxes = $jquery_checkboxes; !isset($jquery_checkboxes) ? $jquery_checkboxes = false : $jquery_checkboxes = $jquery_checkboxes;
@@ -19,7 +19,7 @@ isset($title) ? $title = 'VileSci - '.$title : $title = 'VileSci';
!isset($datepicker) ? $datepicker = false : $datepicker = $datepicker; !isset($datepicker) ? $datepicker = false : $datepicker = $datepicker;
if ($tablesort || $jquery_checkboxes || $jquery_custom) if ($tablesort || $jquery_checkboxes || $jquery_custom)
$jquery = true; $jquery19 = true;
if($datepicker) if($datepicker)
$jqueryui = true; $jqueryui = true;
@@ -27,7 +27,7 @@ if($datepicker)
if($jqueryui) if($jqueryui)
$jqueryComposer = true; $jqueryComposer = true;
if($jquery && $jqueryComposer) if($jquery19 && $jqueryComposer)
show_error("Two JQuery versions used: composer and include folder version"); show_error("Two JQuery versions used: composer and include folder version");
?> ?>
@@ -42,7 +42,7 @@ if($jquery && $jqueryComposer)
<link rel="stylesheet" type="text/css" href="<?php echo base_url('skin/tablesort.css'); ?>" /> <link rel="stylesheet" type="text/css" href="<?php echo base_url('skin/tablesort.css'); ?>" />
<?php endif ?> <?php endif ?>
<?php if($jquery) : ?> <?php if($jquery19) : ?>
<script type="text/javascript" src="<?php echo base_url('include/js/jquery1.9.min.js'); ?>"></script> <script type="text/javascript" src="<?php echo base_url('include/js/jquery1.9.min.js'); ?>"></script>
<?php endif ?> <?php endif ?>