mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-25 09:13:05 +08:00
Revert "Add office file to task step - reload file option shows plain html page [SCI-7673]"
This commit is contained in:
parent
e020b4a416
commit
dac150f75f
1 changed files with 4 additions and 14 deletions
|
@ -12,8 +12,8 @@
|
||||||
:data-gallery-view-id="stepId"
|
:data-gallery-view-id="stepId"
|
||||||
:data-preview-url="attachment.attributes.urls.preview"
|
:data-preview-url="attachment.attributes.urls.preview"
|
||||||
>
|
>
|
||||||
<span data-toggle="tooltip"
|
<span data-toggle="tooltip"
|
||||||
data-placement="bottom"
|
data-placement="bottom"
|
||||||
:title="`${ attachment.attributes.file_name }`">
|
:title="`${ attachment.attributes.file_name }`">
|
||||||
{{ attachment.attributes.file_name }}
|
{{ attachment.attributes.file_name }}
|
||||||
</span>
|
</span>
|
||||||
|
@ -44,8 +44,9 @@
|
||||||
<div v-else class="empty-office-file">
|
<div v-else class="empty-office-file">
|
||||||
<h2>{{ i18n.t('assets.empty_office_file.description') }}</h2>
|
<h2>{{ i18n.t('assets.empty_office_file.description') }}</h2>
|
||||||
<a :href="attachment.attributes.urls.load_asset"
|
<a :href="attachment.attributes.urls.load_asset"
|
||||||
|
remote="true"
|
||||||
class="btn btn-primary reload-asset"
|
class="btn btn-primary reload-asset"
|
||||||
@click.prevent="reloadAsset">
|
:params="{asset: {view_mode: attachment.attributes.view_mode}}">
|
||||||
{{ i18n.t('assets.empty_office_file.reload') }}
|
{{ i18n.t('assets.empty_office_file.reload') }}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -89,16 +90,5 @@
|
||||||
required: true
|
required: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
|
||||||
reloadAsset() {
|
|
||||||
$.ajax({
|
|
||||||
method: 'GET',
|
|
||||||
url: this.attachment.attributes.urls.load_asset,
|
|
||||||
data: {
|
|
||||||
asset: { view_mode: this.attachment.attributes.view_mode }
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in a new issue