From 3aa3cf3d219c02354504c88c80189f64a746cc5c Mon Sep 17 00:00:00 2001 From: moodler Date: Mon, 27 Aug 2007 03:22:16 +0000 Subject: [PATCH] Some tweaks to the appearance of messaging window --- lang/en_utf8/message.php | 1 + message/discussion.php | 4 ++-- message/lib.php | 6 +++--- message/send.php | 12 +++++++++--- theme/standard/styles_layout.css | 6 +++++- 5 files changed, 20 insertions(+), 9 deletions(-) diff --git a/lang/en_utf8/message.php b/lang/en_utf8/message.php index 40ed225b737..696dfff8006 100644 --- a/lang/en_utf8/message.php +++ b/lang/en_utf8/message.php @@ -28,6 +28,7 @@ $string['incomingcontacts'] = 'Incoming Contacts ($a)'; $string['keywords'] = 'Keywords'; $string['keywordssearchresults'] = 'Search results: $a messages found'; $string['maxmessages'] = 'Maximum number of messages to show in the discussion history'; +$string['mailsent'] = 'Your message was sent via email.'; $string['message'] = 'Message'; $string['messagehistory'] = 'Message History'; $string['messages'] = 'Messages'; diff --git a/message/discussion.php b/message/discussion.php index d64a36f1702..c52c41cbc9f 100644 --- a/message/discussion.php +++ b/message/discussion.php @@ -35,7 +35,7 @@ <?php echo get_string('discussion', 'message').': '.fullname($user) ?> - + <body><?php echo '<a href="discussion.php?id='.$userid.'&amp;noframesjs=1">'.get_string('noframesjs', 'message').'<a/>'; ?></body> @@ -290,4 +290,4 @@ echo ''; print_footer('none'); -?> \ No newline at end of file +?> diff --git a/message/lib.php b/message/lib.php index dd94482721a..e134fe03ef1 100644 --- a/message/lib.php +++ b/message/lib.php @@ -1022,9 +1022,9 @@ function message_post_message($userfrom, $userto, $message, $format, $messagetyp if (!empty($preference->message_emailaddress)) { $userto->email = $preference->message_emailaddress; // Use custom messaging address } - email_to_user($userto, $userfrom, $messagesubject, $messagetext, $messagehtml); - debugging('Mail was sent', DEBUG_NORMAL); - echo "mail was sent"; + if (email_to_user($userto, $userfrom, $messagesubject, $messagetext, $messagehtml)) { + $CFG->messagewasjustemailed = true; + } sleep(3); } } diff --git a/message/send.php b/message/send.php index afe3fb2147c..522a5901a49 100644 --- a/message/send.php +++ b/message/send.php @@ -85,28 +85,34 @@ add_to_log(SITEID, 'message', 'write', 'history.php?user1='.$user->id.'&user2='.$USER->id.'#m'.$messageid, $user->id); } - echo ''; + echo ' '; echo ''; echo '
'; echo '
'; + echo '
'; echo ''; echo ''; $usehtmleditor = (can_use_html_editor() && get_user_preferences('message_usehtmleditor', 0)); if ($usehtmleditor) { echo '
'; - print_textarea($usehtmleditor, 8, 34, 0, 0, 'message', ''); + print_textarea($usehtmleditor, 7, 34, 0, 0, 'message', ''); echo '
'; + echo ''; use_html_editor('message', 'formatblock subscript superscript copy cut paste clean undo redo justifyleft justifycenter justifyright justifyfull lefttoright righttoleft insertorderedlist insertunorderedlist outdent indent inserthorizontalrule createanchor nolink inserttable'); echo ''; } else { print_textarea(false, 5, 34, 0, 0, 'message', ''); echo ''; + echo '
'; } - echo '
'; + echo '
'; echo '
'; + if (!empty($CFG->messagewasjustemailed)) { + notify(get_string('mailsent', 'message'), 'notifysuccess'); + } echo ''; echo '
'; diff --git a/theme/standard/styles_layout.css b/theme/standard/styles_layout.css index b687a302d55..8d5ea60d358 100644 --- a/theme/standard/styles_layout.css +++ b/theme/standard/styles_layout.css @@ -2455,6 +2455,10 @@ body#message-messages { padding:10px; } +body#message-send .notifysuccess { + padding:1px; +} + /*** *** Notes ***/ @@ -4041,4 +4045,4 @@ wikiadminactions { background: #eee; border: 1px dashed #ddd; padding: 3px; -} \ No newline at end of file +}