Minor: Format code - refs BT#21615

pull/5476/head
Angel Fernando Quiroz Campos 7 months ago
parent 764d93aef3
commit 197b7c153e
  1. 56
      assets/vue/views/message/MessageCreate.vue

@ -1,19 +1,20 @@
<template>
<!-- :handle-submit="onSendMessageForm"-->
<MessageForm
v-model:attachments="attachments"
:values="item"
>
<!-- @input="v$.item.receiversTo.$touch()"-->
<div
v-if="sendToUser"
class="field"
>
<span v-t="'To'" />
<BaseUserAvatar :image-url="sendToUser.illustrationUrl" :alt="t('Picture')" />
<BaseUserAvatar
:image-url="sendToUser.illustrationUrl"
:alt="t('Picture')"
/>
<span v-text="sendToUser.fullName" />
</div>
<BaseAutocomplete
v-else
id="to"
@ -141,53 +142,6 @@ const onSubmit = async () => {
})
}
const browser = (callback, value, meta) => {
let url = "/resources/personal_files/"
if (meta.filetype === "image") {
url = url + "&type=images"
} else {
url = url + "&type=files"
}
window.addEventListener("message", function (event) {
var data = event.data
if (data.url) {
url = data.url
console.log(meta) // {filetype: "image", fieldname: "src"}
callback(url)
}
})
tinymce.activeEditor.windowManager.openUrl(
{
url: url,
title: "file manager",
},
{
oninsert: function (file, fm) {
var url, reg, info
url = fm.convAbsUrl(file.url)
info = file.name + " (" + fm.formatSize(file.size) + ")"
if (meta.filetype === "file") {
callback(url, { text: info, title: info })
}
if (meta.filetype === "image") {
callback(url, { alt: info })
}
if (meta.filetype === "media") {
callback(url)
}
},
},
)
}
const isLoadingUser = ref(false)
const sendToUser = ref()

Loading…
Cancel
Save