From 085d612d949415ca9808c37caecb4a3177324f86 Mon Sep 17 00:00:00 2001 From: Paolo Date: Thu, 7 Feb 2019 14:18:32 +0100 Subject: [PATCH] - Added new view system/messages/messageReplySent.php to show the message reply delivery status - system/messages/messageSent.php is now used to thow message delivery status - Moved JS from view system/messages/messageWriteReply.php to public/js/messaging/messageWriteReply.js --- application/controllers/ViewMessage.php | 2 +- application/controllers/system/Messages.php | 9 +- .../system/messages/messageReplySent.php | 103 ++++++++++++ .../views/system/messages/messageSent.php | 155 ++++++++---------- .../system/messages/messageWriteReply.php | 110 +++++-------- public/js/messaging/messageWriteReply.js | 30 ++++ 6 files changed, 247 insertions(+), 162 deletions(-) create mode 100644 application/views/system/messages/messageReplySent.php create mode 100644 public/js/messaging/messageWriteReply.js diff --git a/application/controllers/ViewMessage.php b/application/controllers/ViewMessage.php index 7d4a8d265..6794cb2bc 100644 --- a/application/controllers/ViewMessage.php +++ b/application/controllers/ViewMessage.php @@ -210,7 +210,7 @@ class ViewMessage extends FHC_Controller if (!$error) { - $this->load->view('system/messages/messageSent'); + $this->load->view('system/messages/messageReplySent'); } } } diff --git a/application/controllers/system/Messages.php b/application/controllers/system/Messages.php index 723fedd69..8f6225ff8 100644 --- a/application/controllers/system/Messages.php +++ b/application/controllers/system/Messages.php @@ -76,14 +76,7 @@ class Messages extends Auth_Controller { $result = $this->_execSend(); - if (isSuccess($result)) - { - echo "Messages sent successfully"; - } - else - { - echo "Error when sending message"; - } + $this->load->view('system/messages/messageSent', array('success' => isSuccess($result))); } /** diff --git a/application/views/system/messages/messageReplySent.php b/application/views/system/messages/messageReplySent.php new file mode 100644 index 000000000..88fc945b0 --- /dev/null +++ b/application/views/system/messages/messageReplySent.php @@ -0,0 +1,103 @@ +load->view( + 'templates/FHC-Header', + array( + 'title' => 'MessageSent', + 'jquery' => true, + 'bootstrap' => true, + 'fontawesome' => true, + 'sbadmintemplate' => true, + 'customCSSs' => array('public/css/sbadmin2/admintemplate_contentonly.css', 'public/css/messaging/messageSent.css') + ) + ); +?> + + +
+
+
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+
+
+
+
+
+ Message sent successfully! +
+
+ Nachricht erfolgreich versandt! +
+
+
+
+
+
+ + Thank you for your message. + + + We will get back to you shortly. + +
+
+ + Herzlichen Dank für Ihre Nachricht. + + + Wir werden uns schnellstmöglich um Ihr Anliegen kümmern. + +
+
+ +
+ +
+
+ You can safely close this window. +
+
+ Sie können dieses Fenster schließen. +
+
+
+
+
+ Your InfoCenter@FHTW Team +
+
+ Ihr InfoCenter@FHTW Team +
+
+
+
+
+
+
+

+ Fachhochschule Technikum Wien | University of Applied Sciences Technikum Wien +
Hoechstaedtplatz 6, 1200 Wien, AUSTRIA +
www.technikum-wien.at +

+
+
+
+
+
+
+
+ + +load->view("templates/FHC-Footer"); ?> diff --git a/application/views/system/messages/messageSent.php b/application/views/system/messages/messageSent.php index bf02b2367..674ccd5a0 100644 --- a/application/views/system/messages/messageSent.php +++ b/application/views/system/messages/messageSent.php @@ -1,107 +1,92 @@ load->view( - 'templates/FHC-Header', - array( - 'title' => 'MessageSent', - 'jquery' => true, - 'bootstrap' => true, - 'fontawesome' => true, - 'sbadmintemplate' => true, - 'customCSSs' => array('public/css/sbadmin2/admintemplate_contentonly.css', 'public/css/messaging/messageSent.css') - ) -); + $this->load->view( + 'templates/FHC-Header', + array( + 'title' => 'MessageSent', + 'jquery' => true, + 'bootstrap' => true, + 'fontawesome' => true, + 'sbadmintemplate' => true, + 'customCSSs' => array('public/css/sbadmin2/admintemplate_contentonly.css', 'public/css/messaging/messageSent.css') + ) + ); ?> + -
-
-
-
-
- +
+
+
+ + + +
+ +
+ +
+ +
+ +
+
-
- -
-
-
-
-
-
-
-
- Message sent successfully! + +
+
+ +
+
+
+
+ Message sent successfully! +
+
+ Nachricht erfolgreich versandt! +
-
- Nachricht erfolgreich versandt! +
+ +
+ +
+ +
+
+ You can safely close this window. +
+
+ Sie können dieses Fenster schließen. +
+ +
+
-
-
-
- - Thank you for your message. - - - We will get back to you shortly. - -
-
- - Herzlichen Dank für Ihre Nachricht. - - - Wir werden uns schnellstmöglich um Ihr Anliegen kümmern. - -
-
-
-
-
- You can safely close this window. -
-
- Sie können dieses Fenster schließen. -
-
-
-
-
- Your InfoCenter@FHTW Team -
-
- Ihr InfoCenter@FHTW Team -
-
-
-
-
-
-
+ +
+

Fachhochschule Technikum Wien | University of Applied Sciences Technikum Wien
Hoechstaedtplatz 6, 1200 Wien, AUSTRIA
www.technikum-wien.at

-
- +
+ + +
+
load->view("templates/FHC-Footer"); ?> diff --git a/application/views/system/messages/messageWriteReply.php b/application/views/system/messages/messageWriteReply.php index b520035ae..420b008be 100644 --- a/application/views/system/messages/messageWriteReply.php +++ b/application/views/system/messages/messageWriteReply.php @@ -9,81 +9,55 @@ $this->load->view( 'tinymce' => true, 'sbadmintemplate' => true, 'customCSSs' => array('public/css/sbadmin2/admintemplate_contentonly.css', 'public/css/messaging/messageWrite.css'), - 'customJSs' => array('public/js/bootstrapper.js') + 'customJSs' => array('public/js/bootstrapper.js', 'public/js/messaging/messageWriteReply.js') ) ); ?> - -
-
-
-
-
- + +
+
+
+
+
+ +
+
+ load->view('system/messages/messageForm.php'); + + for ($i = 0; $i < count($receivers); $i++) + { + $receiver = $receivers[$i]; + $receiverid = $receiver->person_id; + $fieldname = 'persons[]'; + + echo ''."\n"; + } + ?> + + + + + + + +
-
- load->view('system/messages/messageForm.php'); ?> - person_id; - $fieldname = 'persons[]'; - - echo ''."\n"; - } - ?> - - - - - - - -
-
- + load->view("templates/FHC-Footer"); ?> diff --git a/public/js/messaging/messageWriteReply.js b/public/js/messaging/messageWriteReply.js new file mode 100644 index 000000000..6343701d7 --- /dev/null +++ b/public/js/messaging/messageWriteReply.js @@ -0,0 +1,30 @@ +/** + * JS used by view system/messages/messageWriteReply + */ + +$(document).ready(function () +{ + tinymce.init({ + selector: "#bodyTextArea", + plugins: "autoresize", + autoresize_min_height: 150, + autoresize_max_height: 600, + autoresize_bottom_margin: 10, + auto_focus: "bodyTextArea" + }); + + if ($("#sendButton") && $("#sendForm")) + { + $("#sendButton").click(function () { + + if ($("#subject") && $("#subject").val() != '' && tinyMCE.get("bodyTextArea").getContent() != '') + { + $("#sendForm").submit(); + } + else + { + alert("Subject and text are required fields!"); + } + }); + } +});