]> _ Git - cubeextranet.git/commitdiff
wip #4600 @0.5
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 20 Jul 2021 13:37:59 +0000 (13:37 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 20 Jul 2021 13:37:59 +0000 (13:37 +0000)
inc/ws/Util/html5/class.ws.html5.php
inc/ws/Util/html5/master/class.ws.html5.compiler.php

index a6c7d6f6babfe020eee8624ad766128b1a1b46b4..56320f1922660301d2f471de8705949023de35bd 100644 (file)
@@ -16,7 +16,7 @@ class wsHTML5
      * @param null $book\r
      * @return wsHTML5Compiler\r
      */\r
-    public static function compilerFactory($book_id, $version = 'stable', $phonegap = false, $phonegapVersion = 'latest', $dir = null, $standalone = false, $appcache = false, $home = false, $book = null,$forceTheme=false)\r
+    public static function compilerFactory($book_id, $version = 'stable', $phonegap = false, $phonegapVersion = 'latest', $dir = null, $standalone = false, $appcache = false, $home = false, $book = null, $forceTheme = false)\r
     {\r
         if (is_null($version)) {\r
             global $core;\r
@@ -46,7 +46,7 @@ class wsHTML5
             }\r
         }\r
 \r
-        return new wsHTML5Compiler($book_id, $version, $phonegap, $phonegapVersion, $dir, $standalone, $appcache, $home, $book,$forceTheme);\r
+        return new wsHTML5Compiler($book_id, $version, $phonegap, $phonegapVersion, $dir, $standalone, $appcache, $home, $book, $forceTheme);\r
     }\r
 \r
     public static function getPhonegapVersion($v = 'latest')\r
@@ -87,24 +87,6 @@ class wsHTML5
         return implode(';', $res) . ';';\r
     }\r
 \r
-    public static function colorToArray($color, $forceAlpha = null)\r
-    {\r
-        $color = ltrim($color, '#');\r
-        if (strlen($color) == 6) {\r
-            $hex = $color;\r
-            $alpha = 1;\r
-        } else {\r
-            $alpha = hexdec(substr($color, 0, 2)) / 255;\r
-            $hex = substr($color, 2, 6);\r
-        }\r
-\r
-        if (!is_null($forceAlpha)) {\r
-            $alpha = $forceAlpha;\r
-        }\r
-\r
-        return array('hex' => strtoupper($hex), 'opacity' => number_format($alpha, 3, '.', ''));\r
-    }\r
-\r
     public static function colorToCSS($color, $forceAlpha = null)\r
     {\r
         return CubeIT_Graphics_Color::colorToCSS($color, $forceAlpha);\r
index f65b7cf86f360616effcf502a3234c0fe6e50744..010f3127382166f9d58ea09c66430e7a4d543238 100644 (file)
@@ -2367,7 +2367,8 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
         $this->lessVariables['book-page-ratio'] = floatval($w) / floatval($h);
 
         $this->lessVariables['page-shade-opacity'] = min(1, $this->theme->parametres->shadeAlpha / 50);
-        $this->lessVariables['shadow-opacity'] = wsHTML5::colorToArray($this->theme->parametres->bookShadeColor)['opacity'] * 1.2;
+        $c= new CubeIT_Graphics_Color($this->theme->parametres->bookShadeColor);
+        $this->lessVariables['shadow-opacity'] = $c->getAlpha() * 1.2;
         $this->lessVariables['edges-display'] = $this->_lessBoolean($this->theme->parametres->usePageEdges);
         $this->lessVariables['edge-left-offset'] = 0;
         $this->lessVariables['edge-right-offset'] = 0;