From 0cf05a62460b4f5f14353ce3e4380c82889c1318 Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Wed, 18 May 2022 07:46:21 +0000 Subject: [PATCH] wip #4211 @0.5 --- inc/ws/Util/class.ws.exporter.php | 8 ++------ .../Util/html5/icon-bar/class.ws.html5.compiler.php | 10 +++++----- inc/ws/Util/html5/master/class.ws.html5.compiler.php | 12 ++++++------ inc/ws/Util/packager/class.ws.packager.html.php | 12 ++---------- inc/ws/Util/packager/class.ws.packager.php | 2 -- .../Util/packager/class.ws.packager.win.cd.html.php | 1 - .../Util/packager/class.ws.packager.win.exe.html.php | 1 - 7 files changed, 15 insertions(+), 31 deletions(-) diff --git a/inc/ws/Util/class.ws.exporter.php b/inc/ws/Util/class.ws.exporter.php index 4a7ac0c20..90777c176 100644 --- a/inc/ws/Util/class.ws.exporter.php +++ b/inc/ws/Util/class.ws.exporter.php @@ -97,7 +97,7 @@ class wsExporter } $phonegap->setPreference('show-splash-screen-spinner', false); - $phonegap->setPreference('auto-hide-splash-screen', $os==='ios'); + $phonegap->setPreference('auto-hide-splash-screen', $os === 'ios'); $phonegap->setPreference('ios-statusbarstyle', CubeIT_Mobile_Phonegap::BARSTYLE_TRANSLUCENT); $phonegap->setPreference('iosPersistentFileLocation', 'Library'); $phonegap->setPreference('EnableViewportScale', true); @@ -515,11 +515,7 @@ class wsExporter if ($version == 'v2') { return 'html'; } else if ($version == 'online') { - if ($this->book->parametres->version == '1') { - return 'v1'; - } elseif ($this->book->parametres->version == '2') { - return 'html'; - } + return 'html'; } return $version; } diff --git a/inc/ws/Util/html5/icon-bar/class.ws.html5.compiler.php b/inc/ws/Util/html5/icon-bar/class.ws.html5.compiler.php index 4bae88e04..199796540 100644 --- a/inc/ws/Util/html5/icon-bar/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/icon-bar/class.ws.html5.compiler.php @@ -309,7 +309,7 @@ class wsHTML5Compiler $this->initMobileFirst(); } - if ($this->book->parametres->zoomMode == 1 || $this->isMobileFirst()) { + if ($this->isMobileFirst()) { $this->multiply = $this->pdf2htmlRatio * $this->scale * $this->cssOneScale; } else { $this->multiply = $this->pdf2htmlRatio * $this->scale * $this->cssScale; @@ -2015,10 +2015,10 @@ class wsHTML5Compiler } // Archives - if ($this->book->parametres->externalArchivesBack) { - $this->vdir->copy($this->wdir . '/' . $this->book->parametres->externalArchivesBack, 'data/images/' . $this->book->parametres->externalArchivesBack); - $res[] = '.mview.archives{background-image:url("../images/' . $this->book->parametres->externalArchivesBack . '");}'; - } +// if ($this->book->parametres->externalArchivesBack) { +// $this->vdir->copy($this->wdir . '/' . $this->book->parametres->externalArchivesBack, 'data/images/' . $this->book->parametres->externalArchivesBack); +// $res[] = '.mview.archives{background-image:url("../images/' . $this->book->parametres->externalArchivesBack . '");}'; +// } # Index $ratio = $this->width / $this->height; 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 dc87a8074..1dca84b39 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/master/class.ws.html5.compiler.php @@ -289,7 +289,7 @@ class wsHTML5Compiler $this->wdir = $this->book->getAssetDir(); - $this->widget = !$this->phonegap && $this->book->parametres->widget; + $this->widget = false; $this->pages = $this->daoBook->getPagesOfBook($book_id); $this->maxRes = min(300, $this->book->parametres->maxResolution); @@ -350,7 +350,7 @@ class wsHTML5Compiler $this->svgfiles[] = $this->themeRoot . '/' . $this->theme->parametres->symbols; } - if ($this->book->parametres->zoomMode == 1 || $this->isMobileFirst()) { + if ($this->isMobileFirst()) { $this->multiply = $this->pdf2htmlRatio * $this->scale * $this->cssOneScale; } else { $this->multiply = $this->pdf2htmlRatio * $this->scale * $this->cssScale; @@ -2965,10 +2965,10 @@ height="0" width="0" style="display:none;visibility:hidden"> } // Archives - if ($this->book->parametres->externalArchivesBack) { - $this->vdir->copy($this->wdir . '/' . $this->book->parametres->externalArchivesBack, 'data/images/' . $this->book->parametres->externalArchivesBack); - $res[] = '.mview.archives{background-image:url("../images/' . $this->book->parametres->externalArchivesBack . '");}'; - } +// if ($this->book->parametres->externalArchivesBack) { +// $this->vdir->copy($this->wdir . '/' . $this->book->parametres->externalArchivesBack, 'data/images/' . $this->book->parametres->externalArchivesBack); +// $res[] = '.mview.archives{background-image:url("../images/' . $this->book->parametres->externalArchivesBack . '");}'; +// } $this->log('CSS 11'); # Index $thumbw = $this->book->parametres->mobileNavigationType === 'portrait' ? 200 : 100; diff --git a/inc/ws/Util/packager/class.ws.packager.html.php b/inc/ws/Util/packager/class.ws.packager.html.php index b49b72539..c16425249 100644 --- a/inc/ws/Util/packager/class.ws.packager.html.php +++ b/inc/ws/Util/packager/class.ws.packager.html.php @@ -20,7 +20,6 @@ class wsPackagerHTML extends wsPackager { parent::preparePackage(); - $this->book->parametres->alwaysHTML5 = true; if ($this->_disableScorm) { $this->book->parametres->scorm_enable = false; } @@ -104,15 +103,8 @@ class wsPackagerHTML extends wsPackager $keywords = ''; } - $alwaysHTML5 = $this->book->parametres->alwaysHTML5; - if (is_null($alwaysHTML5) || !$alwaysHTML5) { - $alwaysHTML5 = 'false'; - } - - if (!isset($this->book->parametres->html5priority)) { - $this->book->parametres->html5priority = 'true'; - } - $html5priority = $this->book->parametres->html5priority; + $alwaysHTML5 = true; + $html5priority = true; // Stuffs to replace in html diff --git a/inc/ws/Util/packager/class.ws.packager.php b/inc/ws/Util/packager/class.ws.packager.php index fccc27208..011709452 100644 --- a/inc/ws/Util/packager/class.ws.packager.php +++ b/inc/ws/Util/packager/class.ws.packager.php @@ -238,9 +238,7 @@ class wsPackager public function getFinalPackageDir() { $dir = $this->vdir; - if ($this->book->parametres->alwaysHTML5) { $dir .= '/m/'; - } return $dir; } diff --git a/inc/ws/Util/packager/class.ws.packager.win.cd.html.php b/inc/ws/Util/packager/class.ws.packager.win.cd.html.php index 6a8ad1712..ff9f148c6 100644 --- a/inc/ws/Util/packager/class.ws.packager.win.cd.html.php +++ b/inc/ws/Util/packager/class.ws.packager.win.cd.html.php @@ -6,7 +6,6 @@ class wsPackagerWinCDHTML extends wsPackagerMacEXEHTML public function __construct($book_id,$options=[]) { parent::__construct($book_id,$options); - $this->book->parametres->alwaysHTML5 = true; $this->version = 'win_cd_html'; } diff --git a/inc/ws/Util/packager/class.ws.packager.win.exe.html.php b/inc/ws/Util/packager/class.ws.packager.win.exe.html.php index 57c2794b7..659092b77 100644 --- a/inc/ws/Util/packager/class.ws.packager.win.exe.html.php +++ b/inc/ws/Util/packager/class.ws.packager.win.exe.html.php @@ -150,7 +150,6 @@ class wsPackagerWinEXEHTML extends wsPackager protected function compile() { // For exe version, force to export only the html5 version - $this->book->parametres->alwaysHTML5 = true; // No need to export pages with texts for this version, we are certain that svg is supported if enabled if ($this->book->parametres->mobileVersion == 'html5-desktop') { $this->book->parametres->mobileVersion = 'html5'; -- 2.39.5