protected static $_acceptAudio = ['.mp3'];
protected static $_acceptHtml = ['.html'];
protected static $_acceptIframe = ['.oam', '.zip', '.html', '.pdf'];
+ protected static $_acceptLottie = ['.zip', '.html'];
protected static $_acceptSlideshow = ['.jpg', '.jpeg', '.png', '.svg', '.gif', '.zip'];
protected static $_acceptPDF = ['.pdf'];
['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::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::HTML5MULTIMEDIA, 'label' => __('Lien Multimédia (HTML)'), 'color' => '#34A853', 'disabled' => true, 'class' => Web::class],
//['type' => \Fluidbook\Tools\Links\Link::BOOKMARK_CORNER, 'label' => __('Lien marque-page sur coin de page'), 'color' => '#000000', 'disabled' => true, 'class' => Web::class],
//['type' => \Fluidbook\Tools\Links\Link::PAGE_CORNER, 'label' => __('Coin de page'), 'color' => '#f19043', 'disabled' => true, 'class' => Web::class],
if ($type['type'] === Link::MULTIMEDIA) {
$optionsChoices['to'] = ['file.jpg', 'file.zip'];
} else if ($type['type'] === Link::LAYER) {
- $optionsChoices['to'] = ['', 'both','bothsvg', 'image', 'text', 'onlytext'];
+ $optionsChoices['to'] = ['', 'both', 'bothsvg', 'image', 'text', 'onlytext'];
}
$configs[$type['type']] = $optionsChoices;
--- /dev/null
+<?php
+
+namespace App\SubForms\Link;
+
+use App\Fluidbook\Link\Link;
+use Cubist\Backpack\Magic\Fields\CheckboxBasic;
+use Cubist\Backpack\Magic\Fields\FilesOrURL;
+
+class Lottie extends Base
+{
+ public $type = Link::LOTTIE;
+ public $_integration = false;
+ public $_multimedia = true;
+
+ public function addDestinationField()
+ {
+ $this->addField('to', FilesOrURL::class, __('Animation Lottie'), $this->getFilesOrURLEntry() + ['accept' => self::$_acceptLottie]);
+ }
+
+ public function addMultimediaFields()
+ {
+ parent::addMultimediaFields();
+ $this->addField('interactive', CheckboxBasic::class, __('Animation interactive'), ['default' => false]);
+ $this->addField('background', \Cubist\Backpack\Magic\Fields\Color::class, __('Couleur de fond'), ['default' => 'rgba(0,0,0,0)']);
+ $this->addField('video_auto_start', CheckboxBasic::class, __('Jouer l\'animation automatiquement'), ['default' => true]);
+ $this->addField('video_loop', CheckboxBasic::class, __('Jouer l\'animation en boucle'), ['default' => false]);
+ }
+}