From: vincent@cubedesigners.com Date: Fri, 17 Dec 2021 09:26:58 +0000 (+0000) Subject: wip #4962 @1 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=dac909a05df8df4bbede65cd9f0f22621bdc1538;p=cubeextranet.git wip #4962 @1 --- diff --git a/inc/ws/Metier/class.ws.book.parametres.php b/inc/ws/Metier/class.ws.book.parametres.php index 45c0446a4..881083b83 100644 --- a/inc/ws/Metier/class.ws.book.parametres.php +++ b/inc/ws/Metier/class.ws.book.parametres.php @@ -576,7 +576,7 @@ class wsBookParametres extends wsParametres $this->forms['videos'] = array('label' => __('Vidéos'), 'fieldsnames' => array('webvideoAsLocal', '|', '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->fields['audioPlayerTheme'] = ['type' => 'combo', 'default' => 'native', 'editable' => true, 'label' => __('Apparence du lecteur audio'), 'datas' => [__('Apparence native du navigateur') => 'native', __('Zone cliquable invisible') => 'invisible', __('Circulaire') => 'redbull']]; $this->forms['audio'] = ['label' => __('Lecteur audio'), 'fieldsnames' => ['audioPlayerTheme']]; //. diff --git a/inc/ws/Metier/class.ws.theme.parametres.php b/inc/ws/Metier/class.ws.theme.parametres.php index 40ba8d1f9..1e4040a95 100644 --- a/inc/ws/Metier/class.ws.theme.parametres.php +++ b/inc/ws/Metier/class.ws.theme.parametres.php @@ -113,13 +113,18 @@ class wsThemeParametres extends wsParametres $this->fields['bookmarkStarEnabledColor'] = array('type' => 'couleur', 'default' => 'ff7700', 'editable' => true, 'label' => __("Couleur de l'étoile activée")); + $this->fields['audioplayerBackgroundColor'] = ['type' => 'text', 'default' => '', 'editable' => true, 'label' => __('Couleur de fond du player audio')]; + $this->fields['audioplayerStrokeColor'] = ['type' => 'text', 'default' => '', 'editable' => true, 'label' => __('Couleur de la ligne de progression')]; + $this->fields['audioplayerIconColor'] = ['type' => 'couleur', 'default' => '#ffffff', 'editable' => true, 'label' => __('Couleur des icônes')]; + $this->forms['book'] = array('label' => __('Personnalisation de la publication'), 'fieldsnames' => array('interfaceFont', 'interfaceFontUppercase', '|', 'shadeAlpha', '|', 'bookShadeColor', '|', 'usePageEdges', '|', 'displayPageNumber', 'colorPageNumber', '|', 'linksColor', 'videoBackgroundColor', '|', 'tooltipBackColor', 'tooltipTextColor', 'tooltipTextSize', 'tooltipPadding', - '|', 'bookmarkBackgroundColor', 'bookmarkStarDisabledColor', 'bookmarkStarEnabledColor')); + '|', 'bookmarkBackgroundColor', 'bookmarkStarDisabledColor', 'bookmarkStarEnabledColor', + '|', 'audioplayerBackgroundColor', 'audioplayerStrokeColor', 'audioplayerIconColor')); /* Credits */ $this->fields['creditsColor'] = array('type' => 'couleurAlpha', 'default' => '80ffffff', 'editable' => true, 'label' => __("Couleur du texte")); 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 eac719596..e61ddb8b6 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/master/class.ws.html5.compiler.php @@ -2648,6 +2648,9 @@ height="0" width="0" style="display:none;visibility:hidden"> $this->lessVariables['edge-right-offset'] = 0; $this->lessVariables['edges-opacity'] = 1; + $this->lessVariables['audioplayer-background-color'] = wsHTML5::colorToCSS($this->theme->parametres->audioplayerBackgroundColor ?: $this->theme->parametres->couleurL); + $this->lessVariables['audioplayer-icon-color'] = wsHTML5::colorToCSS($this->theme->parametres->audioplayerIconColor); + $this->config->audioplayerStrokeColor = $this->lessVariables['audioplayer-stroke-color'] = wsHTML5::colorToCSS($this->theme->parametres->audioplayerStrokeColor ?: $this->theme->parametres->couleurL); $this->lessVariables['page-number-color'] = wsHTML5::colorToCSS($this->theme->parametres->colorPageNumber); $this->lessVariables['display-page-number'] = $this->_lessBoolean($this->theme->parametres->displayPageNumber); diff --git a/inc/ws/Util/html5/master/class.ws.html5.links.php b/inc/ws/Util/html5/master/class.ws.html5.links.php index 46549ce8e..827e66c31 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.links.php +++ b/inc/ws/Util/html5/master/class.ws.html5.links.php @@ -2159,6 +2159,14 @@ class webVideoPopupLink extends videoPopupLink class audioLink extends wsHTML5Link { + public function __construct($id, $init, &$compiler) + { + if ($compiler->book->parametres->audioPlayerTheme === 'redbull') { + $init['height'] = $init['width']; + } + parent::__construct($id, $init, $compiler); + } + public function getHTMLContent() {