From: Vincent Vanwaelscappel Date: Mon, 15 May 2023 16:52:02 +0000 (+0200) Subject: wait #5932 @0.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=c9110ff920c21f384a27012ffadfe7603c9cce45;p=fluidbook-toolbox.git wait #5932 @0.5 --- diff --git a/app/Fluidbook/Compiler/Links.php b/app/Fluidbook/Compiler/Links.php index bca5aeb99..e1f539efe 100644 --- a/app/Fluidbook/Compiler/Links.php +++ b/app/Fluidbook/Compiler/Links.php @@ -64,7 +64,7 @@ trait Links if ($this->fluidbookSettings->basketManager === 'Puma') { foreach ($links as $k => $init) { if ($init['type'] == Link::CART && isset($this->config->product_zoom_references[$init['to']]) && count($this->config->product_zoom_references[$init['to']]) > 0 && implode('', $this->config->product_zoom_references[$init['to']]) != '') { - $init['infobulle'] = 'Digital information'; + $init['tooltip'] = 'Digital information'; $init['animation'] = 'reflet-anim.html'; $links[$k] = $init; } @@ -349,7 +349,7 @@ trait Links // Make old "aftersearch" link compatible with new "extra" menu option by extracting link URL if ($link->page == 'aftersearch') { $this->config->afterSearchLink = $link->to; - $this->config->afterSearchTooltip = $link->infobulle; + $this->config->afterSearchTooltip = $link->tooltip; } if (strpos($link->page, 'link_') === 0) { diff --git a/app/Fluidbook/Link/LinksData.php b/app/Fluidbook/Link/LinksData.php index 515848847..dfb1e96db 100644 --- a/app/Fluidbook/Link/LinksData.php +++ b/app/Fluidbook/Link/LinksData.php @@ -33,7 +33,7 @@ class LinksData 'uid' => __('Identifiant unique'), 'page' => __('Page de la publication'), 'left' => __('x'), 'top' => __('y'), 'width' => __('Largeur'), 'height' => __('Hauteur'), 'rot' => __('Rotation'), 'type' => __('Type'), 'to' => __('Destination'), 'target' => __('Cible'), - 'infobulle' => __('Infobulle'), 'numerotation' => __('Numérotation'), + 'tooltip' => __('Infobulle'), 'numerotation' => __('Numérotation'), 'display_area' => __('Activer la surbrillance'), 'video_loop' => __('Video : boucle'), 'video_auto_start' => __('Video : démarrage automatique'), 'video_controls' => __('Vidéo : afficher les contrôles'), 'video_sound_on' => __('Vidéo : activer le son'), 'inline' => __('Vidéo : afficher dans la page'), 'video_width' => __('Vidéo : Largeur du popup'), 'video_height' => __('Vidéo : Hauteur du popup'), @@ -248,11 +248,23 @@ class LinksData protected static function _fixLinks(&$links) { + self::_fixTooltips($links); self::_correctImageSpecialLinks($links); self::_fixWebVideoServices($links); self::_fixMultimedia($links); } + protected static function _fixTooltips(&$links) + { + foreach ($links as $k => $link) { + if (isset($link['infobulle'])) { + $links[$k]['tooltip'] = $link['infobulle']; + unset($links[$k]['infobulle']); + } + } + } + + protected static function _correctImageSpecialLinks(&$links) { foreach ($links as $k => $link) { @@ -338,8 +350,8 @@ class LinksData if ($link['display_area'] == '' || !$link['display_area']) { $link['display_area'] = '0'; } - if (trim($link['infobulle']) == '') { - $link['infobulle'] = ''; + if (trim($link['tooltip']) == '') { + $link['tooltip'] = ''; } $links[] = $link; } @@ -407,7 +419,7 @@ class LinksData 'page' => $page, 'left' => $left, 'top' => $top, 'width' => $width, 'height' => $height, 'rot' => '', 'type' => $type, 'to' => $to, 'target' => $target, - 'infobulle' => '', 'numerotation' => $numerotation, 'display_area' => '1'); + 'tooltip' => '', 'numerotation' => $numerotation, 'display_area' => '1'); } self::_fixLinks($links); @@ -419,6 +431,7 @@ class LinksData $fluidbook = FluidbookPublication::find($book_id); $lr = self::mergeLinksAndRulers($links, $rulers, $specialLinks, $specialRulers); + $meta = ['links' => count($lr['links']), 'rulers' => count($lr['rulers']), 'comments' => $comments, 'user' => $user_id, 'version' => 3, 'onepage' => $fluidbook->isOnePage()]; $base = self::getLinksDir($book_id) . '/' . time(); $latestLinks = self::getLinksDir($book_id) . '/latest.links3.gz'; @@ -530,7 +543,7 @@ class LinksData } $link = []; - $cols = array('page' => '', 'left' => '', 'top' => '', 'width' => '', 'height' => '', 'type' => '', 'to' => '', 'target' => '_blank', 'video_loop' => true, 'video_auto_start' => true, 'video_controls' => true, 'video_sound_on' => true, 'infobulle' => '', 'numerotation' => 'physical', "inline" => true, 'pdfjs' => 'normal'); + $cols = array('page' => '', 'left' => '', 'top' => '', 'width' => '', 'height' => '', 'type' => '', 'to' => '', 'target' => '_blank', 'video_loop' => true, 'video_auto_start' => true, 'video_controls' => true, 'video_sound_on' => true, 'tooltip' => '', 'numerotation' => 'physical', "inline" => true, 'pdfjs' => 'normal'); $k = 0; foreach ($cols as $col => $default) { if (isset($line[$k])) { @@ -548,7 +561,7 @@ class LinksData } if ($link['type'] == 18) { - $link['infobulle'] = $link['to']; + $link['tooltip'] = $link['to']; $link['to'] = ''; } diff --git a/app/Http/Controllers/Admin/Operations/FluidbookPublication/LinksOperation.php b/app/Http/Controllers/Admin/Operations/FluidbookPublication/LinksOperation.php index f496b80ed..c5fd751b7 100644 --- a/app/Http/Controllers/Admin/Operations/FluidbookPublication/LinksOperation.php +++ b/app/Http/Controllers/Admin/Operations/FluidbookPublication/LinksOperation.php @@ -63,8 +63,6 @@ trait LinksOperation ); $fb = FluidbookPublication::find($fluidbook_id); - //Compiler::compile($fb); - return response()->json(['assets' => $fb->getLinksAssetsDimensions(), 'versions' => LinksData::getLinksVersions($fluidbook_id)]); }