"MDL-23375, fixed chat action links and beep sound"
This commit is contained in:
@@ -132,6 +132,9 @@ case 'update':
|
||||
if ($html = chat_format_message_theme($message, $chatuser->course, $USER, $theme)) {
|
||||
$message->mymessage = ($USER->id == $message->userid);
|
||||
$message->message = $html->html;
|
||||
if (!empty($html->type)) {
|
||||
$message->type = $html->type;
|
||||
}
|
||||
} else {
|
||||
unset($messages[$n]);
|
||||
}
|
||||
|
||||
@@ -177,7 +177,8 @@ M.mod_chat_ajax.init = function(Y, cfg) {
|
||||
}, this.cfg.timer, this);
|
||||
},
|
||||
|
||||
talkto : function (name) {
|
||||
talkto: function (e, name) {
|
||||
console.info(name);
|
||||
this.messageinput.set('value', "To "+name+": ");
|
||||
this.messageinput.focus();
|
||||
},
|
||||
@@ -241,8 +242,10 @@ M.mod_chat_ajax.init = function(Y, cfg) {
|
||||
li.all('td').item(1).append(Y.Node.create('<strong><a target="_blank" href="'+users[i].url+'">'+ users[i].name+'</a></strong>'));
|
||||
} else {
|
||||
li.all('td').item(1).append(Y.Node.create('<div><a target="_blank" href="'+users[i].url+'">'+users[i].name+'</a></div>'));
|
||||
var talk = Y.Node.create('<a href="###">'+M.str.chat.talk+'</a>').on('click', this.talkto, this, users[i].name);
|
||||
var beep = Y.Node.create('<a href="###">'+M.str.chat.beep+'</a>').on('click', this.send, this, users[i].id);
|
||||
var talk = Y.Node.create('<a href="###">'+M.str.chat.talk+'</a> ');
|
||||
talk.on('click', this.talkto, this, users[i].name);
|
||||
var beep = Y.Node.create('<a href="###">'+M.str.chat.beep+'</a>');
|
||||
beep.on('click', this.send, this, users[i].id);
|
||||
li.all('td').item(1).append(Y.Node.create('<div></div>').append(talk).append(beep));
|
||||
}
|
||||
list.append(li);
|
||||
|
||||
Reference in New Issue
Block a user