From 44f532e1da7f58dfccd05cce75472a9a11489847 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 31 Oct 2020 03:50:16 +0100 Subject: [PATCH] Fix look and feel v13 --- htdocs/comm/action/index.php | 40 ++++++++++++++++-------------- htdocs/core/js/lib_head.js.php | 2 +- htdocs/theme/eldy/info-box.inc.php | 2 ++ htdocs/website/index.php | 3 ++- 4 files changed, 27 insertions(+), 20 deletions(-) diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index e62f411d786..79c1eb41cea 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -1265,7 +1265,7 @@ if (empty($action) || $action == 'show_month') // View by month /* Show days before the beginning of the current month (previous month) */ $style = 'cal_other_month cal_past'; if ($iter_day == 6) $style .= ' cal_other_month_right'; - echo ' '; + echo ' '; show_day_events($db, $max_day_in_prev_month + $tmpday, $prev_month, $prev_year, $month, $style, $eventarray, $maxprint, $maxnbofchar, $newparam); echo " \n"; } elseif ($tmpday <= $max_day_in_month) { @@ -1278,14 +1278,14 @@ if (empty($action) || $action == 'show_month') // View by month if ($today) $style = 'cal_today'; if ($curtime < $todaytms) $style .= ' cal_past'; //var_dump($todayarray['mday']."==".$tmpday." && ".$todayarray['mon']."==".$month." && ".$todayarray['year']."==".$year.' -> '.$style); - echo ' '; + echo ' '; show_day_events($db, $tmpday, $month, $year, $month, $style, $eventarray, $maxprint, $maxnbofchar, $newparam); - echo " \n"; + echo "\n"; } else { /* Show days after the current month (next month) */ $style = 'cal_other_month'; if ($iter_day == 6) $style .= ' cal_other_month_right'; - echo ' '; + echo ' '; show_day_events($db, $tmpday - $max_day_in_month, $next_month, $next_year, $month, $style, $eventarray, $maxprint, $maxnbofchar, $newparam); echo "\n"; } @@ -1477,28 +1477,30 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa print "\n"; - // Line with title of day $curtime = dol_mktime(0, 0, 0, $month, $day, $year); - print '
'."\n"; + $urltoshow = DOL_URL_ROOT.'/comm/action/index.php?action=show_day&day='.str_pad($day, 2, "0", STR_PAD_LEFT).'&month='.str_pad($month, 2, "0", STR_PAD_LEFT).'&year='.$year.$newparam; + $urltocreate = ''; + if ($user->rights->agenda->myactions->create || $user->rights->agenda->allactions->create) + { + $newparam .= '&month='.str_pad($month, 2, "0", STR_PAD_LEFT).'&year='.$year; + $hourminsec = '100000'; + $urltocreate = DOL_URL_ROOT.'/comm/action/card.php?action=create&datep='.sprintf("%04d%02d%02d", $year, $month, $day).$hourminsec.'&backtopage='.urlencode($_SERVER["PHP_SELF"].($newparam ? '?'.$newparam : '')); + } + + // Line with title of day + print '
'."\n"; if ($nonew <= 0) { - print '
'; - print ''; + print '
'; + print '
'; if ($user->rights->agenda->myactions->create || $user->rights->agenda->allactions->create) { - $newparam .= '&month='.str_pad($month, 2, "0", STR_PAD_LEFT).'&year='.$year; - - //$param='month='.$monthshown.'&year='.$year; - $hourminsec = '100000'; - print ''; + print ''; // Explicit link, usefull for nojs interfaces print img_picto($langs->trans("NewAction"), 'edit_add.png'); print ''; } @@ -1838,7 +1840,9 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa break; } } - if (!$i) print ' '; + if (!$i) { // No events + print ' '; + } if (!empty($conf->global->MAIN_JS_SWITCH_AGENDA) && $i > $maxprint && $maxprint) { diff --git a/htdocs/core/js/lib_head.js.php b/htdocs/core/js/lib_head.js.php index b71dfc3eeb2..9bd9227fffa 100644 --- a/htdocs/core/js/lib_head.js.php +++ b/htdocs/core/js/lib_head.js.php @@ -1135,7 +1135,7 @@ $(document).ready(function() { if (window.location !== window.parent.location ) { console.log("Page is detected to be into an iframe, we hide by CSS the menus"); // The page is in an iframe - jQuery(".side-nav-vert, .side-nav").hide(); + jQuery(".side-nav-vert, .side-nav, .websitebar").hide(); jQuery(".id-container").css('width', '100%'); } diff --git a/htdocs/theme/eldy/info-box.inc.php b/htdocs/theme/eldy/info-box.inc.php index b037cfdc851..3109083b451 100644 --- a/htdocs/theme/eldy/info-box.inc.php +++ b/htdocs/theme/eldy/info-box.inc.php @@ -214,6 +214,8 @@ a.info-box-text-a i.fa.fa-exclamation-triangle { text-transform: uppercase; font-weight: bold; margin-bottom: 3px; /* not too much space so we can add another lines */ + opacity: 1; + color: var(--colortexttitlenotab); } .info-box-text{ font-size: 0.92em; diff --git a/htdocs/website/index.php b/htdocs/website/index.php index dc3407b8f21..32ced5dc2dd 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -2406,7 +2406,8 @@ if (!GETPOST('hide_websitemenu')) if ($websitekey && $websitekey != '-1' && ($action == 'preview' || $action == 'createfromclone' || $action == 'createpagefromclone' || $action == 'deletesite')) { print ''; - print 'ref.'" class="button bordertransp"'.$disabled.' title="'.dol_escape_htmltag($langs->trans("MediaFiles")).'">'; + //print 'ref.'" class="button bordertransp"'.$disabled.' title="'.dol_escape_htmltag($langs->trans("MediaFiles")).'">'; + print dolButtonToOpenUrlInDialogPopup('file_manager', $langs->transnoentitiesnoconv("MediaFiles"), '', '/website/index.php?action=file_manager&website='.$website->ref, $disabled); if (! empty($conf->categorie->enabled)) { //print '';