From bcdbee40bbb0078972b16ed9711d8eaef04425f4 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Mon, 2 Sep 2024 17:28:09 +0200 Subject: [PATCH] wait #7049 @1 --- app/Fluidbook/Compiler/Compiler.php | 1 - .../Link/Cart/Joueclub2024CartLink.php | 73 +++++-------------- 2 files changed, 20 insertions(+), 54 deletions(-) diff --git a/app/Fluidbook/Compiler/Compiler.php b/app/Fluidbook/Compiler/Compiler.php index 6e0e71847..2b972b8b2 100644 --- a/app/Fluidbook/Compiler/Compiler.php +++ b/app/Fluidbook/Compiler/Compiler.php @@ -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); diff --git a/app/Fluidbook/Link/Cart/Joueclub2024CartLink.php b/app/Fluidbook/Link/Cart/Joueclub2024CartLink.php index 0a972d078..ee7c4b289 100644 --- a/app/Fluidbook/Link/Cart/Joueclub2024CartLink.php +++ b/app/Fluidbook/Link/Cart/Joueclub2024CartLink.php @@ -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 ' - - - + protected $_ref; - - - - - - - - - - - - + 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); + } - - - - - - - - -'; + 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; } + } -- 2.39.5