diff --git a/application/views/system/messageList.php b/application/views/system/messageList.php index eb2aa506f..f6f251c48 100644 --- a/application/views/system/messageList.php +++ b/application/views/system/messageList.php @@ -30,17 +30,32 @@ \ No newline at end of file diff --git a/application/views/system/messageWrite.php b/application/views/system/messageWrite.php index 6b300bc46..2a4376720 100644 --- a/application/views/system/messageWrite.php +++ b/application/views/system/messageWrite.php @@ -1,20 +1,42 @@ -load->view("templates/header", array("title" => "MessageReply", "jqueryV1" => true, "tinymce" => true)); ?> +load->view( + 'templates/FHC-Header', + array( + 'title' => 'MessageReply', + 'jquery' => true, + 'bootstrap' => true, + 'fontawesome' => true, + 'tinymce' => true, + 'sbadmintemplate' => true, + 'customCSSs' => 'skin/admintemplate_contentonly.css', + 'customJSs' => 'include/js/bootstrapper.js' + ) +); +?> + + + +
+
+
+
+
+ +
+
+
+
+
- - - - - - - - - - - - - - - - - - -
- To: - - To: +
+ '; } - echo $receiver->Vorname . " " . $receiver->Nachname . "; "; + echo $receiver->Vorname." ".$receiver->Nachname."; "; } - ?> -
- Subject:  - - subject; - } - ?> - -
+ ?> +
+
+
+
- - - - - - -
- Message:
+
+   body; - } + $subject = ''; + if (isset($message)) + { + $subject = 'Re: '.$message->subject; + } + ?> +
+ +
+
+ +
+
+
+ + body; + } ?> -
  - + -
- Variables:
- + $val) { - ?> + ?> - + ?>
- -
- - - - - - - -
- widgetlib->widget( - 'Vorlage_widget', - array('oe_kurzbz' => $oe_kurzbz, 'isAdmin' => $isAdmin), - array('name' => 'vorlage', 'id' => 'vorlageDnD') - ); - ?> - -   - - -
- -
- - 0) - { - ?> -
- Preview: +
+
-
- - - - - - - - - - -
- Recipient: - -   - Refresh -
-   -
- -
+
+
+ widgetlib->widget( + 'Vorlage_widget', + array('oe_kurzbz' => $oe_kurzbz, 'isAdmin' => $isAdmin), + array('name' => 'vorlage', 'id' => 'vorlageDnD') + ); + ?> +
+
+ +
- + 0): ?> +
+
+
+ Preview: +
+
+
+
+
+
+ + +   + Refresh +
+
+
- +
+
+ +
+ + + prestudent_id)) { $receiverid = $receiver->prestudent_id; - $fieldname= 'prestudents[]'; + $fieldname = 'prestudents[]'; } else { $receiverid = $receiver->person_id; - $fieldname= 'persons[]'; + $fieldname = 'persons[]'; } - echo '' . "\n"; + echo ''."\n"; } - ?> + ?> - + ?> - + ?> - + +
+
+
+ - + if ($("#recipients")) + { + $("#recipients").change(tinymcePreviewSetContent); + } -load->view("templates/footer"); ?> + if ($("#refresh")) + { + $("#refresh").click(tinymcePreviewSetContent); + } + + if ($("#sendButton") && $("#sendForm")) + { + $("#sendButton").click(function () + { + if ($("#subject") && $("#subject").val() != '' && tinyMCE.get("bodyTextArea").getContent() != '') + { + $("#sendForm").submit(); + } + else + { + alert("Subject and text are required fields!"); + } + }); + } + + if ($("#vorlageDnD")) + { + $("#vorlageDnD").change(function () + { + if (this.value != '') + { + + + $.ajax({ + dataType: "json", + url: "", + data: {"vorlage_kurzbz": this.value}, + success: function (data, textStatus, jqXHR) + { + tinyMCE.get("bodyTextArea").setContent(data.retval[0].text); + $("#subject").val(data.retval[0].subject); + }, + error: function (jqXHR, textStatus, errorThrown) + { + alert(textStatus + " - " + errorThrown); + } + }); + } + }); + } + }); + + function tinymcePreviewSetContent() + { + if ($("#tinymcePreview")) + { + if ($("#recipients").children(":selected").val() > -1) + { + parseMessageText($("#recipients").children(":selected").val(), tinyMCE.get("bodyTextArea").getContent()); + } + else + { + tinyMCE.get("tinymcePreview").setContent(""); + } + } + } + + function parseMessageText(prestudent_id, text) + { + + + $.ajax({ + dataType: "json", + url: "", + data: {"prestudent_id": prestudent_id, "text": text}, + success: function (data, textStatus, jqXHR) + { + tinyMCE.get("tinymcePreview").setContent(data); + }, + error: function (jqXHR, textStatus, errorThrown) + { + alert(textStatus + " - " + errorThrown + " - " + jqXHR.responseText); + } + }); + } + + + + +load->view("templates/FHC-Footer"); ?> diff --git a/include/js/bootstrapper.js b/include/js/bootstrapper.js new file mode 100644 index 000000000..8c06c630b --- /dev/null +++ b/include/js/bootstrapper.js @@ -0,0 +1,11 @@ +/* +file for adding bootstrap classes, e.g. in case usage of non-bootstrap widgets in a bootstrap page +AVOID USING THIS IF POSSIBLE + */ +$(document).ready( + function() + { + $("input[type=text], select").addClass("form-control"); + $("button").addClass("btn btn-default"); + } +); diff --git a/skin/admintemplate_contentonly.css b/skin/admintemplate_contentonly.css new file mode 100644 index 000000000..a8e76cc08 --- /dev/null +++ b/skin/admintemplate_contentonly.css @@ -0,0 +1,7 @@ +@media (min-width:768px) { + #page-wrapper { + margin-right: 250px; + margin-top: 8px; + border: 1px solid #e7e7e7; + } +} \ No newline at end of file