MDL-54687 core_message: removed unused function and data attribute

This commit is contained in:
Mark Nelson 2016-08-11 19:08:34 +08:00
parent 358717d59e
commit 6d3445de77
3 changed files with 1 additions and 13 deletions

View file

@ -152,15 +152,6 @@ define(['jquery', 'core_message/message_area_contacts', 'core_message/message_ar
return this.node.find(selector);
};
/**
* Returns the ID of the logged in user.
*
* @returns {int} The user id
*/
Messagearea.prototype.getLoggedInUserId = function() {
return this.node.data('loggedinuserid');
};
/**
* Returns the ID of the user whose message area we are viewing.
*

View file

@ -65,10 +65,7 @@ class message_area implements templatable, renderable {
}
public function export_for_template(\renderer_base $output) {
global $USER;
$data = new \stdClass();
$data->loggedinuserid = $USER->id;
$data->userid = $this->userid;
$data->contacts = $this->contacts->export_for_template($output);
if ($this->messages) {

View file

@ -1,4 +1,4 @@
<div class="messaging-area-container" data-loggedinuserid="{{loggedinuserid}}" data-userid="{{userid}}">
<div class="messaging-area-container" data-userid="{{userid}}">
<div class="messaging-area">
<div class="row-fluid">
<div class="span3 contacts-area" data-region="contacts-area" role="tablist">