]> _ Git - cubeextranet.git/commitdiff
Merge master changes to burgermenu branch. WIP #807 @0.5
authorstephen@cubedesigners.com <stephen@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 3 Oct 2017 09:45:01 +0000 (09:45 +0000)
committerstephen@cubedesigners.com <stephen@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 3 Oct 2017 09:45:01 +0000 (09:45 +0000)
inc/ws/Util/html5/burgermenu/class.ws.html5.compiler.php

index 1541e237ba68f2ea31fb2e6b22f44359dcc6ce05..6a206ed98362471bde70641735126be6eb0869a5 100644 (file)
@@ -273,6 +273,7 @@ class wsHTML5Compiler {
                $time = $currenttime - $this->logtime;
                $log = $step . ' | ' . round($time, 3) . 's' . "\n";
                fwrite($this->logfp, $log);
+               fflush($this->logfp);
                $this->logtime = $currenttime;
        }
 
@@ -1066,7 +1067,11 @@ class wsHTML5Compiler {
                                $ext = CubeIT_Files::getExtension($referencesFile);
                                if ($ext == 'xlsx') {
                                        $this->config->basketReferences = wsUtil::excelToArray($referencesFile);
+                                       if ($this->book->parametres->customLinkClass == 'AtlanticDownloadLink') {
+                                               $this->config->basketReferences = wsUtil::atlanticReferences($this->config->basketReferences, $this->vdir . '/local/', array($this, 'log'));
+                                       }
                                }
+                               $this->log("Done cart references");
                        }
                }
                $this->config->rasterizePages = cubeArray::parseRange($this->config->rasterizePages);
@@ -1291,7 +1296,9 @@ class wsHTML5Compiler {
                $lessVariables['book-page-width'] = $w;
                $lessVariables['book-page-height'] = $h;
 
-               $res[] = '.portrait #pages,.portrait .doublePage.page,.page,.doublePage._3d,#shadow>div{width:' . $w . ';max-width:' . $w . ';height:' . $h . ';max-height:' . $h . '}';
+               $lessVariables['shadow-opacity'] = wsHTML5::colorToArray($this->theme->parametres->bookShadeColor)['opacity'] * 1.2;
+
+               $res[] = '.portrait #pages,.portrait .doublePage.page,.page,.doublePage._3d{width:' . $w . ';max-width:' . $w . ';height:' . $h . ';max-height:' . $h . '}';
                $res[] = '.doublePage,#pages,#links,#searchHighlights{width:' . $w2 . ';max-width:' . $w2 . ';height:' . $h . ';max-height:' . $h . '}';
                $res[] = '.landscape .doublePage._2d.axis_x.next{' . wsHTML5::writeCSSUA('transform', 'translate3d(' . $w2 . ',0,0)') . '}';
                $res[] = '.landscape .doublePage._2d.axis_x.prev{' . wsHTML5::writeCSSUA('transform', 'translate3d(-' . $w2 . ',0,0)') . '}';
@@ -1302,7 +1309,6 @@ class wsHTML5Compiler {
 
                $res[] = '.doublePage._3d{left:' . $w . ';}';
                $res[] = '#links.right{left:-' . $w . ';}';
-               $res[] = '.landscape #shadow>div.right{left: ' . $w . ';}';
                $res[] = '.landscape .page.right{left:' . $w . '}';
 
                $lessVariables['page-number-color'] = wsHTML5::colorToCSS($this->theme->parametres->colorPageNumber);
@@ -1333,7 +1339,7 @@ class wsHTML5Compiler {
 
                // Theme
                $shade = '.page .shade{';
-               $shade .= 'opacity:' . ($this->theme->parametres->shadeAlpha / 100) . ';';
+               $shade .= 'opacity:' . min(($this->theme->parametres->shadeAlpha * 2) / 100, 1) . ';';
                $shade .= '}';
                $res[] = $shade;
 
@@ -1396,13 +1402,6 @@ class wsHTML5Compiler {
 
                // Audio description buttons
                $res[] = '.audio-description-button{background-color:' . wsHTML5::colorToCSS($this->theme->parametres->couleurA) . ';}';
-
-               // Book shadow
-               $shadowColor = wsHTML5::colorToCSS($this->theme->parametres->bookShadeColor);
-               if ($shadowColor != 'transparent') {
-                       $res[] = '#shadow>div{' . wsHTML5::writeCSSUA('box-shadow', '0 0 20px ' . $shadowColor) . '}';
-               }
-
                $lessVariables['links-color'] = wsHTML5::colorToCSS($this->theme->parametres->linksColor);
 
                // Links Styles