]> _ Git - fluidbook-toolbox.git/commitdiff
wip #5934 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 22 May 2023 10:20:16 +0000 (12:20 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 22 May 2023 10:20:16 +0000 (12:20 +0200)
app/Fluidbook/Compiler/Compiler.php
app/Models/Traits/PublicationSettings.php

index 1c2cb8a13b5f0cc672dad4db0c50930d8051483f..4228c0101edc8ed93e4f2f0bfcb6c83fe166145a 100644 (file)
@@ -741,8 +741,6 @@ class Compiler extends Base implements CompilerInterface
     }
 
 
-
-
     protected function _wdirOrAbsolute($path)
     {
         $e = explode('#', $path);
@@ -907,7 +905,7 @@ class Compiler extends Base implements CompilerInterface
      */
     protected function writeSounds()
     {
-        if ($this->fluidbookSettings->soundTheme == '') {
+        if (!$this->fluidbookSettings->soundTheme || $this->fluidbookSettings->soundTheme === 'none') {
             return;
         }
         $dir = resource_path('fluidbookpublication/sounds/' . $this->fluidbookSettings->soundTheme);
index 57e2c42723fe0ee8523f5588ca0406a61b223b1a..dbacaea9524ba5e0be52b166d53171dc45c030ae 100644 (file)
@@ -1097,8 +1097,15 @@ trait PublicationSettings
             'translatable' => false,
         ]);
         $this->addField('section_index', FormSection::class, $this->__('Vue d\'index (vignettes)'));
+        $this->addField('index', Checkbox::class, $this->__('Activer l\'index'), [
+            'v2' => '{"type":"boolean","default":true,"editable":true,"label":"\\u00a7!\\u00a7Activer l index!\\u00a7!"}',
+            'default' => true,
+            'fake' => true,
+            'store_in' => 'settings',
+            'translatable' => false,
+        ]);
         $this->addField('indexAutoScroll', Checkbox::class, $this->__('Activer le scroll automatique'), [
-            'v2' => '{"type":"boolean","default":false,"editable":false,"label":"\\u00a7!\\u00a7Activer le scroll automatique!\\u00a7!"}',
+            'v2' => '{"type":"boolean","default":false,"editable":true,"label":"\\u00a7!\\u00a7Activer le scroll automatique!\\u00a7!"}',
             'default' => false,
             'fake' => true,
             'store_in' => 'settings',
@@ -1247,9 +1254,9 @@ trait PublicationSettings
         ]);
         $this->addField('section_sound', FormSection::class, $this->__('Effets sonores'));
         $this->addField('soundTheme', SelectFromArray::class, $this->__('Thème sonore'), [
-            'v2' => '{"type":"combo","default":"classic","editable":true,"label":"\\u00a7!\\u00a7Th\\u00e8me sonore!\\u00a7!","datas":{"\\u00a7!\\u00a7Pas de son!\\u00a7!":"","\\u00a7!\\u00a7Classique!\\u00a7!":"classic","\\u00a7!\\u00a7Papier \\u00e9pais!\\u00a7!":"heavy","\\u00a7!\\u00a7Papier fin!\\u00a7!":"light","\\u00a7!\\u00a7Silencieux!\\u00a7!":"silent","\\u00a7!\\u00a7Woosh!\\u00a7!":"woosh"}}',
+            'v2' => '{"type":"combo","default":"classic","editable":true,"label":"\\u00a7!\\u00a7Th\\u00e8me sonore!\\u00a7!","datas":{"\\u00a7!\\u00a7Pas de son!\\u00a7!":"none","\\u00a7!\\u00a7Classique!\\u00a7!":"classic","\\u00a7!\\u00a7Papier \\u00e9pais!\\u00a7!":"heavy","\\u00a7!\\u00a7Papier fin!\\u00a7!":"light","\\u00a7!\\u00a7Silencieux!\\u00a7!":"silent","\\u00a7!\\u00a7Woosh!\\u00a7!":"woosh"}}',
             'options' => [
-                '' => $this->__('Pas de son'),
+                'none' => $this->__('Pas de son'),
                 'classic' => $this->__('Classique'),
                 'heavy' => $this->__('Papier épais'),
                 'light' => $this->__('Papier fin'),