]> _ Git - fluidbook-toolbox.git/commitdiff
wip #5399 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 23 Aug 2022 07:31:00 +0000 (09:31 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 23 Aug 2022 07:31:00 +0000 (09:31 +0200)
28 files changed:
app/Fluidbook/SEO/Document.php
app/Jobs/FluidbookCompiler.php
resources/fluidbookpublication/sounds/classic/corner-drag.mp3 [new file with mode: 0644]
resources/fluidbookpublication/sounds/classic/corner-release.mp3 [new file with mode: 0644]
resources/fluidbookpublication/sounds/classic/cover-flip.mp3 [new file with mode: 0644]
resources/fluidbookpublication/sounds/classic/page-flip-1.mp3 [new file with mode: 0644]
resources/fluidbookpublication/sounds/classic/page-flip-2.mp3 [new file with mode: 0644]
resources/fluidbookpublication/sounds/corner-drag.mp3 [new file with mode: 0644]
resources/fluidbookpublication/sounds/corner-release.mp3 [new file with mode: 0644]
resources/fluidbookpublication/sounds/cover-flip.mp3 [new file with mode: 0644]
resources/fluidbookpublication/sounds/heavy/corner-drag.mp3 [new file with mode: 0644]
resources/fluidbookpublication/sounds/heavy/corner-release.mp3 [new file with mode: 0644]
resources/fluidbookpublication/sounds/heavy/cover-flip.mp3 [new file with mode: 0644]
resources/fluidbookpublication/sounds/heavy/page-flip-1.mp3 [new file with mode: 0644]
resources/fluidbookpublication/sounds/heavy/page-flip-2.mp3 [new file with mode: 0644]
resources/fluidbookpublication/sounds/light/corner-drag.mp3 [new file with mode: 0644]
resources/fluidbookpublication/sounds/light/corner-release.mp3 [new file with mode: 0644]
resources/fluidbookpublication/sounds/light/cover-flip.mp3 [new file with mode: 0644]
resources/fluidbookpublication/sounds/light/page-flip-1.mp3 [new file with mode: 0644]
resources/fluidbookpublication/sounds/light/page-flip-2.mp3 [new file with mode: 0644]
resources/fluidbookpublication/sounds/page-flip-1.mp3 [new file with mode: 0644]
resources/fluidbookpublication/sounds/page-flip-2.mp3 [new file with mode: 0644]
resources/fluidbookpublication/sounds/silent/corner-drag.mp3 [new file with mode: 0644]
resources/fluidbookpublication/sounds/silent/corner-release.mp3 [new file with mode: 0644]
resources/fluidbookpublication/sounds/silent/cover-flip.mp3 [new file with mode: 0644]
resources/fluidbookpublication/sounds/silent/page-flip-1.mp3 [new file with mode: 0644]
resources/fluidbookpublication/sounds/silent/page-flip-2.mp3 [new file with mode: 0644]
resources/fluidbookpublication/sounds/woosh/flip.mp3 [new file with mode: 0644]

index a6c274cc6ec1bf3b868a2c11cea3cb69ef3f0f78..a1767027be69acccc89ceea07ddd666d85f14704 100644 (file)
@@ -126,15 +126,14 @@ class Document
     public function _getPageLabel($page)
     {
         $res = $this->compiler->getSetting('title');
-        dd($this->compiler->getSetting('chapters'));
-        foreach ($this->compiler->getSetting('chapters') as $chapter) {
-            if (trim($chapter->label, "\t\r\n\0\x0B-+") == '') {
+        foreach ($this->compiler->getFluidbook()->chapters as $chapter) {
+            if (trim($chapter['label'], "\t\r\n\0\x0B-+") == '') {
                 continue;
             }
-            if ($chapter->page == '') {
+            if ($chapter['page'] == '') {
                 continue;
             }
-            $p = $this->compiler->virtualToPhysical($chapter->page);
+            $p = $this->compiler->virtualToPhysical($chapter['page']);
             if ($p == '') {
                 continue;
             }
@@ -142,7 +141,7 @@ class Document
                 continue;
             }
             if ($page >= $p) {
-                $res = $chapter->label;
+                $res = $chapter['label'];
             }
         }
         return $res;
index d5baadb095501edca8a74b565e9855b44fbca22c..0f2c9470682c9c4ae87318a05e5cac0a4e8950b4 100644 (file)
@@ -1451,13 +1451,17 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
         }
     }
 
+    /**
+     * @throws \Exception
+     */
     protected function writeSounds()
     {
         if ($this->fluidbookSettings->soundTheme == '') {
             return;
         }
-        $this->config->simpleSoundTheme = file_exists(WS_SOUNDS . '/' . $this->fluidbookSettings->soundTheme . '/flip.mp3');
-        $this->vdir->copyDirectory(WS_SOUNDS . '/' . $this->fluidbookSettings->soundTheme, 'data/sounds');
+        $dir = resource_path('fluidbookpublication/sounds/' . $this->fluidbookSettings->soundTheme);
+        $this->setSetting('simpleSoundTheme', file_exists($dir . '/flip.mp3'));
+        $this->vdir->copyDirectory($dir, 'data/sounds');
     }
 
     protected function writeAccessibility()
diff --git a/resources/fluidbookpublication/sounds/classic/corner-drag.mp3 b/resources/fluidbookpublication/sounds/classic/corner-drag.mp3
new file mode 100644 (file)
index 0000000..aa48cb8
Binary files /dev/null and b/resources/fluidbookpublication/sounds/classic/corner-drag.mp3 differ
diff --git a/resources/fluidbookpublication/sounds/classic/corner-release.mp3 b/resources/fluidbookpublication/sounds/classic/corner-release.mp3
new file mode 100644 (file)
index 0000000..ac176ec
Binary files /dev/null and b/resources/fluidbookpublication/sounds/classic/corner-release.mp3 differ
diff --git a/resources/fluidbookpublication/sounds/classic/cover-flip.mp3 b/resources/fluidbookpublication/sounds/classic/cover-flip.mp3
new file mode 100644 (file)
index 0000000..8c1701a
Binary files /dev/null and b/resources/fluidbookpublication/sounds/classic/cover-flip.mp3 differ
diff --git a/resources/fluidbookpublication/sounds/classic/page-flip-1.mp3 b/resources/fluidbookpublication/sounds/classic/page-flip-1.mp3
new file mode 100644 (file)
index 0000000..d11aafa
Binary files /dev/null and b/resources/fluidbookpublication/sounds/classic/page-flip-1.mp3 differ
diff --git a/resources/fluidbookpublication/sounds/classic/page-flip-2.mp3 b/resources/fluidbookpublication/sounds/classic/page-flip-2.mp3
new file mode 100644 (file)
index 0000000..4797143
Binary files /dev/null and b/resources/fluidbookpublication/sounds/classic/page-flip-2.mp3 differ
diff --git a/resources/fluidbookpublication/sounds/corner-drag.mp3 b/resources/fluidbookpublication/sounds/corner-drag.mp3
new file mode 100644 (file)
index 0000000..aa48cb8
Binary files /dev/null and b/resources/fluidbookpublication/sounds/corner-drag.mp3 differ
diff --git a/resources/fluidbookpublication/sounds/corner-release.mp3 b/resources/fluidbookpublication/sounds/corner-release.mp3
new file mode 100644 (file)
index 0000000..ac176ec
Binary files /dev/null and b/resources/fluidbookpublication/sounds/corner-release.mp3 differ
diff --git a/resources/fluidbookpublication/sounds/cover-flip.mp3 b/resources/fluidbookpublication/sounds/cover-flip.mp3
new file mode 100644 (file)
index 0000000..8c1701a
Binary files /dev/null and b/resources/fluidbookpublication/sounds/cover-flip.mp3 differ
diff --git a/resources/fluidbookpublication/sounds/heavy/corner-drag.mp3 b/resources/fluidbookpublication/sounds/heavy/corner-drag.mp3
new file mode 100644 (file)
index 0000000..aa48cb8
Binary files /dev/null and b/resources/fluidbookpublication/sounds/heavy/corner-drag.mp3 differ
diff --git a/resources/fluidbookpublication/sounds/heavy/corner-release.mp3 b/resources/fluidbookpublication/sounds/heavy/corner-release.mp3
new file mode 100644 (file)
index 0000000..ac176ec
Binary files /dev/null and b/resources/fluidbookpublication/sounds/heavy/corner-release.mp3 differ
diff --git a/resources/fluidbookpublication/sounds/heavy/cover-flip.mp3 b/resources/fluidbookpublication/sounds/heavy/cover-flip.mp3
new file mode 100644 (file)
index 0000000..8c1701a
Binary files /dev/null and b/resources/fluidbookpublication/sounds/heavy/cover-flip.mp3 differ
diff --git a/resources/fluidbookpublication/sounds/heavy/page-flip-1.mp3 b/resources/fluidbookpublication/sounds/heavy/page-flip-1.mp3
new file mode 100644 (file)
index 0000000..8c1701a
Binary files /dev/null and b/resources/fluidbookpublication/sounds/heavy/page-flip-1.mp3 differ
diff --git a/resources/fluidbookpublication/sounds/heavy/page-flip-2.mp3 b/resources/fluidbookpublication/sounds/heavy/page-flip-2.mp3
new file mode 100644 (file)
index 0000000..8c1701a
Binary files /dev/null and b/resources/fluidbookpublication/sounds/heavy/page-flip-2.mp3 differ
diff --git a/resources/fluidbookpublication/sounds/light/corner-drag.mp3 b/resources/fluidbookpublication/sounds/light/corner-drag.mp3
new file mode 100644 (file)
index 0000000..aa48cb8
Binary files /dev/null and b/resources/fluidbookpublication/sounds/light/corner-drag.mp3 differ
diff --git a/resources/fluidbookpublication/sounds/light/corner-release.mp3 b/resources/fluidbookpublication/sounds/light/corner-release.mp3
new file mode 100644 (file)
index 0000000..ac176ec
Binary files /dev/null and b/resources/fluidbookpublication/sounds/light/corner-release.mp3 differ
diff --git a/resources/fluidbookpublication/sounds/light/cover-flip.mp3 b/resources/fluidbookpublication/sounds/light/cover-flip.mp3
new file mode 100644 (file)
index 0000000..d11aafa
Binary files /dev/null and b/resources/fluidbookpublication/sounds/light/cover-flip.mp3 differ
diff --git a/resources/fluidbookpublication/sounds/light/page-flip-1.mp3 b/resources/fluidbookpublication/sounds/light/page-flip-1.mp3
new file mode 100644 (file)
index 0000000..d11aafa
Binary files /dev/null and b/resources/fluidbookpublication/sounds/light/page-flip-1.mp3 differ
diff --git a/resources/fluidbookpublication/sounds/light/page-flip-2.mp3 b/resources/fluidbookpublication/sounds/light/page-flip-2.mp3
new file mode 100644 (file)
index 0000000..4797143
Binary files /dev/null and b/resources/fluidbookpublication/sounds/light/page-flip-2.mp3 differ
diff --git a/resources/fluidbookpublication/sounds/page-flip-1.mp3 b/resources/fluidbookpublication/sounds/page-flip-1.mp3
new file mode 100644 (file)
index 0000000..d11aafa
Binary files /dev/null and b/resources/fluidbookpublication/sounds/page-flip-1.mp3 differ
diff --git a/resources/fluidbookpublication/sounds/page-flip-2.mp3 b/resources/fluidbookpublication/sounds/page-flip-2.mp3
new file mode 100644 (file)
index 0000000..4797143
Binary files /dev/null and b/resources/fluidbookpublication/sounds/page-flip-2.mp3 differ
diff --git a/resources/fluidbookpublication/sounds/silent/corner-drag.mp3 b/resources/fluidbookpublication/sounds/silent/corner-drag.mp3
new file mode 100644 (file)
index 0000000..9cd8436
Binary files /dev/null and b/resources/fluidbookpublication/sounds/silent/corner-drag.mp3 differ
diff --git a/resources/fluidbookpublication/sounds/silent/corner-release.mp3 b/resources/fluidbookpublication/sounds/silent/corner-release.mp3
new file mode 100644 (file)
index 0000000..9cd8436
Binary files /dev/null and b/resources/fluidbookpublication/sounds/silent/corner-release.mp3 differ
diff --git a/resources/fluidbookpublication/sounds/silent/cover-flip.mp3 b/resources/fluidbookpublication/sounds/silent/cover-flip.mp3
new file mode 100644 (file)
index 0000000..9cd8436
Binary files /dev/null and b/resources/fluidbookpublication/sounds/silent/cover-flip.mp3 differ
diff --git a/resources/fluidbookpublication/sounds/silent/page-flip-1.mp3 b/resources/fluidbookpublication/sounds/silent/page-flip-1.mp3
new file mode 100644 (file)
index 0000000..9cd8436
Binary files /dev/null and b/resources/fluidbookpublication/sounds/silent/page-flip-1.mp3 differ
diff --git a/resources/fluidbookpublication/sounds/silent/page-flip-2.mp3 b/resources/fluidbookpublication/sounds/silent/page-flip-2.mp3
new file mode 100644 (file)
index 0000000..9cd8436
Binary files /dev/null and b/resources/fluidbookpublication/sounds/silent/page-flip-2.mp3 differ
diff --git a/resources/fluidbookpublication/sounds/woosh/flip.mp3 b/resources/fluidbookpublication/sounds/woosh/flip.mp3
new file mode 100644 (file)
index 0000000..1e6d906
Binary files /dev/null and b/resources/fluidbookpublication/sounds/woosh/flip.mp3 differ