From 2904cc803f30cd4dc8178ae6adfa6b79d13c972d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 18 Feb 2021 13:56:13 +0100 Subject: [PATCH] Fix selection in combo --- htdocs/admin/pdf.php | 3 +- htdocs/comm/action/index.php | 43 +++++++++++++++------- htdocs/core/class/html.formadmin.class.php | 6 +-- htdocs/core/lib/functions.lib.php | 2 +- htdocs/theme/eldy/global.inc.php | 2 +- htdocs/theme/md/style.css.php | 2 +- 6 files changed, 37 insertions(+), 21 deletions(-) diff --git a/htdocs/admin/pdf.php b/htdocs/admin/pdf.php index 008e5277bc3..ec93c95b045 100644 --- a/htdocs/admin/pdf.php +++ b/htdocs/admin/pdf.php @@ -326,7 +326,8 @@ print ''; print ''.$langs->trans("PDF_USE_ALSO_LANGUAGE_CODE").''; //if (! empty($conf->global->MAIN_MULTILANGS)) //{ -print $formadmin->select_language(GETPOSTISSET('PDF_USE_ALSO_LANGUAGE_CODE') ? GETPOST('PDF_USE_ALSO_LANGUAGE_CODE') : (!empty($conf->global->PDF_USE_ALSO_LANGUAGE_CODE) ? $conf->global->PDF_USE_ALSO_LANGUAGE_CODE : 0), 'PDF_USE_ALSO_LANGUAGE_CODE', 0, null, 1); +$selected = GETPOSTISSET('PDF_USE_ALSO_LANGUAGE_CODE') ? GETPOST('PDF_USE_ALSO_LANGUAGE_CODE') : (!empty($conf->global->PDF_USE_ALSO_LANGUAGE_CODE) ? $conf->global->PDF_USE_ALSO_LANGUAGE_CODE : 0); +print $formadmin->select_language($selected, 'PDF_USE_ALSO_LANGUAGE_CODE', 0, null, 1); //} else { // print ''.$langs->trans("MultiLangNotEnabled").''; //} diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index 0b3e2f7223a..50d10c9a4c9 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -834,8 +834,8 @@ if ($showbirthday) } // HOLIDAYS CALENDAR -if ($conf->global->AGENDA_SHOW_HOLIDAYS) -{ +//if ($conf->global->AGENDA_SHOW_HOLIDAYS) +//{ $sql = "SELECT u.rowid as uid, u.lastname, u.firstname, u.statut, x.rowid, x.date_debut as date_start, x.date_fin as date_end, x.halfday, x.statut as status"; $sql .= " FROM ".MAIN_DB_PREFIX."holiday as x, ".MAIN_DB_PREFIX."user as u"; $sql .= " WHERE u.rowid = x.fk_user"; @@ -920,7 +920,7 @@ if ($conf->global->AGENDA_SHOW_HOLIDAYS) $i++; } } -} +//} // EXTERNAL CALENDAR // Complete $eventarray with external import Ical @@ -1514,6 +1514,10 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa global $theme_datacolor; global $cachethirdparties, $cachecontacts, $cacheusers, $colorindexused; + if ($conf->use_javascript_ajax) { // Enable the "Show more button..." + $conf->global->MAIN_JS_SWITCH_AGENDA = 1; + } + $dateint = sprintf("%04d", $year).sprintf("%02d", $month).sprintf("%02d", $day); print "\n"; @@ -1645,7 +1649,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa // Define color $color = sprintf("%02x%02x%02x", $theme_datacolor[$colorindex][0], $theme_datacolor[$colorindex][1], $theme_datacolor[$colorindex][2]); } - $cssclass = $cssclass.' '.$cssclass.'_day_'.$ymd; + $cssclass = $cssclass.' eventday_'.$ymd; // Defined style to disable drag and drop feature if ($event->type_code == 'AC_OTH_AUTO') @@ -1676,10 +1680,17 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa if ($action == 'show_day') { $h = 'height: 100%; '; $nowrapontd = 0; } if ($action == 'show_week') { $h = 'height: 100%; '; $nowrapontd = 0; } - // Show rect of event + // Show event box print "\n"; print ''."\n"; - print '
= $maxprint) { + $morecss = 'showifmore'; + } + if ($event->type == 'holiday' && !GETPOST('check_birthday')) { + $morecss = 'hidden'; + } + print '
global->MAIN_JS_SWITCH_AGENDA) && $i > $maxprint && $maxprint) { - print '
'.img_picto("all", "1downarrow_selected.png").' +'.$langs->trans("More").'...
'; + print '
'.img_picto("All", "angle-double-down", 'class="warning"').' +'.($i - $maxprint).'
'; //print ' +'.(count($eventarray[$daykey])-$maxprint); print '