mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-25 21:39:21 +00:00
Can request message content update
This commit is contained in:
parent
ba2c21bf54
commit
417b8a6600
@ -968,25 +968,28 @@ const ConvChatWindow = {
|
||||
//Add message options
|
||||
if(userIsPoster){
|
||||
|
||||
//Update message content
|
||||
var updateLi = createElem2({
|
||||
type: "li",
|
||||
appendTo: dropdownMenu
|
||||
});
|
||||
|
||||
var updateLink = createElem2({
|
||||
type: "a",
|
||||
appendTo: updateLi,
|
||||
innerHTML: "Edit"
|
||||
});
|
||||
|
||||
updateLink.addEventListener("click", function(){
|
||||
ComunicWeb.components.conversations.messageEditor.open(message, function(newContent){
|
||||
/*
|
||||
DEPRECATED WITH WEBSOCKETS
|
||||
*/
|
||||
if (message.file == null)
|
||||
{
|
||||
//Update message content
|
||||
var updateLi = createElem2({
|
||||
type: "li",
|
||||
appendTo: dropdownMenu
|
||||
});
|
||||
});
|
||||
|
||||
var updateLink = createElem2({
|
||||
type: "a",
|
||||
appendTo: updateLi,
|
||||
innerHTML: "Edit"
|
||||
});
|
||||
|
||||
updateLink.addEventListener("click", function(){
|
||||
ComunicWeb.components.conversations.messageEditor.open(message, function(newContent){
|
||||
/*
|
||||
DEPRECATED WITH WEBSOCKETS
|
||||
*/
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -27,7 +27,7 @@ ComunicWeb.components.conversations.messageEditor = {
|
||||
|
||||
//Intend to update message content
|
||||
ComunicWeb.components.conversations.interface.UpdateSingleMessage(
|
||||
message.ID,
|
||||
message.id,
|
||||
content,
|
||||
|
||||
function(result){
|
||||
|
Loading…
Reference in New Issue
Block a user