1
0
Fork 0
mirror of https://github.com/Yetangitu/owncloud-apps.git synced 2025-10-02 14:49:17 +02:00

files_reader: v1.2.3

- (#76) typo plus some missing code kept Reader from being used to preview shared files
 - (#79) typo kept Reader from being used by default for CBx
 - (#82) missing setDefault kept actual style settings from being saved
This commit is contained in:
frankdelange 2018-02-25 00:09:49 +01:00
parent adf1b7561e
commit 50a41376c9
5 changed files with 16 additions and 5 deletions

View file

@ -135,7 +135,7 @@
if (oc_appconfig.filesReader.enableEpub === 'true')
fileActions.setDefault('application/epub+zip', 'view-epub');
if (oc_appconfig.filesReader.enableCbr === 'true')
if (oc_appconfig.filesReader.enableCbx === 'true')
fileActions.setDefault('application/x-cbr', 'view-cbr');
if (oc_appconfig.filesReader.enablePdf === 'true')
fileActions.setDefault('application/pdf', 'view-pdf');
@ -148,7 +148,11 @@ OC.Plugins.register('OCA.Files.FileList', OCA.Files_Reader.Plugin);
// FIXME: Hack for single public file view since it is not attached to the fileslist
$(document).ready(function(){
if ($('#isPublic').val() && ($('#mimetype').val() === 'application/epub+zip'|| $('#mimetype').val() === 'application/x-cbr)')) {
if ($('#isPublic').val()
&& ($('#mimetype').val() === 'application/epub+zip'
|| $('#mimetype').val() === 'application/pdf'
|| $('#mimetype').val() === 'application/x-cbr')
) {
var sharingToken = $('#sharingToken').val();
var downloadUrl = OC.generateUrl('/s/{token}/download', {token: sharingToken});
var viewer = OCA.Files_Reader.Plugin;