From: Vincent Vanwaelscappel Date: Fri, 16 Jul 2021 17:43:14 +0000 (+0200) Subject: wip #4216 @0.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=54a7c6230a41501993f8c6a552c6865880be9b3d;p=fluidbook-toolbox.git wip #4216 @0.5 --- diff --git a/app/Models/FluidbookTheme.php b/app/Models/FluidbookTheme.php index 692d3fb3f..6960c3a46 100644 --- a/app/Models/FluidbookTheme.php +++ b/app/Models/FluidbookTheme.php @@ -24,6 +24,8 @@ class FluidbookTheme extends CubistMagicAbstractModel protected static $_colorAlphaToWS2Cache = []; protected $_oldRoot = '/home/extranet/www/fluidbook/'; + protected $_enableTrackNonDefaultValues = true; + public static $updateWS2ViewOnChange = true; public function setFields() @@ -127,9 +129,12 @@ class FluidbookTheme extends CubistMagicAbstractModel ]); $this->addField([ 'name' => 'subSecondaryColor', - 'type' => 'Text', - 'label' => __('Couleur secondaire pour la version HTML5 (boutons)'), + 'type' => 'Color', + 'label' => __('Couleur des boutons'), + 'hint' => __('Laisser vide pour utiliser la couleur calculée par défaut'), 'default' => '', + 'allows_alpha' => false, + 'allows_empty' => true, 'translatable' => false, ]); $this->addField([ @@ -744,7 +749,7 @@ class FluidbookTheme extends CubistMagicAbstractModel public static function _colorToWS2($data) { if ($data === '') { - return null; + return ''; } if (!isset(self::$_colorToWS2Cache[$data])) { self::$_colorToWS2Cache[$data] = self::__colorToWS2($data, false); @@ -883,8 +888,8 @@ class FluidbookTheme extends CubistMagicAbstractModel $get = [$k . '=' . urlencode($v)]; } $get = '?' . implode('&', $get); - }else{ - $get=''; + } else { + $get = ''; } return 'https://workshop.fluidbook.com/viewerh/20098-' . $this->getIdValue() . '_f2e0452eed6dba9878016ce5603fdc54_' . time() . '/' . $get . '#/page/' . $page; }