From 65ae8b639a6303461faab72163d2fb0b157171c2 Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Thu, 21 Dec 2017 17:52:03 +0000 Subject: [PATCH] done #1840 @0.5 --- inc/ws/Metier/class.ws.book.parametres.php | 3 ++- inc/ws/Util/html5/master/class.ws.html5.compiler.php | 9 ++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/inc/ws/Metier/class.ws.book.parametres.php b/inc/ws/Metier/class.ws.book.parametres.php index d535d974c..b8bdfc42b 100644 --- a/inc/ws/Metier/class.ws.book.parametres.php +++ b/inc/ws/Metier/class.ws.book.parametres.php @@ -136,8 +136,9 @@ class wsBookParametres extends wsParametres { $this->fields['extraYSpace'] = array('type' => 'integer', 'default' => '0', 'editable' => true, 'label' => __('Marge supplémentaire verticale'), 'grade' => 3); $this->fields['centerBook'] = array('type' => 'boolean', 'default' => true, 'editable' => true, 'label' => __('Centrer la publication sur les couvertures'), 'grade' => 2); $this->fields['correctCenter'] = array('type' => 'boolean', 'default' => true, 'editable' => true, 'label' => __('Corriger les lignes blanches entre les pages'), 'grade' => 2); + $this->fields['maxResolution'] = array('type' => 'combo', 'default' => 300, 'editable' => true, 'datas' => array('300dpi' => 300, '150dpi' => 150), 'grade' => 2, 'label' => __('Résolution maximale des pages')); $this->forms['3d_mode'] = array('label' => __('Options de visualisation'), - 'fieldsnames' => array('visualisationMode', 'antialiasReading', 'correctCenter', 'pagesBaseAngle', 'centerBook', '|', 'extraXSpace', 'extraYSpace', '|', 'viewMode')); + 'fieldsnames' => array('visualisationMode', 'antialiasReading', 'correctCenter', 'pagesBaseAngle', 'centerBook', '|', 'extraXSpace', 'extraYSpace', '|', 'viewMode', '|', 'maxResolution')); $this->fields['preload'] = array('type' => 'integer', 'default' => 16, 'editable' => true, 'label' => __('Nombre de pages à précharger'), 'grade' => 3); diff --git a/inc/ws/Util/html5/master/class.ws.html5.compiler.php b/inc/ws/Util/html5/master/class.ws.html5.compiler.php index 9380b1796..6a6a20637 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/master/class.ws.html5.compiler.php @@ -756,6 +756,13 @@ class wsHTML5Compiler { $this->vdir->copy($this->wdir . '/' . $this->book->parametres->navExtraImageMobile, 'data/images/' . $this->book->parametres->navExtraImageMobile); } + for ($i = 1; $i <= 5; $i++) { + $ic = $this->book->parametres->{'navExtraIcon' . $i}; + if ($ic != '') { + $this->vdir->copy($this->wdir . '/' . $ic, 'data/images/' . $ic); + } + } + } protected function writeLinks() { @@ -1019,7 +1026,7 @@ class wsHTML5Compiler { $this->config->videoFormats = $this->getVideosFormats(false); $this->config->htmlmultimedia = $this->htmlmultimedia; $this->config->phonegap = $this->phonegap; - $this->config->retinaResolution = $this->maxRes; + $this->config->retinaResolution = min($this->book->parametres->maxResolution, $this->maxRes); $this->config->pageLabels = $this->pageLabels; $this->config->pageZoomFactor = $this->z; $this->config->multiply = $this->multiply; -- 2.39.5