From a45af7e4c4d2e019e092b8d10b07b2d8505d694d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 11 Oct 2024 19:41:31 +0200 Subject: [PATCH] Fix responsive --- htdocs/admin/menus.php | 16 +++++++++++----- htdocs/admin/menus/index.php | 3 ++- htdocs/core/class/html.formadmin.class.php | 13 ++++++++----- htdocs/core/menus/standard/auguria.lib.php | 1 - 4 files changed, 21 insertions(+), 12 deletions(-) diff --git a/htdocs/admin/menus.php b/htdocs/admin/menus.php index 39b376216d0..ca4e6567721 100644 --- a/htdocs/admin/menus.php +++ b/htdocs/admin/menus.php @@ -149,13 +149,18 @@ print ''; print dol_get_fiche_head($head, 'handler', '', -1); -print ''.$langs->trans("MenusDesc")."
\n"; -print "

\n"; +print '
'.$langs->trans("MenusDesc")."
\n"; +print '
'; +print "
\n"; clearstatcache(); -// Gestionnaires de menu +// Menu manager choice + +print "\n"; +print '
'; + print ''; print ''; print ''; print ''; print '
'.$langs->trans("Menu").''; @@ -182,7 +187,7 @@ print ''; $formadmin->select_menu(getDolGlobalString('MAIN_MENU_SMARTPHONE_FORCED', getDolGlobalString('MAIN_MENU_SMARTPHONE')), 'MAIN_MENU_SMARTPHONE', array_merge($dirstandard, $dirsmartphone), !getDolGlobalString('MAIN_MENU_SMARTPHONE_FORCED') ? '' : ' disabled'); if (getDolGlobalString('MAIN_MENU_SMARTPHONE_FORCED') && preg_match('/smartphone/', $conf->global->MAIN_MENU_SMARTPHONE_FORCED) - || (!getDolGlobalString('MAIN_MENU_SMARTPHONE_FORCED') && getDolGlobalString('MAIN_MENU_SMARTPHONE') && preg_match('/smartphone/', $conf->global->MAIN_MENU_SMARTPHONE))) { + || (!getDolGlobalString('MAIN_MENU_SMARTPHONE_FORCED') && getDolGlobalString('MAIN_MENU_SMARTPHONE') && preg_match('/smartphone/', getDolGlobalString('MAIN_MENU_SMARTPHONE')))) { print ' '.img_warning($langs->transnoentitiesnoconv("ThisForceAlsoTheme")); } @@ -191,7 +196,7 @@ print ''; $formadmin->select_menu(getDolGlobalString('MAIN_MENUFRONT_SMARTPHONE_FORCED', getDolGlobalString('MAIN_MENUFRONT_SMARTPHONE')), 'MAIN_MENUFRONT_SMARTPHONE', array_merge($dirstandard, $dirsmartphone), !getDolGlobalString('MAIN_MENUFRONT_SMARTPHONE_FORCED') ? '' : ' disabled'); if (getDolGlobalString('MAIN_MENU_SMARTPHONE_FORCED') && preg_match('/smartphone/', $conf->global->MAIN_MENUFRONT_SMARTPHONE_FORCED) - || (!getDolGlobalString('MAIN_MENUFRONT_SMARTPHONE_FORCED') && getDolGlobalString('MAIN_MENU_SMARTPHONE') && preg_match('/smartphone/', $conf->global->MAIN_MENUFRONT_SMARTPHONE))) { + || (!getDolGlobalString('MAIN_MENUFRONT_SMARTPHONE_FORCED') && getDolGlobalString('MAIN_MENU_SMARTPHONE') && preg_match('/smartphone/', getDolGlobalString('MAIN_MENUFRONT_SMARTPHONE')))) { print ' '.img_warning($langs->transnoentitiesnoconv("ThisForceAlsoTheme")); } @@ -199,6 +204,7 @@ print '
'; +print '
'; print dol_get_fiche_end(); diff --git a/htdocs/admin/menus/index.php b/htdocs/admin/menus/index.php index e686b426523..0ad6f60a42f 100644 --- a/htdocs/admin/menus/index.php +++ b/htdocs/admin/menus/index.php @@ -223,7 +223,8 @@ $h++; print dol_get_fiche_head($head, 'editor', '', -1); -print ''.$langs->trans("MenusEditorDesc")."
\n"; +print ''.$langs->trans("MenusEditorDesc").""; +print '
'."\n"; print "
\n"; diff --git a/htdocs/core/class/html.formadmin.class.php b/htdocs/core/class/html.formadmin.class.php index a62ab3f9866..f0a7b099c4a 100644 --- a/htdocs/core/class/html.formadmin.class.php +++ b/htdocs/core/class/html.formadmin.class.php @@ -224,7 +224,8 @@ class FormAdmin continue; // We exclude all menu manager files } - $filelib = preg_replace('/\.php$/i', '', $file); + $filetoshow = preg_replace('/\.php$/i', '', $file); + $filetoshow = ucfirst(preg_replace('/_menu$/i', '', $filetoshow)); $prefix = ''; // 0=Recommended, 1=Experimental, 2=Development, 3=Other if (preg_match('/^eldy/i', $file)) { @@ -240,10 +241,12 @@ class FormAdmin $morelabel .= ' ('.$langs->trans("Unstable").')'; } if ($file == $selected) { - $menuarray[$prefix.'_'.$file] = ''; } else { - $menuarray[$prefix.'_'.$file] = ''; } } @@ -256,7 +259,7 @@ class FormAdmin ksort($menuarray); // Output combo list of menus - print ''; $oldprefix = ''; foreach ($menuarray as $key => $val) { $tab = explode('_', $key); @@ -287,7 +290,7 @@ class FormAdmin $oldprefix = $newprefix; } - print $val."\n"; // Show menu entry ($val contains the