]> _ Git - cubeextranet.git/commitdiff
#1934
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 7 Feb 2018 15:42:59 +0000 (15:42 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 7 Feb 2018 15:42:59 +0000 (15:42 +0000)
inc/ws/Util/html5/master/class.ws.html5.compiler.php
inc/ws/Util/html5/master/class.ws.html5.links.php

index 86484d62604599f17f0ed5902ccfecd7e6a45116..1fb4700e2f0d605a8e4a86090c2925216f0f7e4f 100644 (file)
@@ -1451,9 +1451,8 @@ class wsHTML5Compiler {
                if (!isset($this->book->parametres->bookmarkCornerSize)) {
                        $this->book->parametres->bookmarkCornerSize = 10;
                }
-               $size = round($this->width * $this->book->parametres->bookmarkCornerSize * 0.0075 * $this->z);
-               $res[] = '#links .bookmark{width:' . $size . 'px;height:' . $size . 'px;background-size:' . $size . 'px ' . $size . 'px;}';
-               $res[] = '.portrait #fluidbook .bookmark.left{left:' . ($cssWidth - $size) . 'px;}';
+               $lessVariables['bookmark-corner-size'] = round($this->width * $this->book->parametres->bookmarkCornerSize * 0.0075 * $this->z) . 'px';
+               $lessVariables['bookmark-corner-offset'] = $this->book->parametres->bookmarkOffset . 'px';
 
                // Menus
                $menuColor = new CubeIT_Graphics_Color($this->theme->parametres->couleurB);
index d04bfda46ef93682be36d769491652ccc33e7a8c..fbb2b0c1d784f2746bd8630ae8add2b71dff392d 100644 (file)
@@ -231,7 +231,7 @@ class wsHTML5Link {
        }
 
        public function unzipFile($file, $moveAssets = false) {
-        return $this->compiler->unzipFile($file, $moveAssets);
+               return $this->compiler->unzipFile($file, $moveAssets);
        }
 
        public function getCssScale() {
@@ -749,8 +749,13 @@ class actionLink extends internalLink {
 
        public function getAdditionnalContent() {
                $res = parent::getAdditionnalContent();
-               if ($this->extra) {
-                       $res .= ' data-extra="' . $this->extra . '"';
+               if (is_object($this->extra) || is_array($this->extra)) {
+                       $extra = json_encode($this->extra);
+               } else {
+                       $extra = $this->extra;
+               }
+               if ($extra) {
+                       $res .= ' data-extra="' . htmlspecialchars($extra, ENT_QUOTES) . '"';
                }
 
                if (in_array($this->to, $this->_share)) {