]> _ Git - cubeextranet.git/commitdiff
wip #2569 @2
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Fri, 1 Feb 2019 15:51:35 +0000 (15:51 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Fri, 1 Feb 2019 15:51:35 +0000 (15:51 +0000)
inc/ws/Util/html5/master/class.ws.html5.links.php

index a6528ba5bc9d6121d0d15da0486c7661418f004f..a4d264581a383015e53ac4f6c1ccfba711ee99e5 100644 (file)
@@ -604,6 +604,21 @@ class contentLink extends wsHTML5Link
                return parent::getHTMLContainerClass() . ' contentLink';
        }
 
+       public function getAdditionnalContent()
+       {
+               $res = parent::getAdditionnalContent();
+               $animation = trim($this->image_rollover);
+               if ($animation != '') {
+                       $variables = [];
+                       $lines = CubeIT_Text::splitLines($animation);
+                       foreach ($lines as $line) {
+                               $e = explode('=', $line);
+                               $variables[trim($e[0])] = trim($e[1]);
+                       }
+                       $res .= ' data-animation="' . htmlspecialchars(json_encode($variables), ENT_QUOTES) . '" ';
+               }
+               return $res;
+       }
 }
 
 class eventOverlayLink extends wsHTML5Link