]> _ Git - cubeextranet.git/commitdiff
wait #3785 @1
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 25 Aug 2020 13:14:41 +0000 (13:14 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 25 Aug 2020 13:14:41 +0000 (13:14 +0000)
inc/ws/Util/html5/master/class.ws.html5.compiler.php
inc/ws/Util/html5/master/class.ws.html5.links.php

index f80a20f37a5db69c69e4ae2cc4a7cfc267d64ef0..b237344424b32ebc116272bb91974fd3d24ce7ef 100644 (file)
@@ -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]);
index cf47566c088bf93ee26724c3ba82253ca2617a9f..0bd1108951362623afc87f862c638c020e451713 100644 (file)
@@ -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) . ';';