No need to override ChatBoxView with MUC-specific method
This commit is contained in:
parent
2fa39f2150
commit
6618d694b1
@ -126,19 +126,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
ChatBoxView: {
|
|
||||||
clearChatRoomMessages: function (ev) {
|
|
||||||
/* New method added to the ChatBox model which allows all
|
|
||||||
* messages in a chatroom to be cleared.
|
|
||||||
*/
|
|
||||||
if (typeof ev !== "undefined") { ev.stopPropagation(); }
|
|
||||||
var result = confirm(__("Are you sure you want to clear the messages from this room?"));
|
|
||||||
if (result === true) {
|
|
||||||
this.$content.empty();
|
|
||||||
}
|
|
||||||
return this;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
ChatBoxes: {
|
ChatBoxes: {
|
||||||
registerMessageHandler: function () {
|
registerMessageHandler: function () {
|
||||||
@ -422,6 +409,15 @@
|
|||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
clearChatRoomMessages: function (ev) {
|
||||||
|
if (typeof ev !== "undefined") { ev.stopPropagation(); }
|
||||||
|
var result = confirm(__("Are you sure you want to clear the messages from this room?"));
|
||||||
|
if (result === true) {
|
||||||
|
this.$content.empty();
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
},
|
||||||
|
|
||||||
onChatRoomMessageSubmitted: function (text) {
|
onChatRoomMessageSubmitted: function (text) {
|
||||||
/* Gets called when the user presses enter to send off a
|
/* Gets called when the user presses enter to send off a
|
||||||
* message in a chat room.
|
* message in a chat room.
|
||||||
|
Loading…
Reference in New Issue
Block a user