mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 01:16:44 +02:00
MDL-49802 core_message: Prevent message being sent twice in messenger
This commit is contained in:
parent
24a2babdd3
commit
913784114d
4 changed files with 7 additions and 10 deletions
|
@ -351,19 +351,18 @@ Y.namespace('M.core_message.messenger').sendMessage = Y.extend(SENDMSGDIALOG, M.
|
||||||
|
|
||||||
// Hide the dialog.
|
// Hide the dialog.
|
||||||
Y.later(1300, this, function() {
|
Y.later(1300, this, function() {
|
||||||
|
this.setSendLock(false);
|
||||||
this.hideNotice();
|
this.hideNotice();
|
||||||
this.hide();
|
this.hide();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
failure: function() {
|
failure: function() {
|
||||||
|
this.setSendLock(false);
|
||||||
this.hideNotice();
|
this.hideNotice();
|
||||||
new M.core.alert({
|
new M.core.alert({
|
||||||
title: M.util.get_string('error', 'core'),
|
title: M.util.get_string('error', 'core'),
|
||||||
message: M.util.get_string('errorwhilesendingmessage', 'core_message')
|
message: M.util.get_string('errorwhilesendingmessage', 'core_message')
|
||||||
});
|
});
|
||||||
},
|
|
||||||
complete: function() {
|
|
||||||
this.setSendLock(false);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
context: this
|
context: this
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -351,19 +351,18 @@ Y.namespace('M.core_message.messenger').sendMessage = Y.extend(SENDMSGDIALOG, M.
|
||||||
|
|
||||||
// Hide the dialog.
|
// Hide the dialog.
|
||||||
Y.later(1300, this, function() {
|
Y.later(1300, this, function() {
|
||||||
|
this.setSendLock(false);
|
||||||
this.hideNotice();
|
this.hideNotice();
|
||||||
this.hide();
|
this.hide();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
failure: function() {
|
failure: function() {
|
||||||
|
this.setSendLock(false);
|
||||||
this.hideNotice();
|
this.hideNotice();
|
||||||
new M.core.alert({
|
new M.core.alert({
|
||||||
title: M.util.get_string('error', 'core'),
|
title: M.util.get_string('error', 'core'),
|
||||||
message: M.util.get_string('errorwhilesendingmessage', 'core_message')
|
message: M.util.get_string('errorwhilesendingmessage', 'core_message')
|
||||||
});
|
});
|
||||||
},
|
|
||||||
complete: function() {
|
|
||||||
this.setSendLock(false);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
context: this
|
context: this
|
||||||
|
|
5
message/yui/src/messenger/js/sendmessage.js
vendored
5
message/yui/src/messenger/js/sendmessage.js
vendored
|
@ -186,19 +186,18 @@ Y.namespace('M.core_message.messenger').sendMessage = Y.extend(SENDMSGDIALOG, M.
|
||||||
|
|
||||||
// Hide the dialog.
|
// Hide the dialog.
|
||||||
Y.later(1300, this, function() {
|
Y.later(1300, this, function() {
|
||||||
|
this.setSendLock(false);
|
||||||
this.hideNotice();
|
this.hideNotice();
|
||||||
this.hide();
|
this.hide();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
failure: function() {
|
failure: function() {
|
||||||
|
this.setSendLock(false);
|
||||||
this.hideNotice();
|
this.hideNotice();
|
||||||
new M.core.alert({
|
new M.core.alert({
|
||||||
title: M.util.get_string('error', 'core'),
|
title: M.util.get_string('error', 'core'),
|
||||||
message: M.util.get_string('errorwhilesendingmessage', 'core_message')
|
message: M.util.get_string('errorwhilesendingmessage', 'core_message')
|
||||||
});
|
});
|
||||||
},
|
|
||||||
complete: function() {
|
|
||||||
this.setSendLock(false);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
context: this
|
context: this
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue