mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-31 04:32:06 +08:00
Result page fixes [SCI-9731]
This commit is contained in:
parent
76e4dfc49d
commit
9be17cfaf3
2 changed files with 12 additions and 2 deletions
|
@ -34,7 +34,7 @@
|
|||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="result-toolbar__right flex items-center" @click="$emit('expandAll')">
|
||||
<div class="result-toolbar__right flex items-center">
|
||||
<button class="btn btn-secondary mr-3" @click="collapseResults" tabindex="0">
|
||||
{{ i18n.t('my_modules.results.collapse_label') }}
|
||||
</button>
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
@editingDisabled="disableEditMode"
|
||||
@editingEnabled="enableEditMode"
|
||||
/>
|
||||
<div class="view-text-element" v-else-if="element.attributes.orderable.text_view" v-html="element.attributes.orderable.text_view"></div>
|
||||
<div class="view-text-element" v-else-if="element.attributes.orderable.text_view" v-html="wrapTables"></div>
|
||||
<div v-else class="text-sn-grey">
|
||||
{{ i18n.t("protocols.steps.text.empty_text") }}
|
||||
</div>
|
||||
|
@ -112,6 +112,16 @@
|
|||
})
|
||||
},
|
||||
computed: {
|
||||
wrapTables() {
|
||||
const container = $(`<span>${this.element.attributes.orderable.text_view}</span>`);
|
||||
container.find('table').toArray().forEach((table) => {
|
||||
if ($(table).parent().hasClass('table-wrapper')) return;
|
||||
$(table).css('float', 'none').wrapAll(`
|
||||
<div class="table-wrapper" style="overflow: auto; width: 100%"></div>
|
||||
`);
|
||||
});
|
||||
return container.prop('outerHTML');
|
||||
},
|
||||
actionMenu() {
|
||||
let menu = [];
|
||||
if (this.element.attributes.orderable.urls.update_url) {
|
||||
|
|
Loading…
Reference in a new issue