Fix look and feel v13

This commit is contained in:
Laurent Destailleur 2020-10-31 03:50:16 +01:00
parent aafac6f989
commit 44f532e1da
4 changed files with 27 additions and 20 deletions

View File

@ -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 ' <td class="'.$style.' nowrap" width="14%" valign="top">';
echo ' <td class="'.$style.' nowrap tdtop" width="14%">';
show_day_events($db, $max_day_in_prev_month + $tmpday, $prev_month, $prev_year, $month, $style, $eventarray, $maxprint, $maxnbofchar, $newparam);
echo " </td>\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 ' <td class="'.$style.' nowrap" width="14%" valign="top">';
echo ' <td class="'.$style.' nowrap tdtop" width="14%">';
show_day_events($db, $tmpday, $month, $year, $month, $style, $eventarray, $maxprint, $maxnbofchar, $newparam);
echo " </td>\n";
echo "</td>\n";
} else {
/* Show days after the current month (next month) */
$style = 'cal_other_month';
if ($iter_day == 6) $style .= ' cal_other_month_right';
echo ' <td class="'.$style.' nowrap" width="14%" valign="top">';
echo ' <td class="'.$style.' nowrap tdtop" width="14%">';
show_day_events($db, $tmpday - $max_day_in_month, $next_month, $next_year, $month, $style, $eventarray, $maxprint, $maxnbofchar, $newparam);
echo "</td>\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 '<div id="dayevent_'.$dateint.'" class="dayevent tagtable centpercent nobordernopadding">'."\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 '<div id="dayevent_'.$dateint.'" class="cursorpointer dayevent tagtable centpercent nobordernopadding" onclick="window.location=\''.$urltocreate.'\';">'."\n";
if ($nonew <= 0)
{
print '<div class="tagtr"><div class="nowrap float">';
print '<a class="dayevent-aday" style="color: #666" href="'.DOL_URL_ROOT.'/comm/action/index.php?';
print 'action=show_day&day='.str_pad($day, 2, "0", STR_PAD_LEFT).'&month='.str_pad($month, 2, "0", STR_PAD_LEFT).'&year='.$year;
print $newparam;
print '">';
print '<div class="tagtr"><div class="nowrap tagtd">';
print '<a class="dayevent-aday" style="color: #666" href="'.$urltoshow.'">';
if ($showinfo) print dol_print_date($curtime, 'daytextshort');
else print dol_print_date($curtime, '%d');
print '</a>';
print '</div><div class="floatright nowrap">';
print '</div><div class="nowrap tagtd right">';
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 '<a href="'.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 : '')).'">';
print '<a class="cursoradd" href="'.$urltocreate.'">'; // Explicit link, usefull for nojs interfaces
print img_picto($langs->trans("NewAction"), 'edit_add.png');
print '</a>';
}
@ -1838,7 +1840,9 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
break;
}
}
if (!$i) print '&nbsp;';
if (!$i) { // No events
print '&nbsp;';
}
if (!empty($conf->global->MAIN_JS_SWITCH_AGENDA) && $i > $maxprint && $maxprint)
{

View File

@ -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%');
}

View File

@ -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;

View File

@ -2406,7 +2406,8 @@ if (!GETPOST('hide_websitemenu'))
if ($websitekey && $websitekey != '-1' && ($action == 'preview' || $action == 'createfromclone' || $action == 'createpagefromclone' || $action == 'deletesite'))
{
print '<span class="websiteselection">';
print '<a href="'.$_SERVER["PHP_SEFL"].'?action=file_manager&website='.$website->ref.'" class="button bordertransp"'.$disabled.' title="'.dol_escape_htmltag($langs->trans("MediaFiles")).'"><span class="fa fa-image"><span></a>';
//print '<a href="'.$_SERVER["PHP_SELF"].'?action=file_manager&website='.$website->ref.'" class="button bordertransp"'.$disabled.' title="'.dol_escape_htmltag($langs->trans("MediaFiles")).'"><span class="fa fa-image"><span></a>';
print dolButtonToOpenUrlInDialogPopup('file_manager', $langs->transnoentitiesnoconv("MediaFiles"), '<span class="fa fa-image"><span>', '/website/index.php?action=file_manager&website='.$website->ref, $disabled);
if (! empty($conf->categorie->enabled)) {
//print '<a href="'.DOL_URL_ROOT.'/categories/index.php?leftmenu=website&dol_hide_leftmenu=1&nosearch=1&type=website_page&website='.$website->ref.'" class="button bordertransp"'.$disabled.' title="'.dol_escape_htmltag($langs->trans("Categories")).'"><span class="fa fa-tags"><span></a>';