]> _ Git - cubeextranet.git/commitdiff
Merge bookedges in master @1
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 25 Sep 2017 15:17:25 +0000 (15:17 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 25 Sep 2017 15:17:25 +0000 (15:17 +0000)
inc/ws/Controlleur/class.ws.maintenance.php
inc/ws/Util/html5/master/class.ws.html5.compiler.php

index 575da1bd65c7b002c3642ee07428ee6935d2b11f..a8c05a285f007819b96a1cf725e2216e4028d3ed 100644 (file)
@@ -527,8 +527,9 @@ class wsMaintenance {
                //
                $dirs = array(ROOT . '/cache/download',
                              WS_FILES . '/packager/download/',
-                             WS_FILES . '/packager/',
-                             '/home/ws/www/download');
+                             // WS_FILES . '/packager/',
+                             //'/home/ws/www/download',
+               );
                // Clean downloads
 
                foreach ($dirs as $dir) {
@@ -701,7 +702,7 @@ class wsMaintenance {
 
                header('Content-Type: text/plain');
                foreach ($book->chapters as $c) {
-                                               echo str_repeat("\t", $c->level);
+                       echo str_repeat("\t", $c->level);
                        echo $c->label;
                        echo ' ' . $c->page;
                        echo "\n";
@@ -713,10 +714,10 @@ class wsMaintenance {
        public static function copySommaire($args) {
                global $core;
                $from = $args[0];
-               $to=$args[1];
+               $to = $args[1];
                $dao = new wsDAOBook($core->con);
                $fbook = $dao->selectById($from);
-               $dao->setChapters($to,json_encode($fbook->chapters));
+               $dao->setChapters($to, json_encode($fbook->chapters));
        }
 
        public static function copyComposition($args) {
index c74a8baebb98b15f66147bd2a8894159519ead0c..295a639aedbcc49d3314bb4795f5ed0ec2ead591 100644 (file)
@@ -1278,7 +1278,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)') . '}';
@@ -1289,7 +1291,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);
@@ -1320,7 +1321,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;
 
@@ -1383,13 +1384,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