mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 12:40:01 +01:00
MDL-46633 chat: Chat send button gets stuck
This commit is contained in:
parent
e609e6cf02
commit
b12c3878a7
@ -140,25 +140,27 @@ M.mod_chat_ajax.init = function(Y, cfg) {
|
||||
},
|
||||
|
||||
send : function(e, beep) {
|
||||
this.sendbutton.set('value', M.str.chat.sending);
|
||||
var data = {
|
||||
chat_message : (!beep) ? this.messageinput.get('value') : '',
|
||||
chat_sid : this.cfg.sid,
|
||||
theme : this.cfg.theme
|
||||
};
|
||||
if (beep) {
|
||||
data.beep = beep
|
||||
}
|
||||
data.action = 'chat';
|
||||
if((this.messageinput.get('value') != '') || (typeof beep != 'undefined')) {
|
||||
this.sendbutton.set('value', M.str.chat.sending);
|
||||
var data = {
|
||||
chat_message : (!beep) ? this.messageinput.get('value') : '',
|
||||
chat_sid : this.cfg.sid,
|
||||
theme : this.cfg.theme
|
||||
};
|
||||
if (beep) {
|
||||
data.beep = beep
|
||||
}
|
||||
data.action = 'chat';
|
||||
|
||||
Y.io(this.api, {
|
||||
method : 'POST',
|
||||
data : build_querystring(data),
|
||||
on : {
|
||||
success : this.send_callback
|
||||
},
|
||||
context : this
|
||||
});
|
||||
Y.io(this.api, {
|
||||
method : 'POST',
|
||||
data : build_querystring(data),
|
||||
on : {
|
||||
success : this.send_callback
|
||||
},
|
||||
context : this
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
send_callback : function(tid, outcome, args) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user