Fixes text type document insertion flow.
This commit is contained in:
parent
f68f3fafe8
commit
f9a9b7c115
|
@ -20,7 +20,8 @@
|
|||
v-if="form.document != undefined && form.document != null &&
|
||||
form.document_type != undefined && form.document_type != null &&
|
||||
form.document != '' && form.document_type != 'empty'"
|
||||
class="document-field-content">
|
||||
class="document-field-content"
|
||||
:class="'document-field-content--' + form.document_type">
|
||||
<div v-html="item.document_as_html" />
|
||||
<div class="document-buttons-row">
|
||||
<a
|
||||
|
@ -113,6 +114,10 @@ export default {
|
|||
.document-field-content {
|
||||
max-height: 32vh;
|
||||
|
||||
&.document-field-content--text {
|
||||
padding-bottom: 2rem;
|
||||
}
|
||||
|
||||
/deep/ img,
|
||||
/deep/ video,
|
||||
/deep/ figure {
|
||||
|
@ -134,6 +139,9 @@ export default {
|
|||
margin: 0;
|
||||
min-height: 150px;
|
||||
}
|
||||
/deep/ audio {
|
||||
min-height: 80px;
|
||||
}
|
||||
|
||||
@media screen and (max-height: 760px) {
|
||||
max-height: 25vh;
|
||||
|
|
|
@ -791,7 +791,7 @@ export default {
|
|||
attachmentsMediaFrame: undefined,
|
||||
fileMediaFrame: undefined,
|
||||
urlLink: '',
|
||||
textLink: '',
|
||||
textContent: '',
|
||||
isUpdatingValues: false,
|
||||
entityName: 'item',
|
||||
activeTab: 'metadata',
|
||||
|
@ -1382,6 +1382,9 @@ export default {
|
|||
|
||||
if (item.document_type != undefined && item.document_type == 'url')
|
||||
this.urlLink = item.document;
|
||||
|
||||
if (item.document_type != undefined && item.document_type == 'text')
|
||||
this.textContent = item.document;
|
||||
|
||||
if (item.document_options !== undefined && item.document_options['forced_iframe'] !== undefined)
|
||||
this.urlForcedIframe = item.document_options['forced_iframe'];
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
<button
|
||||
id="button-submit-text-content-writing"
|
||||
type="submit"
|
||||
@click.prevent="$parent.close();"
|
||||
@click.prevent="confirmTextWriting();$parent.close();"
|
||||
class="button is-success">
|
||||
{{ $i18n.get('save') }}</button>
|
||||
</div>
|
||||
|
@ -55,6 +55,11 @@ export default {
|
|||
this.$refs['item-document-text-input']['$el'].children[0].focus();
|
||||
this.$refs['item-document-text-input']['$el'].children[0].click();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
confirmTextWriting() {
|
||||
this.$emit('confirmTextWriting', this.localTextContent);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
Loading…
Reference in New Issue