]> _ Git - fluidbook-toolbox.git/commitdiff
wait #5940 @1
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 24 May 2023 10:50:54 +0000 (12:50 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 24 May 2023 10:50:54 +0000 (12:50 +0200)
app/Fluidbook/Compiler/Links.php
app/SubForms/Link/Base.php

index 49f74d7b7a668c9137dceb96a275d711b037a550..3e7e9910eeafe0b9027ae0069c52a24d1f0583d7 100644 (file)
@@ -402,7 +402,7 @@ trait Links
 
     protected function addLinkLinks($link, $links, $assetsDimensions, &$linksToAdd)
     {
-
+        $i = 0;
         foreach ($links as $llink) {
             if ($llink['page'] !== 'link_uid_' . $link['uid']) {
                 continue;
@@ -418,11 +418,12 @@ trait Links
             $llink['top'] = $link['top'] + ($llink['top'] * $scaleY);
             $llink['width'] *= $scaleX;
             $llink['height'] *= $scaleY;
-            $instance = Link::getInstance($this->base62(count($linksToAdd)), $llink, $this);
+            $instance = Link::getInstance($link['id'] . '_l_' . $i, $llink, $this);
             if (is_null($instance) || $instance->ignore()) {
                 continue;
             }
             $linksToAdd[] = $instance;
+            $i++;
         }
 
     }
index d11403940b6b956a6b4543ac476d3abdff55dee2..f617139def45b647d5b5732d678050821e45ef24 100644 (file)
@@ -124,7 +124,7 @@ class Base extends Form
     {
         $res = [];
         foreach (self::types() as $l) {
-            if(!isset($l['class'])){
+            if (!isset($l['class'])) {
                 continue;
             }
             $class = $l['class'];
@@ -172,7 +172,7 @@ class Base extends Form
             return;
         }
         $this->addField('header_tooltip', FormSection::class, __('Infobulle'));
-        $this->addField('tooltip', Text::class, __('Texte de l\'infobulle'), ['hint' => __('Laisser vide pour conserver le texte par défaut')]);
+        $this->addField('tooltip', Text::class, __('Texte de l\'infobulle'), ['hint' => __('Laisser vide pour conserver le texte par défaut') . '.<br>' . __('Taper un tiret (-) pour ne pas afficher d\'infobulle')]);
         $this->addField('display_area', CheckboxBasic::class, __('Afficher la zone de couleur au survol'), ['default' => true]);
     }