]> _ Git - cubeextranet.git/commitdiff
wip #4962 @1
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Fri, 17 Dec 2021 09:26:58 +0000 (09:26 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Fri, 17 Dec 2021 09:26:58 +0000 (09:26 +0000)
inc/ws/Metier/class.ws.book.parametres.php
inc/ws/Metier/class.ws.theme.parametres.php
inc/ws/Util/html5/master/class.ws.html5.compiler.php
inc/ws/Util/html5/master/class.ws.html5.links.php

index 45c0446a46ccaa170f6bec905043089c70d77d40..881083b834a3b8ed60844a74a0a1a6fce6b2514c 100644 (file)
@@ -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']];
         //.
index 40ba8d1f9a09c04839613389ff8d86e18dd38130..1e4040a95e85af8546bc9abef29d2cbd61cdec19 100644 (file)
@@ -113,13 +113,18 @@ class wsThemeParametres extends wsParametres
         $this->fields['bookmarkStarEnabledColor'] = array('type' => 'couleur', 'default' => 'ff7700', 'editable' => true,\r
             'label' => __("Couleur de l'étoile activée"));\r
 \r
+        $this->fields['audioplayerBackgroundColor'] = ['type' => 'text', 'default' => '', 'editable' => true, 'label' => __('Couleur de fond du player audio')];\r
+        $this->fields['audioplayerStrokeColor'] = ['type' => 'text', 'default' => '', 'editable' => true, 'label' => __('Couleur de la ligne de progression')];\r
+        $this->fields['audioplayerIconColor'] = ['type' => 'couleur', 'default' => '#ffffff', 'editable' => true, 'label' => __('Couleur des icônes')];\r
+\r
         $this->forms['book'] = array('label' => __('Personnalisation de la publication'),\r
             'fieldsnames' => array('interfaceFont', 'interfaceFontUppercase', '|', 'shadeAlpha',\r
                 '|', 'bookShadeColor', '|', 'usePageEdges',\r
                 '|', 'displayPageNumber', 'colorPageNumber',\r
                 '|', 'linksColor', 'videoBackgroundColor',\r
                 '|', 'tooltipBackColor', 'tooltipTextColor', 'tooltipTextSize', 'tooltipPadding',\r
-                '|', 'bookmarkBackgroundColor', 'bookmarkStarDisabledColor', 'bookmarkStarEnabledColor'));\r
+                '|', 'bookmarkBackgroundColor', 'bookmarkStarDisabledColor', 'bookmarkStarEnabledColor',\r
+                '|', 'audioplayerBackgroundColor', 'audioplayerStrokeColor', 'audioplayerIconColor'));\r
         /* Credits */\r
         $this->fields['creditsColor'] = array('type' => 'couleurAlpha', 'default' => '80ffffff', 'editable' => true,\r
             'label' => __("Couleur du texte"));\r
index eac719596de884575a8ed83b30b2c55749cd135a..e61ddb8b6590d3593b1c6c9014bce7ac2fed36f0 100644 (file)
@@ -2648,6 +2648,9 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
         $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);
index 46549ce8e556f541e7801f37f201e1fb51d13d33..827e66c31673e9d7f0661aa703e8324cb4285c61 100644 (file)
@@ -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()
     {