]> _ Git - cubeextranet.git/commitdiff
fix #1161 @2
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Fri, 17 Feb 2017 14:57:46 +0000 (14:57 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Fri, 17 Feb 2017 14:57:46 +0000 (14:57 +0000)
inc/ws/DAO/class.ws.dao.book.php
inc/ws/Util/html5/class.ws.html5.compiler.php

index 87d1c186b6ef9b046eccb23f73c505002404bab5..a16cec5aff88e1e8f7ce70f9ceb8180a290d7e53 100644 (file)
@@ -1204,6 +1204,7 @@ class wsDAOBook extends commonDAO {
 
                $index = '';
                $textes = '';
+               $pageLabels = array();
 
                $hash = $book_id;
                $hash .= 'kjgl!az4.';
@@ -1282,6 +1283,10 @@ class wsDAOBook extends commonDAO {
                                $audiodescription[$link['page']] = $link['to'];
                                $ignoreLinks[] = $id;
                        }
+                       if ($link['type'] == 26) {
+                               $pageLabels[$link['to']] = $link['page'];
+                               $ignoreLinks[] = $id;
+                       }
                }
 
                foreach ($ignoreLinks as $ignoreLink) {
@@ -1300,6 +1305,7 @@ class wsDAOBook extends commonDAO {
                }
 
                $flex->addVariable('audiodescription', $audiodescription, false, true, "JSONObject");
+               $flex->addVariable('pagelabels', $pageLabels, false, true, 'JSONObject');
                $flex->addVariable('links', $links, false, true, 'JSONObject');
 
                $flex->addVariable('signature', $exportSignature, false, true, 'JSONObject');
index de3b7af4b2f8f5012b969c37e851d3ccd7624212..fda34eb6bee0c84ef12c3c35eeadab0500073381 100644 (file)
@@ -113,6 +113,7 @@ class wsHTML5Compiler {
        protected $numerotation;
        protected $fontDocs = array();
        protected $dir;
+       protected $z = 3;
        public $vdir;
        public $wdir;
 
@@ -159,7 +160,7 @@ class wsHTML5Compiler {
        protected $home;
        protected $widget = true;
        protected $multiApp = false;
-       protected $pageLabels = array('two' => 2);
+       protected $pageLabels = array();
 
        function __construct($book_id, $version = 'stable', $phonegap = false, $phonegapVersion = 'latest', $dir = null, $standalone = false, $appcache = false, $home = false) {
                global $core;
@@ -223,8 +224,8 @@ class wsHTML5Compiler {
                $imagesize = getimagesize(wsDocument::getDir($this->pages[1]['document_id']) . 'html/h150-' . $this->pages[1]['document_page'] . '.jpg');
                $this->pdf2htmlRatio = round(($imagesize[0] * 0.48) / $this->width, 3);
 
-               $this->cssScale = min($this->optimalWidth / $this->width, $this->optimalHeight / $this->height);
-               $this->cssOneScale = min(($this->optimalWidth * 2) / $this->width, $this->optimalHeight / $this->height);
+               $this->cssScale = $this->z * min($this->optimalWidth / $this->width, $this->optimalHeight / $this->height);
+               $this->cssOneScale = $this->z * min(($this->optimalWidth * 2) / $this->width, $this->optimalHeight / $this->height);
 
                $this->cssWidth = $this->width * $this->cssScale;
                $this->cssHeight = $this->height * $this->cssScale;
@@ -1261,7 +1262,7 @@ class wsHTML5Compiler {
                if (!isset($this->book->parametres->bookmarkCornerSize)) {
                        $this->book->parametres->bookmarkCornerSize = 10;
                }
-               $size = round($this->width * $this->book->parametres->bookmarkCornerSize * 0.0075);
+               $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;}';