From d040f5c8a9d2e19e8b50468876a88930d31790de Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 31 Jul 2023 20:16:49 +0200 Subject: [PATCH] Experiment color type --- htdocs/core/class/html.formother.class.php | 29 +++++++++++++++++++--- htdocs/theme/eldy/global.inc.php | 4 ++- htdocs/theme/md/style.css.php | 3 +++ 3 files changed, 32 insertions(+), 4 deletions(-) diff --git a/htdocs/core/class/html.formother.class.php b/htdocs/core/class/html.formother.class.php index 0485b3ef296..a4f52be7fe4 100644 --- a/htdocs/core/class/html.formother.class.php +++ b/htdocs/core/class/html.formother.class.php @@ -847,8 +847,9 @@ class FormOther $out = ''; if (!is_array($arrayofcolors) || count($arrayofcolors) < 1) { + // Case of selection of any color $langs->load("other"); - if (empty($conf->dol_use_jmobile) && !empty($conf->use_javascript_ajax)) { + if (empty($conf->dol_use_jmobile) && !empty($conf->use_javascript_ajax) && !getDolGlobalInt('MAIN_USE_HTML5_COLOR_SELECTOR')) { $out .= ''; $out .= ''; $out .= ''; + $out .= ''; + } else { + $out .= ''; + $out .= ''; } - $out .= ''; - } else { // In most cases, this is not used. We used instead function with no specific list of colors + } else { + // In most cases, this is not used. We used instead function with no specific list of colors if (empty($conf->dol_use_jmobile) && !empty($conf->use_javascript_ajax)) { $out .= ''; $out .= ''; diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 190d6159afb..7811870ccdb 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -5713,7 +5713,9 @@ A.none, A.none:active, A.none:visited, A.none:hover { padding : 0px; margin : 0px; } - +.colorselector { + border: solid 1px #ddd !important; +} /* Style to overwrites JQuery styles */ .ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight { diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 14a1bbb24c4..25a861281e1 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -5720,6 +5720,9 @@ A.none, A.none:active, A.none:visited, A.none:hover { padding : 0px; margin : 0px; } +.colorselector { + border: solid 1px #ddd !important; +} /* Style to overwrites JQuery styles */