From 84a0111a393ae54eca8d722821f623f946d7ab9d Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Fri, 30 Oct 2020 13:38:48 +0000 Subject: [PATCH] wip #4008 @0.5 --- .../html5/master/class.ws.html5.compiler.php | 5 ++++ .../html5/master/class.ws.html5.links.php | 23 ++++++++++++++++--- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/inc/ws/Util/html5/master/class.ws.html5.compiler.php b/inc/ws/Util/html5/master/class.ws.html5.compiler.php index 39cd80169..f4800b52d 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/master/class.ws.html5.compiler.php @@ -1440,6 +1440,11 @@ class wsHTML5Compiler $init['animation'] = 'reflet-anim.html'; $links[$k] = $init; } + if ($init['type'] == 7) { + $init['image'] = ''; + $init['display_area'] = false; + $links[$k] = $init; + } } } diff --git a/inc/ws/Util/html5/master/class.ws.html5.links.php b/inc/ws/Util/html5/master/class.ws.html5.links.php index 03730256a..c021f0baa 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.links.php +++ b/inc/ws/Util/html5/master/class.ws.html5.links.php @@ -81,7 +81,7 @@ class wsHTML5Link return new videoPopupLink($id, $init, $compiler); case 7: if ($compiler->book->parametres->basketManager === 'Puma') { - return new cartLink($id, $init, $compiler); + return new pumaCartLink($id, $init, $compiler); } switch ($compiler->book->parametres->customLinkClass) { case 'WescoLink': @@ -570,6 +570,11 @@ class normalLink extends wsHTML5Link { protected $role = 'link'; + public function getInnerContent() + { + return ''; + } + public function getHTMLContent() { $class = $this->getClasses(); @@ -584,7 +589,7 @@ class normalLink extends wsHTML5Link if (isset($this->extra->blinkdelay)) { $attrs .= ' data-blinkdelay="' . intval($this->extra->blinkdelay) . '"'; } - return 'getAdditionnalContent() . $this->getTrack() . '>'; + return 'getAdditionnalContent() . $this->getTrack() . '>' . $this->getInnerContent() . ''; } @@ -1282,6 +1287,18 @@ class actionLink extends internalLink } +class pumaCartLink extends cartLink +{ + public function getInnerContent() + { + return ' + + + +'; + } +} + class cartLink extends normalLink { @@ -1638,7 +1655,7 @@ class htmlMultimediaLink extends wsHTML5Link { $hash = hash('sha256', $c); $start = mb_strpos($c, 'var animationData = {') + 20; - $end = mb_strpos($c, '};', $start)+1; + $end = mb_strpos($c, '};', $start) + 1; $ad = mb_substr($c, $start, $end - $start); $animationData = json_decode($ad); preg_match('/var params = (\{.*\});/sU', $c, $matches); -- 2.39.5