--- /dev/null
+<?php
+
+namespace App\Fields\FluidbookLinkEditor;
+
+use Cubist\Backpack\Magic\Fields\SelectFromArray;
+
+class Action extends SelectFromArray
+{
+public function getOptions()
+{
+ return [
+ 'index'=>__("Basculer entre la publication et l'index"),
+ 'chapters'=>__('Afficher le sommaire'),
+ 'print'=>__('Imprimer'),
+ 'share'=>__('Partager par e-mail'),
+ 'bookmarks'=>__('Ajouter un marque-page'),
+ 'pdf'=>__('Télécharger le PDF'),
+ 'notes'=>__('Notes'),
+ 'fullscreen'=>__('Basculer entre le mode plein écran et le mode normal'),
+ 'sound'=>__('Activer / Couper le son'),
+ //'2dmode'=>__('Basculer du mode 2D au mode 3D'),
+ 'archives'=>__('Afficher les archives'),
+ 'basket'=>__('Ouvrir le panier'),
+ 'form'=>__('Ouvrir le formulaire'),
+ 'facebook'=>__('Partager sur Facebook'),
+ 'twitter'=>__('Partager sur Twitter'),
+ //'googleplus'=>__('Partager sur Google+'),
+ 'linkedin'=>__('Partager sur LinkedIn'),
+ //'viadeo'=>__('Partager sur Viadeo'),
+ 'whatsapp'=>__('Partager sur Whatsapp'),
+ 'pinterest'=>__('Partager sur Pinterest'),
+ ];
+}
+}
--- /dev/null
+<?php
+
+namespace App\Fields\FluidbookLinkEditor;
+
+use Cubist\Backpack\Magic\Fields\SelectFromArray;
+
+class Depth extends SelectFromArray
+{
+ public function getOptions()
+ {
+ return [
+ -1 => __('Par défaut'),
+ 0 => '0 - ' . __('Sous le fond des pages (invisible)'),
+ 10 => '1 - ' . __('Sous le texte'),
+ 20 => '2 - ' . __('Sous le texte'),
+ 30 => '3 - ' . __('Sur la couche de texte'),
+ 40 => '4 - ' . __('Sur la couche de texte'),
+ 50 => '5 - ' . __('Couche multimedia interactive'),
+ 60 => '6 - ' . __('Couche interactive'),
+ 70 => '7 - ' . __('Couche interactive'),
+ 80 => '8 - ' . __('Couche interactive'),
+ //90=>'9 - '.__('Au dessus de l\'ombre de la page'),
+ ];
+ }
+}
--- /dev/null
+<?php
+
+namespace App\Fields\FluidbookLinkEditor;
+
+use Cubist\Backpack\Magic\Fields\SelectFromArray;
+
+class Layer extends SelectFromArray
+{
+public function getOptions()
+{
+ return [
+ 'both'=>__('Texte et image'),
+ 'text'=>__('Texte'),
+ 'image'=>__('Image'),
+ ];
+}
+}
--- /dev/null
+<?php
+
+namespace App\Fields\FluidbookLinkEditor;
+
+use App\SubForms\Link\Base;
+use Cubist\Backpack\Magic\Fields\SelectFromArray;
+
+class LinkType extends SelectFromArray
+{
+ protected $_allowsHTML = true;
+
+ public function getOptions()
+ {
+ $res = [];
+ foreach (Base::types() as $type) {
+ $res[$type['type']] = '<span class="linkeditor-linktype" data-color="' . $type['color'] . '">' . $type['label'] . '</span>';
+ }
+ return $res;
+ }
+}
--- /dev/null
+<?php
+
+namespace App\Fields\FluidbookLinkEditor;
+
+use Cubist\Backpack\Magic\Fields\SelectFromArray;
+
+class MultimediaIntegration extends SelectFromArray
+{
+ public function getOptions()
+ {
+ return [
+ 'popup' => __('Ouverture en popup'),
+ 'inline' => __('Au dessus des contenus'),
+ 'background_texts' => __('En fond (sous les textes)'),
+ ];
+ }
+}
--- /dev/null
+<?php
+
+namespace App\Fields\FluidbookLinkEditor;
+
+use Cubist\Backpack\Magic\Fields\SelectFromArray;
+
+class NumberingType extends SelectFromArray
+{
+ public function getOptions()
+ {
+ return [
+ 'virtual' => __('Virtuelle'),
+ 'physical' => __('Physique')
+ ];
+ }
+}
--- /dev/null
+<?php
+
+namespace App\Fields\FluidbookLinkEditor;
+
+use Cubist\Backpack\Magic\Fields\SelectFromArray;
+
+class RolloverAnimation extends SelectFromArray
+{
+ public function getOptions()
+ {
+ return [
+ 'none' => __('Aucune'),
+ 'upanddown' => __('Up and down'),
+ 'fadein' => __('Fade In'),
+ 'fadeout' => __('Fade Out'),
+ ];
+ }
+}
--- /dev/null
+<?php
+
+namespace App\Fields\FluidbookLinkEditor;
+
+use Cubist\Backpack\Magic\Fields\SelectFromArray;
+
+class ShowLinkCloseMode extends SelectFromArray
+{
+public function getOptions()
+{
+ return [
+ 'none' => __('Aucune'),
+ 'topright' => __('En haut à droite'),
+ 'topleft' => __('En haut à gauche'),
+ 'whole' => __('Toute la zone'),
+ ];
+}
+}
--- /dev/null
+<?php
+
+namespace App\Fields\FluidbookLinkEditor;
+
+use Cubist\Backpack\Magic\Fields\SelectFromArray;
+
+class ShowLinkMode extends SelectFromArray
+{
+ public function getOptions()
+ {
+ return [
+ 'show' => __('Afficher'),
+ 'showonhover' => __('Afficher au rollover'),
+ 'hide' => __('Masquer'),
+ 'toggle' => __('Basculer (Afficher si masqué, masquer si affiché)'),
+ 'exclusiveshow' => __('Afficher et masquer tous les autres'),
+ 'shownext' => __('Afficher le lien suivant dans la série'),
+ 'shownextcycle' => __('Afficher le lien suivant dans la série') . ' (' . __('cycle') . ')',
+ 'showprev' => __('Afficher le lien précédent dans la série'),
+ 'showprevcycle' => __('Afficher le lien précédent dans la série') . ' (' . __('cycle') . ')',
+ 'pickrandom' => __('Afficher un lien au hasard dans la série'),
+ ];
+ }
+}
--- /dev/null
+<?php
+
+namespace App\Fields\FluidbookLinkEditor;
+
+use Cubist\Backpack\Magic\Fields\SelectFromArray;
+
+class Target extends SelectFromArray
+{
+ public function getOptions()
+ {
+ return [
+ '_blank' => __('un nouvel onglet'),
+ '_new' => __('une nouvelle fenêtre'),
+ '_unique' => __('une nouvelle fenêtre') . ' (' . __('unique') . ')',
+ '_self' => __('l\'onglet courant'),
+ '_popupiframe' => __('une popup iframe'),
+ '_download' => __('forcer le téléchargement'),
+ ];
+ }
+}
--- /dev/null
+<?php
+
+namespace App\Fields\FluidbookLinkEditor;
+
+use Cubist\Backpack\Magic\Fields\SelectFromArray;
+
+class TriggerLinkEvent extends SelectFromArray
+{
+ public function getOptions()
+ {
+ return [
+ 'page' => __("A l'arrivée sur la page"),
+ 'click' => __('Au clic sur ce lien'),
+ 'stoponclick' => __('Arrêter au clic'),
+ ];
+ }
+}
--- /dev/null
+<?php
+
+namespace App\Fields\FluidbookLinkEditor;
+
+use Cubist\Backpack\Magic\Fields\SelectFromArray;
+
+class WebvideoService extends SelectFromArray
+{
+ public function getOptions()
+ {
+ return [
+ 'youtube' => 'Youtube',
+ 'dailymotion' => 'Dailymotion',
+ 'vimeo' => 'Vimeo',
+ 'brightcove' => 'Vimeo',
+ ];
+}
+}
--- /dev/null
+<?php
+
+namespace App\SubForms\Link;
+
+use Cubist\Backpack\Magic\SubForm;
+
+class Base extends SubForm
+{
+ const GENERAL_INFOS = 1;
+ const PRODUCT = 1;
+ const GENERAL = 2;
+ const EMAIL = 3;
+ const VIDEO = 4;
+ const INTERNAL = 5;
+ const MULTIMEDIA = 6;
+ const PERSO = 7;
+ const CUSTOM = 7;
+ const PAGE_CORNER = 8;
+ const OBJECT3D = 9;
+ const WEBVIDEO = 10;
+ const ACTION = 11;
+ const CART = 12;
+ const BASKET = 12;
+ const ZOOM = 13;
+ const COLOR = 14;
+ const IMAGE = 15;
+ const FILE = 16;
+ const AUDIO = 17;
+ const TOOLTIP = 18;
+ const CALL = 19;
+ const BOOKMARKGROUP = 20;
+ const HTML5MULTIMEDIA = 21;
+ const BOOKMARK_CORNER = 22;
+ const STATSTAG = 23;
+ const PHONE = 24;
+ const AUDIODESCRIPTION = 25;
+ const PAGE_LABEL = 26;
+ const EVENT_OVERLAY = 27;
+ const ARTICLE = 28;
+ const LIKE = 29;
+ const SLIDESHOW = 30;
+ const IFRAME = 31;
+ const SHOWLINK = 32;
+ const ZOOMHD = 33;
+ const LOCK_CONTENTS = 34;
+ const TEXT = 35;
+ const ARTICLE_OPEN = 36;
+ const DOWNLOAD_PORTION = 37;
+ const TRIGGERSLINK = 38;
+ const LAYER = 39;
+ const ANCHOR = 40;
+ const FLIPCARD = 41;
+
+ /**
+ * @return array[]
+ */
+ public static function types()
+ {
+ return [
+ ['type' => self::GENERAL_INFOS, 'label' => __('Lien web « plus d\'infos »'), 'color' => '#ff0000'],
+ ['type' => self::GENERAL, 'label' => __('Lien web'), 'color' => '#3399cc'],
+ ['type' => self::EMAIL, 'label' => __('Adresse e-mail'), 'color' => '#6c6360'],
+ ['type' => self::VIDEO, 'label' => __('Vidéo'), 'color' => '#33ff00'],
+ ['type' => self::INTERNAL, 'label' => __('Lien vers une page'), 'color' => '#c7b405'],
+ ['type' => self::MULTIMEDIA, 'label' => __('Multimédia'), 'color' => '#ff00ff'],
+ ['type' => self::CUSTOM, 'label' => __('Lien personnalisé'), 'color' => '#14511a'],
+ ['type' => self::PAGE_CORNER, 'label' => __('Coin de page'), 'color' => '#f19043', 'disabled' => true],
+ ['type' => self::OBJECT3D, 'label' => __('Objet 3D'), 'color' => '#00ffff', 'disabled' => true],
+ ['type' => self::WEBVIDEO, 'label' => __('Vidéo web'), 'color' => '#ffff00'],
+ ['type' => self::ACTION, 'label' => __('Action'), 'color' => '#880000'],
+ ['type' => self::CART, 'label' => __('Panier'), 'color' => '#F2A4B7'],
+ ['type' => self::ZOOM, 'label' => __('Zone de zoom'), 'color' => '#322280'],
+ ['type' => self::COLOR, 'label' => __('Couleurs'), 'color' => '#8C5E24'],
+ ['type' => self::IMAGE, 'label' => __('Image'), 'color' => '#BE418D'],
+ ['type' => self::FILE, 'label' => __('Fichier'), 'color' => '#F19043'],
+ ['type' => self::AUDIO, 'label' => __('Audio'), 'color' => '#0065AE'],
+ ['type' => self::TOOLTIP, 'label' => __('Texte / Infobulle'), 'color' => '#000000'],
+ ['type' => self::CALL, 'label' => __('Appel'), 'color' => '#333333'],
+ ['type' => self::BOOKMARKGROUP, 'label' => __('Groupe de marque-pages'), 'color' => '#d6520f'],
+ ['type' => self::HTML5MULTIMEDIA, 'label' => __('Lien Multimédia (HTML)'), 'color' => '#34A853', 'disabled' => true],
+ ['type' => self::BOOKMARK_CORNER, 'label' => __('Lien marque-page sur coin de page'), 'color' => '#000000', 'disabled' => true],
+ ['type' => self::STATSTAG, 'label' => __('Tag statistique'), 'color' => '#000000'],
+ ['type' => self::PHONE, 'label' => __('Téléphone'), 'color' => '#000000'],
+ ['type' => self::AUDIODESCRIPTION, 'label' => __('Audiodescription'), 'color' => '#00535b'],
+ ['type' => self::PAGE_LABEL, 'label' => __('Label de page'), 'color' => '#00E6D7'],
+ ['type' => self::EVENT_OVERLAY, 'label' => __('Capter les évenements'), 'color' => '#ffcc00'],
+ ['type' => self::ARTICLE, 'label' => __('Article (définition)'), 'color' => '#ACC152'],
+ ['type' => self::LIKE, 'label' => __('Like'), 'color' => '#4267B2'],
+ ['type' => self::SLIDESHOW, 'label' => __('Diaporama'), 'color' => '#07b57a'],
+ ['type' => self::IFRAME, 'label' => __('iFrame'), 'color' => '#fcae25'],
+ ['type' => self::SHOWLINK, 'label' => __('Afficher un lien'), 'color' => '#125C70'],
+ ['type' => self::ZOOMHD, 'label' => __('Zoom HD'), 'color' => '#E80C95'],
+ ['type' => self::LOCK_CONTENTS, 'label' => __('Blocage des contenus'), 'color' => '#69D670'],
+ ['type' => self::TEXT, 'label' => __('Texte'), 'color' => '#9090FF'],
+ ['type' => self::ARTICLE_OPEN, 'label' => __('Afficher un article'), 'color' => '#ffcc00'],
+ ['type' => self::DOWNLOAD_PORTION, 'label' => __('Télécharger un extrait'), 'color' => '#AAAAAA'],
+ ['type' => self::TRIGGERSLINK, 'label' => __('Déclencher un lien'), 'color' => '#cc0000'],
+ ['type' => self::LAYER, 'label' => __('Animation de calque'), 'color' => '#3D0254'],
+ ['type' => self::ANCHOR, 'label' => __('Ancre'), 'color' => '#330000'],
+ ['type' => self::FLIPCARD, 'label' => __('Flipcard'), 'color' => '#460e3f'],
+
+ ];
+ }
+}