]> _ Git - fluidbook-toolbox.git/commitdiff
wait #7049 @1
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 2 Sep 2024 15:28:09 +0000 (17:28 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 2 Sep 2024 15:28:09 +0000 (17:28 +0200)
app/Fluidbook/Compiler/Compiler.php
app/Fluidbook/Link/Cart/Joueclub2024CartLink.php

index 6e0e71847ca89127d7ba09f99727b0918a4dea87..2b972b8b2ca632f825318d4a4792828402cd42d4 100644 (file)
@@ -300,7 +300,6 @@ class Compiler extends Base implements CompilerInterface, IVirtualDirectoryError
         $this->setFluidbook($book);
         $this->book_id = $this->getFluidbook()->id;
 
-
         $this->setCommand($command);
 
         $this->phonegapVersion = self::getPhonegapVersion($phonegapVersion);
index 0a972d0788ff6d1a69b8536b7008f2d1afc48762..ee7c4b28991da438975af7742fbfe6ba08ce6ce6 100644 (file)
@@ -2,67 +2,34 @@
 
 namespace App\Fluidbook\Link\Cart;
 
-use Fluidbook\Tools\Links\CartLink;
+use Fluidbook\Tools\Links\HTMLMultimediaLink;
 
-class Joueclub2024CartLink extends CartLink
+class Joueclub2024CartLink extends HTMLMultimediaLink
 {
-    public function getDefaultTooltip()
-    {
-        return 'Ajouter à ma liste de cadeaux';
-    }
-
-    public function getInnerContent()
-    {
-        if (file_exists($this->compiler->working_path('commerce/bouton-wishlist.svg'))) {
-            return file_get_contents($this->compiler->working_path('commerce/bouton-wishlist.svg'));
-        }
-
-        return '<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
-        viewBox="0 0 50 50" style="enable-background:new 0 0 50 50;" xml:space="preserve">
-<style type="text/css">
-       .st0{fill:url(#SVGID_1_);stroke:#F0EEEA;stroke-width:3.3;stroke-miterlimit:10;}
-       .st1{fill:#FFFFFF;}
-       .st2{opacity:0.4;enable-background:new    ;}
 
-               .st3{fill:url(#SVGID_00000091725099145697549030000002656161899138345614_);stroke:#F0EEEA;stroke-width:3.3;stroke-miterlimit:10;}
-</style>
-<g id="on">
-       <g id="on_00000067198718027100822470000000858312170120319118_">
+    protected $_ref;
 
-                       <radialGradient id="SVGID_1_" cx="12.5" cy="43" r="21.783" gradientTransform="matrix(1 0 0 -1 0 52)" gradientUnits="userSpaceOnUse">
-                       <stop  offset="0" style="stop-color:#F9152B"/>
-                       <stop  offset="1" style="stop-color:#CC0014"/>
-               </radialGradient>
-               <circle class="st0" cx="24.8" cy="24.8" r="22"/>
-               <path id="_x3C_Tracé_x3E_" class="st1" d="M33.2,24.5c-4,0-7.2,3.2-7.2,7.2s3.2,7.2,7.2,7.2s7.2-3.2,7.2-7.2
-                       C40.3,27.7,37.1,24.5,33.2,24.5z M37.8,30.2l-4.4,4.6c-0.2,0.2-0.5,0.3-0.8,0.3l0,0c-0.3,0-0.6-0.1-0.8-0.3L29,31.9
-                       c-0.4-0.4-0.4-1.2,0-1.6s1.2-0.4,1.6,0l2,2.1l3.6-3.8c0.4-0.4,1.1-0.5,1.6,0C38.2,29,38.2,29.7,37.8,30.2z"/>
-               <path class="st1" d="M23.7,31.8c0-5.3,4.3-9.5,9.5-9.5c0.8,0,1.6,0.1,2.4,0.3c0.1-1-0.1-2-0.6-2.9c-1.4-3-5-4-8-2.6
-                       c-0.4,0.2-1,0.6-1.4,1l-0.8,0.8L24,18.1c-1.4-1.4-3.2-2-5.2-1.6c-1.8,0.4-3.4,1.6-4.2,3.2c-1.2,2.2-0.8,5,1,6.8l8.4,8.6
-                       c0.1,0.1,0.2,0.2,0.4,0.2C23.9,34.2,23.7,33,23.7,31.8z"/>
-       </g>
-</g>
-<g id="off">
-       <g id="off_00000158745150850562103200000013702113717099787924_">
-               <circle class="st2" cx="26.5" cy="26.5" r="23.3"/>
+    public function __construct($id, $init, &$compiler)
+    {
+        $this->_ref = $init['to'];
+        $init['to'] = 'jc2024button.zip';
+        $init['interactive'] = "1";
+        $initialWidth = $init['width'];
+        $init['width'] = $init['height'] * 2.5;
+        $init['left'] -= ($init['width'] - $initialWidth) / 2;
+
+        parent::__construct($id, $init, $compiler);
+    }
 
-                       <radialGradient id="SVGID_00000173873247631391758930000004458483244722507439_" cx="12.5" cy="43" r="21.783" gradientTransform="matrix(1 0 0 -1 0 52)" gradientUnits="userSpaceOnUse">
-                       <stop  offset="0" style="stop-color:#F9152B"/>
-                       <stop  offset="1" style="stop-color:#CC0014"/>
-               </radialGradient>
 
-                       <circle style="fill:url(#SVGID_00000173873247631391758930000004458483244722507439_);stroke:#F0EEEA;stroke-width:3.3;stroke-miterlimit:10;" cx="24.8" cy="24.8" r="22"/>
-               <path class="st1" d="M35,19.6c-1.4-3-5-4-8-2.6c-0.4,0.2-1,0.6-1.4,1l-0.8,0.8L24,18c-1.4-1.4-3.2-2-5.2-1.6
-                       c-1.8,0.4-3.4,1.6-4.2,3.2c-1.2,2.2-0.8,5,1,6.8L24,35c0.4,0.4,1,0.4,1.2,0l0,0l8.4-8.6C35.6,24.6,36.2,21.8,35,19.6z"/>
-       </g>
-</g>
-</svg>';
+    public function getAdditionnalContent()
+    {
+        return 'data-jc2024="' . $this->_ref . '" ' . parent::getAdditionnalContent();
     }
 
-    public function getAdditionnalContent()
+    public function getIframeName()
     {
-        $res = parent::getAdditionnalContent();
-        $res .= ' data-tooltip-conditional="' . htmlspecialchars(json_encode(['.active' => 'Retirer de ma liste de cadeaux'])) . '" ';
-        return $res;
+        return $this->_ref;
     }
+
 }