]> _ Git - cubeextranet.git/commitdiff
wait #4460
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 6 May 2021 18:23:26 +0000 (18:23 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 6 May 2021 18:23:26 +0000 (18:23 +0000)
inc/ws/Util/html5/master/class.ws.html5.links.php

index 9b5ba33ffc3caf85e3de73a80de4b634ddb186c9..953e62ef08358faafd5baecb6025ab85ed78ee1e 100644 (file)
@@ -1496,7 +1496,12 @@ class layerLink extends imageLink
         if (!$this->rightClone) {
             zoomLink::generateImage($attributes, $this->compiler, 'layerlink', 'layer');
         }
-        return 'background-image:url(../links/layer_' . $attributes['id'] . '.jpg);background-size:100% 100%;background-repeat:no-repeat;';
+        return 'background-image:url(' . $this->getImageUrl() . ');background-size:100% 100%;background-repeat:no-repeat;';
+    }
+
+    public function getImageUrl()
+    {
+        return '../links/layer_' . $this->uid . '.jpg';
     }
 
     public function getZoomAttributes()
@@ -1565,15 +1570,21 @@ class textLink extends contentLink
 class imageLink extends contentLink
 {
 
+    public function getImageUrl()
+    {
+        return wsHTML5Link::getUniversalLocation($this->to, true);
+    }
+
     public function getCSS()
     {
         $this->copyExternalFile($this->to);
-        return 'background-image:url(' . wsHTML5Link::getUniversalLocation($this->to, true) . ');background-size:100% 100%;background-repeat:no-repeat;';
+        return 'background-image:url(' . $this->getImageUrl() . ');background-size:100% 100%;background-repeat:no-repeat;';
     }
 
     public function getAdditionnalContent()
     {
         $res = parent::getAdditionnalContent();
+        $res .= ' data-image="' . $this->getImageUrl() . '"';
         $res .= ' data-rollover="' . $this->rollover . '"';
         return $res;
     }