From 920b9a2bf8d7205fe7ca5513e5eb130ddeacbd26 Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Tue, 25 Aug 2020 13:14:41 +0000 Subject: [PATCH] wait #3785 @1 --- inc/ws/Util/html5/master/class.ws.html5.compiler.php | 11 ++++++++--- inc/ws/Util/html5/master/class.ws.html5.links.php | 12 +++++++++--- 2 files changed, 17 insertions(+), 6 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 f80a20f37..b23734442 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/master/class.ws.html5.compiler.php @@ -1415,12 +1415,17 @@ class wsHTML5Compiler $linkData = wsLinks::decryptLink($linkData); $animations = contentLink::parseAnimations($linkData['image_rollover']); foreach ($animations as $animation) { - if (isset($animation['backgroundColor']) && $animation['backgroundColor'] != 'transparent') { + if (isset($animation['backgroundcolor']) && $animation['backgroundcolor'] != 'transparent') { $dupData = $linkData; $dupData['type'] = 14; - $dupData['to'] = $animation['backgroundColor']; - $dupData['image_rollover'] = ''; + $dupData['to'] = $animation['backgroundcolor']; + $dupData['uid'] = 'b_' . $linkData['uid']; + if (!isset($animation['zindex'])) { + $animation['zindex'] = 0; + } + $z = intval($animation['zindex']) - 1; + $dupData['image_rollover'] = 'zindex=' . $z; array_push($links, $dupData); array_push($links, $linkData); unset($links[$k]); 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 cf47566c0..0bd110895 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.links.php +++ b/inc/ws/Util/html5/master/class.ws.html5.links.php @@ -206,7 +206,7 @@ class wsHTML5Link } } - public static function parseExtras($extras) + public static function parseExtras($extras, $normalizeKey = false) { $extras = trim($extras); if ($extras === '') { @@ -224,7 +224,11 @@ class wsHTML5Link if (preg_match('|^\"([^\"]+)\"$|', $v, $matches)) { $v = $matches[1]; } - $res[trim($e[0])] = $v; + $k = trim($e[0]); + if ($normalizeKey) { + $k = mb_strtolower($k); + } + $res[$k] = $v; } return $res; @@ -240,7 +244,7 @@ class wsHTML5Link if (!$animation) { continue; } - $extras = self::parseExtras($animation); + $extras = self::parseExtras($animation, true); if (count($extras) > 0) { if (!isset($extras['direction'])) { $extras['direction'] = 'right'; @@ -1278,6 +1282,8 @@ class layerLink extends imageLink class colorLink extends contentLink { + protected $role = ''; + public function getCSS() { return 'background-color:' . wsHTML5::colorToCSS($this->to, 1) . ';'; -- 2.39.5