From 2f8ee92c51239a0bef03182776ccee4fa11fd080 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 11 Dec 2020 02:02:41 +0100 Subject: [PATCH] Fix CSS --- htdocs/core/class/html.formwebsite.class.php | 11 ++++- htdocs/theme/eldy/global.inc.php | 8 ++-- htdocs/theme/eldy/info-box.inc.php | 2 +- htdocs/website/index.php | 48 +++++++++++--------- 4 files changed, 42 insertions(+), 27 deletions(-) diff --git a/htdocs/core/class/html.formwebsite.class.php b/htdocs/core/class/html.formwebsite.class.php index 763a7bbe64f..0f3e9a357b8 100644 --- a/htdocs/core/class/html.formwebsite.class.php +++ b/htdocs/core/class/html.formwebsite.class.php @@ -34,6 +34,11 @@ class FormWebsite */ public $error; + /** + * var int A number of lines + */ + public $num; + /** * Constructor @@ -220,11 +225,11 @@ class FormWebsite * @param string $action Action on page that use this select list * @param string $morecss More CSS * @param array $excludeids Exclude some ID in list - * @return string HTML select component with list of type of containers + * @return string HTML select component with list of block containers */ public function selectContainer($website, $htmlname = 'pageid', $pageid = 0, $showempty = 0, $action = '', $morecss = 'minwidth200', $excludeids = null) { - global $langs; + $this->num = 0; $atleastonepage = (is_array($website->lines) && count($website->lines) > 0); @@ -273,6 +278,8 @@ class FormWebsite $out .= '>'; $out .= $valueforoption; $out .= ''; + + ++$this->num; } } $out .= ''; diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index b0ddba41b5c..4ff10708001 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -97,10 +97,7 @@ if (!empty($conf->global->THEME_DARKMODEENABLED)) { body { background-color: #FFFFFF; - - background: var(--colorbackbody); - color: var(--colortext); font-size: ; line-height: 1.4; font-family: ; @@ -5398,6 +5395,9 @@ input.select2-input { { background-color: var(--colorbackvmenu1); } +.select2-container--default .select2-selection--single { + background-color: var(--colorbackbody); +} #blockvmenusearch .select2-container--default .select2-selection--single .select2-selection__placeholder { color: var(--colortextbackvmenu); } @@ -5506,6 +5506,8 @@ input.select2-input { /*background-color: var(--colorbackvmenu1); border: 1px solid var(--colorbackvmenu1); */ box-shadow: 1px 2px 10px var(--colorbackvmenu1); + background-color: var(--colorbackbody); + color: var(--colortext); } .select2-dropdown-open { background-color: var(--colorbackvmenu1); diff --git a/htdocs/theme/eldy/info-box.inc.php b/htdocs/theme/eldy/info-box.inc.php index 1bb6ae7c67e..d582260ca63 100644 --- a/htdocs/theme/eldy/info-box.inc.php +++ b/htdocs/theme/eldy/info-box.inc.php @@ -25,7 +25,7 @@ if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> .info-box.info-box-sm { min-height: 80px; margin-bottom: 10px; - background: #fff; + /* background: #fff; */ } .opened-dash-board-wrap .info-box.info-box-sm { border-radius: 0 0 0 20px; diff --git a/htdocs/website/index.php b/htdocs/website/index.php index b6f274c375d..99d00c019ad 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -2518,27 +2518,33 @@ if (!GETPOST('hide_websitemenu')) if ($action != 'addcontainer') { - print ''; - print $formwebsite->selectContainer($website, 'pageid', $pageid, 0, $action, 'maxwidth200onsmartphone'); - print ''; - - $urltocreatenewpage = $_SERVER["PHP_SEFL"].'?action=createcontainer&website='.$website->ref; - $out = ''; - if (!empty($conf->use_javascript_ajax)) { - $out .= ''; + + $s = $formwebsite->selectContainer($website, 'pageid', $pageid, 0, $action, 'maxwidth200onsmartphone'); + + if ($formwebsite->num > 0) { + $out .= ''; + $out .= $s; + $out .= ''; + + $urltocreatenewpage = $_SERVER["PHP_SEFL"].'?action=createcontainer&website='.$website->ref; + + if (!empty($conf->use_javascript_ajax)) { + $out .= ''; + } } + print $out; } else { @@ -2579,9 +2585,9 @@ if (!GETPOST('hide_websitemenu')) } if ($pagepreviousid) print ''.img_previous($langs->trans("PreviousContainer")).''; - else print ''.img_previous($langs->trans("PreviousContainer")).''; + else print ''.img_previous($langs->trans("Previous")).''; if ($pagenextid) print ''.img_next($langs->trans("NextContainer")).''; - else print ''.img_next($langs->trans("NextContainer")).''; + else print ''.img_next($langs->trans("Next")).''; $websitepage = new WebSitePage($db); if ($pageid > 0 && ($action == 'preview' || $action == 'createfromclone' || $action == 'createpagefromclone'))