]> _ Git - fluidbook-toolbox.git/commitdiff
wip #5315 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 13 Jun 2022 08:35:18 +0000 (10:35 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 13 Jun 2022 08:35:18 +0000 (10:35 +0200)
app/Models/ELearningMedia.php

index f6e66386f3215b397a80a57c6a7a47cedfc2dbc9..0fb13c0eaa4fa5edea7af2801fcd84141e4ee5c9 100644 (file)
@@ -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);