]> _ Git - cubeextranet.git/commitdiff
wait #4888 @0.5
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 17 Nov 2021 15:59:20 +0000 (15:59 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 17 Nov 2021 15:59:20 +0000 (15:59 +0000)
inc/ws/Util/html5/master/class.ws.html5.compiler.php
inc/ws/Util/html5/master/class.ws.html5.links.php

index 851d51e0e3977d5c6ad5b42f6184756bfb95bce0..62fcfb0ec5c781070b382a0b4155a754370af826 100644 (file)
@@ -1872,7 +1872,7 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
                 $dupData['image'] = '';
                 $dupData['animation'] = '';
                 $dupData['to'] = $linkData['image'];
-                $dupData['rollover'] = $linkData['image_rollover'];
+                $dupData['image_rollover'] ='';
                 $dupData['type'] = 15;
                 $dupData['uid'] = 'i_' . $linkData['uid'];
                 if (wsHTML5Link::isScorm($linkData)) {
index 25fcc75a4ee6f10186e93cc63eb80dd0015fdef1..35ad72fb5d8b29a4e0b078149f3557ac408d340f 100644 (file)
@@ -52,6 +52,8 @@ class wsHTML5Link
     public $tooltipBackgroundColor = null;
     public $parallax = 0;
     public $attachLeft = false;
+    public $allowsAnimation = false;
+
     protected $role = 'button';
 
     protected $_init;
@@ -1024,6 +1026,7 @@ class htmlMultimediaPopupImage extends normalLink
 class contentLink extends wsHTML5Link
 {
     public $defaultZIndex = 30;
+    public $allowsAnimation = true;
 
     public function getHTMLContainerClass()
     {
@@ -1033,30 +1036,32 @@ class contentLink extends wsHTML5Link
     public function getAdditionnalContent()
     {
         $res = parent::getAdditionnalContent();
-        $animations = self::parseAnimations($this->image_rollover);
-        foreach ($animations as $animation) {
-            if (isset($animation['blendmode'])) {
-                $this->blendmode = $animation['blendmode'];
-                unset($animation['blendmode']);
-            }
-            if (isset($animation['zindex'])) {
-                $this->zindex = $animation['zindex'];
+        if ($this->allowsAnimation) {
+            $animations = self::parseAnimations($this->image_rollover);
+            foreach ($animations as $animation) {
+                if (isset($animation['blendmode'])) {
+                    $this->blendmode = $animation['blendmode'];
+                    unset($animation['blendmode']);
+                }
+                if (isset($animation['zindex'])) {
+                    $this->zindex = $animation['zindex'];
+                }
+                if (isset($animation['addzindex'])) {
+                    $this->addzindex = $animation['addzindex'];
+                }
+                if (isset($animation['parallax'])) {
+                    $this->parallax = $animation['parallax'];
+                    unlink($animation['parallax']);
+                }
             }
-            if (isset($animation['addzindex'])) {
-                $this->addzindex = $animation['addzindex'];
+            $res .= ' data-animations="' . htmlspecialchars(json_encode($animations), ENT_QUOTES) . '" ';
+            if ($this->_isHiddenFirst($animations)) {
+                $res .= ' data-animation-hide ';
             }
-            if (isset($animation['parallax'])) {
-                $this->parallax = $animation['parallax'];
-                unlink($animation['parallax']);
+            if ($this->_isFinallyHidden($animations)) {
+                $res .= ' data-animation-hide-on-leave ';
             }
         }
-        $res .= ' data-animations="' . htmlspecialchars(json_encode($animations), ENT_QUOTES) . '" ';
-        if ($this->_isHiddenFirst($animations)) {
-            $res .= ' data-animation-hide ';
-        }
-        if ($this->_isFinallyHidden($animations)) {
-            $res .= ' data-animation-hide-on-leave ';
-        }
 
         return $res;
     }