mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-55770 core_message: remove the send message pop-up
Revert "MDL-48933 core_message: New dialog to send a message to a user" Revert "MDL-48933 core_message: Behat tests to cover messenger dialogs"
This commit is contained in:
parent
5bf0ff278a
commit
658d0b2fd7
16 changed files with 4 additions and 2261 deletions
|
@ -1972,41 +1972,6 @@ function message_count_unread_popup_notifications($useridto = 0) {
|
|||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Requires the JS libraries to send a message using a dialog.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function message_messenger_requirejs() {
|
||||
global $PAGE;
|
||||
|
||||
static $done = false;
|
||||
if ($done) {
|
||||
return;
|
||||
}
|
||||
|
||||
$PAGE->requires->yui_module(
|
||||
array('moodle-core_message-messenger'),
|
||||
'Y.M.core_message.messenger.init',
|
||||
array(array())
|
||||
);
|
||||
$PAGE->requires->strings_for_js(array(
|
||||
'errorwhilesendingmessage',
|
||||
'messagesent',
|
||||
'messagetosend',
|
||||
'sendingmessage',
|
||||
'sendmessage',
|
||||
'viewconversation',
|
||||
), 'core_message');
|
||||
$PAGE->requires->strings_for_js(array(
|
||||
'userisblockingyou',
|
||||
'userisblockingyounoncontact'
|
||||
), 'message');
|
||||
$PAGE->requires->string_for_js('error', 'core');
|
||||
|
||||
$done = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Requires the JS libraries for the toggle contact button.
|
||||
*
|
||||
|
@ -2024,29 +1989,6 @@ function message_togglecontact_requirejs() {
|
|||
$done = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the attributes to place on a link to open the 'Send message' dialog.
|
||||
*
|
||||
* @param object $user User object.
|
||||
* @return void
|
||||
*/
|
||||
function message_messenger_sendmessage_link_params($user) {
|
||||
$params = array(
|
||||
'data-trigger' => 'core_message-messenger::sendmessage',
|
||||
'data-fullname' => fullname($user),
|
||||
'data-userid' => $user->id,
|
||||
'role' => 'button'
|
||||
);
|
||||
|
||||
if (message_is_user_non_contact_blocked($user)) {
|
||||
$params['data-blocked-string'] = 'userisblockingyounoncontact';
|
||||
} else if (message_is_user_blocked($user)) {
|
||||
$params['data-blocked-string'] = 'userisblockingyou';
|
||||
}
|
||||
|
||||
return $params;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the attributes to place on a contact button.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue