mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 13:54:23 +00:00
Accompanying course evaluation documents: disable the WOPI edit link if mimetype not supported
This commit is contained in:
parent
248e4e93ed
commit
89064f55a1
@ -113,9 +113,8 @@
|
|||||||
:storedObject="d.storedObject"
|
:storedObject="d.storedObject"
|
||||||
>
|
>
|
||||||
</add-async-upload-downloader>
|
</add-async-upload-downloader>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li v-if="canEditDocument(d)">
|
||||||
<a :href="buildEditLink(d.storedObject)" class="btn btn-wopilink"></a>
|
<a :href="buildEditLink(d.storedObject)" class="btn btn-wopilink"></a>
|
||||||
</li>
|
</li>
|
||||||
<li v-if="d.workflows.length === 0">
|
<li v-if="d.workflows.length === 0">
|
||||||
@ -220,7 +219,79 @@ export default {
|
|||||||
maxFiles: 1,
|
maxFiles: 1,
|
||||||
maxPostSize: 15000000,
|
maxPostSize: 15000000,
|
||||||
required: false,
|
required: false,
|
||||||
}
|
},
|
||||||
|
mime: [
|
||||||
|
// TODO temporary hardcoded. to be replaced by twig extension or a collabora server query
|
||||||
|
'application/clarisworks',
|
||||||
|
'application/coreldraw',
|
||||||
|
'application/macwriteii',
|
||||||
|
'application/msword',
|
||||||
|
'application/vnd.lotus-1-2-3',
|
||||||
|
'application/vnd.ms-excel',
|
||||||
|
'application/vnd.ms-excel.sheet.binary.macroEnabled.12',
|
||||||
|
'application/vnd.ms-excel.sheet.macroEnabled.12',
|
||||||
|
'application/vnd.ms-excel.template.macroEnabled.12',
|
||||||
|
'application/vnd.ms-powerpoint',
|
||||||
|
'application/vnd.ms-powerpoint.presentation.macroEnabled.12',
|
||||||
|
'application/vnd.ms-powerpoint.template.macroEnabled.12',
|
||||||
|
'application/vnd.ms-visio.drawing',
|
||||||
|
'application/vnd.ms-word.document.macroEnabled.12',
|
||||||
|
'application/vnd.ms-word.template.macroEnabled.12',
|
||||||
|
'application/vnd.ms-works',
|
||||||
|
'application/vnd.oasis.opendocument.chart',
|
||||||
|
'application/vnd.oasis.opendocument.formula',
|
||||||
|
'application/vnd.oasis.opendocument.graphics',
|
||||||
|
'application/vnd.oasis.opendocument.graphics-flat-xml',
|
||||||
|
'application/vnd.oasis.opendocument.graphics-template',
|
||||||
|
'application/vnd.oasis.opendocument.presentation',
|
||||||
|
'application/vnd.oasis.opendocument.presentation-flat-xml',
|
||||||
|
'application/vnd.oasis.opendocument.presentation-template',
|
||||||
|
'application/vnd.oasis.opendocument.spreadsheet',
|
||||||
|
'application/vnd.oasis.opendocument.spreadsheet-flat-xml',
|
||||||
|
'application/vnd.oasis.opendocument.spreadsheet-template',
|
||||||
|
'application/vnd.oasis.opendocument.text',
|
||||||
|
'application/vnd.oasis.opendocument.text-flat-xml',
|
||||||
|
'application/vnd.oasis.opendocument.text-master',
|
||||||
|
'application/vnd.oasis.opendocument.text-master-template',
|
||||||
|
'application/vnd.oasis.opendocument.text-template',
|
||||||
|
'application/vnd.oasis.opendocument.text-web',
|
||||||
|
'application/vnd.openxmlformats-officedocument.presentationml.presentation',
|
||||||
|
'application/vnd.openxmlformats-officedocument.presentationml.slideshow',
|
||||||
|
'application/vnd.openxmlformats-officedocument.presentationml.template',
|
||||||
|
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
||||||
|
'application/vnd.openxmlformats-officedocument.spreadsheetml.template',
|
||||||
|
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
||||||
|
'application/vnd.openxmlformats-officedocument.wordprocessingml.template',
|
||||||
|
'application/vnd.sun.xml.calc',
|
||||||
|
'application/vnd.sun.xml.calc.template',
|
||||||
|
'application/vnd.sun.xml.chart',
|
||||||
|
'application/vnd.sun.xml.draw',
|
||||||
|
'application/vnd.sun.xml.draw.template',
|
||||||
|
'application/vnd.sun.xml.impress',
|
||||||
|
'application/vnd.sun.xml.impress.template',
|
||||||
|
'application/vnd.sun.xml.math',
|
||||||
|
'application/vnd.sun.xml.writer',
|
||||||
|
'application/vnd.sun.xml.writer.global',
|
||||||
|
'application/vnd.sun.xml.writer.template',
|
||||||
|
'application/vnd.visio',
|
||||||
|
'application/vnd.visio2013',
|
||||||
|
'application/vnd.wordperfect',
|
||||||
|
'application/x-abiword',
|
||||||
|
'application/x-aportisdoc',
|
||||||
|
'application/x-dbase',
|
||||||
|
'application/x-dif-document',
|
||||||
|
'application/x-fictionbook+xml',
|
||||||
|
'application/x-gnumeric',
|
||||||
|
'application/x-hwp',
|
||||||
|
'application/x-iwork-keynote-sffkey',
|
||||||
|
'application/x-iwork-numbers-sffnumbers',
|
||||||
|
'application/x-iwork-pages-sffpages',
|
||||||
|
'application/x-mspublisher',
|
||||||
|
'application/x-mswrite',
|
||||||
|
'application/x-pagemaker',
|
||||||
|
'application/x-sony-bbeb',
|
||||||
|
'application/x-t602',
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -268,6 +339,11 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
ISOToDatetime,
|
ISOToDatetime,
|
||||||
|
canEditDocument(document) {
|
||||||
|
console.log(document);
|
||||||
|
return 'storedObject' in document ?
|
||||||
|
this.mime.includes(document.storedObject.type) : false;
|
||||||
|
},
|
||||||
listAllStatus() {
|
listAllStatus() {
|
||||||
console.log('load all status');
|
console.log('load all status');
|
||||||
let url = `/api/`;
|
let url = `/api/`;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user