]> _ Git - fluidbook-toolbox.git/commitdiff
wip #6799 @1.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 15 Mar 2024 10:28:28 +0000 (11:28 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 15 Mar 2024 10:28:28 +0000 (11:28 +0100)
app/SubForms/Link/Base.php
app/SubForms/Link/PDF.php
app/SubForms/Link/PDFInline.php [new file with mode: 0644]

index 3607aaec8ab93faefb619b2f022978be73ab8391..2652484508fca858ce8f655d114d22b6bde88170 100644 (file)
@@ -104,7 +104,8 @@ class Base extends Form
             ['type' => \Fluidbook\Tools\Links\Link::DOWNLOAD_PORTION, 'label' => __('Télécharger un extrait'), 'color' => '#AAAAAA', 'class' => DownloadPortion::class],
             ['type' => \Fluidbook\Tools\Links\Link::TRIGGERSLINK, 'label' => __('Déclencher un lien'), 'color' => '#cc0000', 'class' => TriggerLink::class],
             ['type' => \Fluidbook\Tools\Links\Link::FLIPCARD, 'label' => __('Flipcard'), 'color' => '#460e3f', 'class' => Flipcard::class],
-            ['type' => \Fluidbook\Tools\Links\Link::PDF, 'label' => __('PDF'), 'color' => '#af48d1', 'class' => PDF::class],
+            ['type' => \Fluidbook\Tools\Links\Link::PDF, 'label' => __('PDF') . ' (' . __('Popup') . ')', 'color' => '#af48d1', 'class' => PDF::class],
+            ['type' => \Fluidbook\Tools\Links\Link::PDF_INLINE, 'label' => __('PDF'), 'color' => '#af48d1', 'class' => PDFInline::class],
             ['type' => \Fluidbook\Tools\Links\Link::ACTION, 'label' => __('Action'), 'color' => '#880000', 'class' => Action::class],
             ['type' => \Fluidbook\Tools\Links\Link::LOTTIE, 'label' => __('Animation Lottie'), 'color' => '#ffaaff', 'class' => Lottie::class],
             ['type' => \Fluidbook\Tools\Links\Link::COPY_TO_CLIPBOARD, 'label' => __('Copier un texte dans le presse-papiers'), 'color' => '#437ac7', 'class' => CopyToClipboard::class],
index 242cff0efec3e6b553a89d1e44e8be5aab7dca43..c6e8de91e6e270aa4d26b65c2676555d8001f5fe 100644 (file)
@@ -12,6 +12,7 @@ class PDF extends File
 {
     public $type = Link::PDF;
 
+
     public function addDestinationField()
     {
         $this->addField('to', FilesOrURL::class, __('Fichier'), $this->getFilesOrURLEntry());
diff --git a/app/SubForms/Link/PDFInline.php b/app/SubForms/Link/PDFInline.php
new file mode 100644 (file)
index 0000000..9ded22b
--- /dev/null
@@ -0,0 +1,21 @@
+<?php
+
+namespace App\SubForms\Link;
+
+use App\Fields\FluidbookLinkEditor\PDFJSType;
+use App\Fields\FluidbookLinkEditor\Target;
+use App\Fluidbook\Link\Link;
+use Cubist\Backpack\Magic\Fields\FilesOrURL;
+use Cubist\Backpack\Magic\Fields\SelectFromArray;
+
+class PDFInline extends PDF
+{
+    public $type = Link::PDF_INLINE;
+
+
+    public function addDestinationField()
+    {
+        $this->addField('to', FilesOrURL::class, __('Fichier'), $this->getFilesOrURLEntry());
+        $this->addField('pdfjs', PDFJSType::class, __('Interface PDFJS'));
+    }
+}