From 278ba35805d8c7d5925e39edf429dafab22fdf30 Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Mon, 28 Dec 2020 16:45:44 +0000 Subject: [PATCH] wip #4130 @0.5 --- inc/ws/Metier/class.ws.book.parametres.php | 3 ++- inc/ws/Util/html5/master/class.ws.html5.compiler.php | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/inc/ws/Metier/class.ws.book.parametres.php b/inc/ws/Metier/class.ws.book.parametres.php index 083b68c08..267314ebd 100644 --- a/inc/ws/Metier/class.ws.book.parametres.php +++ b/inc/ws/Metier/class.ws.book.parametres.php @@ -523,8 +523,9 @@ class wsBookParametres extends wsParametres $this->fields['mobileVideosPath'] = array('type' => 'text', 'default' => '', 'editable' => true, 'label' => __('Chemin vers les vidéos'), 'grade' => 5); $this->fields['brightcovePlayerId'] = array('type' => 'text', 'default' => '', 'editable' => true, 'label' => __('Brightcove Player Id'), 'grade' => 3); $this->fields['brightcovePlayerSecret'] = array('type' => 'text', 'default' => '', 'editable' => true, 'label' => __('Brightcove Player Secret'), 'grade' => 3); + $this->fields['bigPlayImage'] = ['type' => 'freefile', 'default' => '', 'editable' => true, 'label' => __('Image pour le bouton "Big Play"'), 'grade' => 3, 'fileFilter' => $imageExtraFilter]; $this->forms['videos'] = array('label' => __('Vidéos'), - 'fieldsnames' => array('mobileVideosPath', '|', 'brightcovePlayerId', 'brightcovePlayerSecret')); + 'fieldsnames' => array('mobileVideosPath', '|', 'brightcovePlayerId', 'brightcovePlayerSecret', '|', 'bigPlayImage')); //. $this->fields['audioPlayerTheme'] = ['type' => 'combo', 'default' => 'native', 'editable' => true, 'label' => __('Apparence du lecteur audio'), 'datas' => [__('Apparence native du navigateur') => 'native', __('Zone cliquable invisible') => 'invisible', __('Red Bull') => 'redbull']]; $this->forms['audio'] = ['label' => __('Lecteur audio'), 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 160b6b772..32f57a11f 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/master/class.ws.html5.compiler.php @@ -2263,6 +2263,14 @@ class wsHTML5Compiler $this->lessVariables['tooltip-color'] = wsHTML5::colorToCSS($this->theme->parametres->tooltipTextColor); $this->lessVariables['tooltip-font-size'] = 14 * ($this->theme->parametres->tooltipTextSize / 100); + #Videos + if ($this->book->parametres->bigPlayImage) { + $this->lessVariables['video-bigplay-image'] = '~"../data/links/' . $this->book->parametres->bigPlayImage.'"'; + $this->vdir->copy($this->wdir . '/' . $this->book->parametres->bigPlayImage, 'data/links/' . $this->book->parametres->bigPlayImage); + } else { + $this->lessVariables['video-bigplay-image'] = '~"data:image/svg+xml,%3Csvg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 113.4 113.4\'%3E%3Cstyle%3E.st0%7Bopacity:0.8;%7D .st1%7Bfill:%23FFFFFF;%7D%3C/style%3E%3Cpath class=\'st0\' d=\'M110.5 113.4H2.9c-1.6 0-2.9-1.3-2.9-2.9V2.9C0 1.3 1.3 0 2.9 0h107.6c1.6 0 2.9 1.3 2.9 2.9v107.6c0 1.6-1.3 2.9-2.9 2.9z\'/%3E%3Cpath class=\'st1\' d=\'M45.8 37.8l31.5 17.9c.8.5.8 1.6 0 2.1L45.8 75.6c-.8.5-1.8-.1-1.8-1V38.8c0-.9 1-1.5 1.8-1z\'/%3E%3C/svg%3E"'; + } + #fonts foreach ($this->cssfont as $hash => $item) { $res[] = '@font-face{font-family: "' . $hash . '";src:url("../../data/fonts/' . $hash . '.woff") format("woff");}'; -- 2.39.5