|
|
|
@ -66,7 +66,7 @@ const alertModal = (title, message) => {
|
|
|
|
|
/** |
|
|
|
|
* HABILITA O ENVIO DE ARQUIVO DE IMAGENS E APRESENTA UMA MODAL PARA APRESENTAÇÃO DA IMAGEM SELECIONADA |
|
|
|
|
*/ |
|
|
|
|
const startSendImage = () => { |
|
|
|
|
const startSendImage = () => { |
|
|
|
|
modalStart() |
|
|
|
|
$("#uploadimage").on('change', function(){ |
|
|
|
|
const file = new FileReader(); |
|
|
|
@ -86,6 +86,16 @@ const alertModal = (title, message) => {
|
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* HABILITA O ENVIO DE ARQUIVO DE IMAGENS E APRESENTA UMA MODAL PARA APRESENTAÇÃO DA IMAGEM SELECIONADA |
|
|
|
|
*/ |
|
|
|
|
const openImgModal = (link) => { |
|
|
|
|
modalStart() |
|
|
|
|
$('#myImg').remove() |
|
|
|
|
$('.modal-content-body').append(`<img id="myImg" src="${link}" >`) |
|
|
|
|
$('#modalselect').show() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const startSendFile = () => { |
|
|
|
|
modalStart() |
|
|
|
|
$("#uploadfile").on('change', function(){ |
|
|
|
@ -319,14 +329,10 @@ function recorderVoice () {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if(obj.type == 'image' || obj.type == 'sticker'){ |
|
|
|
|
console.log(obj) |
|
|
|
|
$('.chat-window').append(` |
|
|
|
|
<div class="${obj.from}"> |
|
|
|
|
<span class="${obj.from}-message message-column"> |
|
|
|
|
<a href="${fileDownload}" target="_blank"> |
|
|
|
|
<img src="${fileDownload}" style="max-width: 200px; max-height: 150px"> |
|
|
|
|
</a> |
|
|
|
|
<br/> |
|
|
|
|
<img src="${fileDownload}" style="max-width: 200px; max-height: 150px" onclick="openImgModal('${fileDownload}')" > |
|
|
|
|
</span> |
|
|
|
|
<span class="message-time">${converdata(Date.now())}</span> |
|
|
|
|
</div>`) |
|
|
|
|