From: Vincent Vanwaelscappel Date: Mon, 13 Jun 2022 08:35:18 +0000 (+0200) Subject: wip #5315 @0.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=c1014674427095ba135e9ea7c32c06e01a8172f8;p=fluidbook-toolbox.git wip #5315 @0.5 --- diff --git a/app/Models/ELearningMedia.php b/app/Models/ELearningMedia.php index f6e66386f..0fb13c0ea 100644 --- a/app/Models/ELearningMedia.php +++ b/app/Models/ELearningMedia.php @@ -103,19 +103,15 @@ class ELearningMedia extends ToolboxModel $vdir->copyDirectory(resource_path('elearningmedia/dist/js'), 'js'); if ($type === 'pdf') { $vdir->copyDirectory(resource_path('pdfjs-legacy-min'), 'pdfjs'); - $css = file_get_contents(resource_path('pdfjs/web/viewer.css')); + $css = file_get_contents(resource_path('pdfjs-legacy-min/web/viewer.css')); $css .= 'body{--sidebar-width:400px;}'; - $css .= '.article #sidebarContainer, .article .toolbar {display:none !important;}'; - $css .= '.article .pdfViewer{padding:0 !important;}'; - $css .= '.article #viewerContainer{top:0 !important;overflow:visible !important;}'; - $css .= '.article{--page-border:0;--page-margin:0;--body-bg-color:transparent;}'; - $css .= '.openFile,.rotateCw,.rotateCcw,.rotateCcw + .horizontalToolbarSeparator{display:none !important;}'; - $css .= '.bookmark,.print,.download{display:none !important}'; + $css .= '#openFile,#pageRotateCw,#pageRotateCcw,#pageRotateCcw + .horizontalToolbarSeparator{display:none !important;}'; + $css .= '#viewBookmark,#print,#download{display:none !important}'; $css .= '#viewLayers,#viewAttachments{display:none !important}'; - $css .= '#documentProperties,#cursorSelectTool,#cursorHandTool,#cursorHandTool + .horizontalToolbarSeparator,.horizontalToolbarSeparator.spreadModeButtons{display:none !important}'; - $popup = '.annotationLayer .popupAnnotation .popupWrapper .popup'; - $css .= $popup . ' h1,' . $popup . ' span{display:none !important;}'; - $css .= $popup . ' p{border:0 !important;margin-top:0 !important;}'; + $css .= '#documentProperties,#cursorSelectTool,#cursorHandTool,#cursorHandTool + .horizontalToolbarSeparator,.horizontalToolbarSeparator.spreadModeButtons,#cursorToolButtons+.horizontalToolbarSeparator{display:none !important}'; +// $popup = '.annotationLayer .popupAnnotation .popupWrapper .popup'; +// $css .= $popup . ' h1,' . $popup . ' span{display:none !important;}'; +// $css .= $popup . ' p{border:0 !important;margin-top:0 !important;}'; $vdir->file_put_contents('pdfjs/web/viewer.css', $css); } $vdir->copy($file, 'media.' . $ext);