Added lightbox

This commit is contained in:
Pierre
2017-06-26 15:36:29 +02:00
parent 99aa07ed5e
commit ae4ab7a825
11 changed files with 699 additions and 3 deletions

View File

@ -794,12 +794,29 @@ ComunicWeb.components.conversations.chatWindows = {
//Check if an image has to be added
if(messageInfos.image_path != null){
createElem2({
//Image link
var imageLink = createElem2({
appendTo: messageTargetElem,
type:"a",
href: messageInfos.image_path,
});
//Image element
createElem2({
appendTo: imageLink,
type: "img",
src: messageInfos.image_path,
class: "conversation-msg-image"
});
//Enable lightbox
imageLink.onclick = function(){
$(this).ekkoLightbox({
alwaysShowClose: true,
});
return false;
}
}
//Parse emojies in text message