From c71f69ee578c533d49d46bd3ddf6c332d3a26ad7 Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Thu, 23 Apr 2020 17:39:17 +0000 Subject: [PATCH] wait #3612 @1 --- inc/ws/Metier/class.ws.book.parametres.php | 2 +- .../Util/html5/master/class.ws.html5.compiler.php | 14 +++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/inc/ws/Metier/class.ws.book.parametres.php b/inc/ws/Metier/class.ws.book.parametres.php index 0e1eb0a49..dddeca664 100644 --- a/inc/ws/Metier/class.ws.book.parametres.php +++ b/inc/ws/Metier/class.ws.book.parametres.php @@ -453,7 +453,7 @@ class wsBookParametres extends wsParametres $this->fields['splashImage'] = ['type' => 'freefile', 'default' => '', 'editable' => true, 'label' => __('Image'), 'grade' => 3, 'fileFilter' => $imageFilter]; $this->fields['splashURL'] = ['type' => 'text', 'default' => '', 'editable' => true, 'label' => __('URL'), 'grade' => 3]; - $this->fields['splashMinimalTime'] = ['type' => 'float', 'default' => '5', 'editable' => true, 'label' => __('Temps minimal d\'affichage'), 'grade' => 3]; + $this->fields['splashMinimalTime'] = ['type' => 'float', 'default' => '1', 'editable' => true, 'label' => __('Temps minimal d\'affichage'), 'grade' => 3]; $this->forms['splash'] = ['label' => __('Ecran de chargement'), 'fieldsnames' => ['splashImage', 'splashURL', 'splashMinimalTime']]; 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 d1c581dd8..958a1e108 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/master/class.ws.html5.compiler.php @@ -53,6 +53,7 @@ class wsHTML5Compiler 'fluidbook' => ['js/libs/fluidbook/fluidbook.utils.js', 'js/libs/fluidbook/fluidbook.networkcontrol.js', + 'js/libs/fluidbook/fluidbook.splash.js', 'js/libs/fluidbook/fluidbook.links.js', 'js/libs/fluidbook/fluidbook.support.js', 'js/libs/fluidbook/fluidbook.video.js', @@ -934,7 +935,14 @@ class wsHTML5Compiler $message = sprintf($this->__('Your browser is not up to date and is not able to run this publication. %sLearn more%s'), '
', ''); $splash = ''; - if ($this->theme->parametres->logoLoader && file_exists($this->themeRoot . $this->theme->parametres->logoLoader)) { + $splashstyles = ''; + if ($this->book->parametres->splashImage) { + $this->vdir->copy($this->wdir . '/' . $this->book->parametres->splashImage, 'data/images/' . $this->book->parametres->splashImage); + $splashstyles = 'background-image:url(' . 'data/images/' . $this->book->parametres->splashImage . ');background-size:contain;background-position:50% 50%;'; + if ($this->book->parametres->splashURL !== '') { + $splash = ''; + } + } else if ($this->theme->parametres->logoLoader && file_exists($this->themeRoot . $this->theme->parametres->logoLoader)) { $dim = CubeIT_Image::getimagesize($this->themeRoot . $this->theme->parametres->logoLoader); if ($dim !== false) { $this->vdir->copy($this->themeRoot . '/' . $this->theme->parametres->logoLoader, 'data/images/' . $this->theme->parametres->logoLoader); @@ -955,7 +963,7 @@ class wsHTML5Compiler if ($this->phonegap) { $csp = "securityPolicyWhitelist)) . "; img-src * data:\">"; } - $vars = array('credits', 'style', 'script', 'pagesContents', 'print', 'hiddenContents', 'splash', 'cache', 'bgcolor', 'message', 'favicon', 'svg', 'beginbody', 'csp', 'opengraph', 'twittercard'); + $vars = array('credits', 'style', 'script', 'pagesContents', 'print', 'hiddenContents', 'splash', 'splashstyles', 'cache', 'bgcolor', 'message', 'favicon', 'svg', 'beginbody', 'csp', 'opengraph', 'twittercard'); $res = []; foreach ($vars as $v) { @@ -1295,7 +1303,7 @@ class wsHTML5Compiler $linksCopy = $links; foreach ($linksCopy as $k => $linkData) { - if ($linkData['type'] == 35 || $linkData['type']==15) { + if ($linkData['type'] == 35 || $linkData['type'] == 15) { $linkData = wsLinks::decryptLink($linkData); $animation = contentLink::parseAnimation($linkData['image_rollover']); if (isset($animation['backgroundColor']) && $animation['backgroundColor'] != 'transparent') { -- 2.39.5