Debug v20
This commit is contained in:
parent
4374ecebad
commit
a2971da463
6 changed files with 31 additions and 15 deletions
|
|
@ -1662,7 +1662,7 @@ function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsr
|
|||
}
|
||||
|
||||
// Select hour
|
||||
print '<td class="nowraponall leftborder center minwidth150imp">';
|
||||
print '<td class="nowraponall leftborder center minwidth150imp borderleft">';
|
||||
$tableCell = $form->selectDate($preselectedday, $lines[$i]->id, 1, 1, 2, "addtime", 0, 0, $disabledtask);
|
||||
print $tableCell;
|
||||
print '</td>';
|
||||
|
|
@ -2063,7 +2063,9 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$
|
|||
// Fields to show current time
|
||||
$tableCell = '';
|
||||
$modeinput = 'hours';
|
||||
$j = 0;
|
||||
for ($idw = 0; $idw < 7; $idw++) {
|
||||
$j++;
|
||||
$tmpday = dol_time_plus_duree($firstdaytoshow, $idw, 'd');
|
||||
if (!isset($totalforeachday[$tmpday])) {
|
||||
$totalforeachday[$tmpday] = 0;
|
||||
|
|
@ -2099,7 +2101,7 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$
|
|||
$disabledtaskday = 1;
|
||||
}
|
||||
|
||||
$tableCell = '<td class="center hide'.$idw.($cssonholiday ? ' '.$cssonholiday : '').($cssweekend ? ' '.$cssweekend : '').'">';
|
||||
$tableCell = '<td class="center hide'.$idw.($cssonholiday ? ' '.$cssonholiday : '').($cssweekend ? ' '.$cssweekend : '').($j <= 1 ? ' borderleft' : '').'">';
|
||||
//$tableCell .= 'idw='.$idw.' '.$conf->global->MAIN_START_WEEK.' '.$numstartworkingday.'-'.$numendworkingday;
|
||||
$placeholder = '';
|
||||
if ($alreadyspent) {
|
||||
|
|
@ -2376,7 +2378,9 @@ function projectLinesPerMonth(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &
|
|||
$firstdaytoshowarray = dol_getdate($firstdaytoshow);
|
||||
$year = $firstdaytoshowarray['year'];
|
||||
$month = $firstdaytoshowarray['mon'];
|
||||
$j = 0;
|
||||
foreach ($TWeek as $weekIndex => $weekNb) {
|
||||
$j++;
|
||||
$weekWorkLoad = !empty($projectstatic->monthWorkLoadPerTask[$weekNb][$lines[$i]->id]) ? $projectstatic->monthWorkLoadPerTask[$weekNb][$lines[$i]->id] : 0 ;
|
||||
if (!isset($totalforeachweek[$weekNb])) {
|
||||
$totalforeachweek[$weekNb] = 0;
|
||||
|
|
@ -2396,7 +2400,7 @@ function projectLinesPerMonth(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &
|
|||
$disabledtaskweek = 1;
|
||||
}
|
||||
|
||||
$tableCell = '<td class="center hide weekend">';
|
||||
$tableCell = '<td class="center hide'.($j <= 1 ? ' borderleft' : '').'">';
|
||||
$placeholder = '';
|
||||
if ($alreadyspent) {
|
||||
$tableCell .= '<span class="timesheetalreadyrecorded" title="texttoreplace"><input type="text" class="center smallpadd width40" disabled id="timespent['.$inc.']['.((int) $weekNb).']" name="task['.$lines[$i]->id.']['.$weekNb.']" value="'.$alreadyspent.'"></span>';
|
||||
|
|
|
|||
|
|
@ -685,7 +685,7 @@ print "</tr>\n";
|
|||
|
||||
$colspan = 2 + (!getDolGlobalString('PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT') ? 0 : 2);
|
||||
|
||||
if ($conf->use_javascript_ajax) {
|
||||
if ($conf->use_javascript_ajax && count($tasksarray) >= getDolGlobalInt('NBLINES_TO_DUPLICATE_TOTAL_TIMESPENT_ON_TOP', 10)) {
|
||||
print '<tr class="liste_total hideonsmartphone">';
|
||||
print '<td class="liste_total" colspan="'.($colspan - 1 + $addcolspan).'">';
|
||||
print $langs->trans("Total");
|
||||
|
|
@ -757,7 +757,7 @@ if (count($tasksarray) > 0) {
|
|||
print '<td class="liste_total"></td>';
|
||||
}
|
||||
print '<td class="leftborder"></td>';
|
||||
print '<td class="center">';
|
||||
print '<td class="right">';
|
||||
$timeonothertasks = ($totalforeachday[$daytoparse] - $totalforvisibletasks[$daytoparse]);
|
||||
//if ($timeonothertasks)
|
||||
//{
|
||||
|
|
@ -768,7 +768,7 @@ if (count($tasksarray) > 0) {
|
|||
print '"></span>';
|
||||
//}
|
||||
print '</td>';
|
||||
print ' <td class="liste_total"></td>';
|
||||
print ' <td class="liste_total borderleft"></td>';
|
||||
print ' <td class="liste_total"></td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
|
@ -782,7 +782,7 @@ if (count($tasksarray) > 0) {
|
|||
print '<td class="liste_total"></td>';
|
||||
print '<td class="liste_total"></td>';
|
||||
}
|
||||
print '<td class="liste_total leftborder">';
|
||||
print '<td class="liste_total leftborder borderleft">';
|
||||
//print ' - '.$langs->trans("ExpectedWorkedHours").': <strong>'.price($usertoprocess->weeklyhours, 1, $langs, 0, 0).'</strong>';
|
||||
print '</td>';
|
||||
|
||||
|
|
|
|||
|
|
@ -707,8 +707,10 @@ if (count($tasksarray) > 0) {
|
|||
print '<td class="liste_total"></td>';
|
||||
print '<td class="liste_total"></td>';
|
||||
}
|
||||
$j = 0;
|
||||
foreach ($TWeek as $weekNb) {
|
||||
print '<td class="center hide">';
|
||||
$j++;
|
||||
print '<td class="center hide'.($j <= 1 ? ' borderleft' : '').'">';
|
||||
|
||||
$timeonothertasks = ($totalforeachweek[$weekNb] - $totalforvisibletasks[$weekNb]);
|
||||
if ($timeonothertasks) {
|
||||
|
|
@ -733,8 +735,10 @@ if (count($tasksarray) > 0) {
|
|||
print '<td class="liste_total"></td>';
|
||||
}
|
||||
|
||||
$j = 0;
|
||||
foreach ($TWeek as $weekNb) {
|
||||
print '<td class="liste_total hide'.$weekNb.'" align="center"><div class="totalDay'.$weekNb.'">'.convertSecondToTime($totalforvisibletasks[$weekNb], 'allhourmin').'</div></td>';
|
||||
$j++;
|
||||
print '<td class="liste_total hide'.$weekNb.' center'.($j <= 1 ? ' borderleft' : '').'"><div class="totalDay'.$weekNb.'">'.convertSecondToTime($totalforvisibletasks[$weekNb], 'allhourmin').'</div></td>';
|
||||
}
|
||||
print '<td class="liste_total center"><div class="totalDayAll"> </div></td>
|
||||
</tr>';
|
||||
|
|
|
|||
|
|
@ -707,7 +707,7 @@ print "</tr>\n";
|
|||
$colspan = 1 + (!getDolGlobalString('PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT') ? 0 : 2);
|
||||
|
||||
// Show lines with total
|
||||
if ($conf->use_javascript_ajax) {
|
||||
if ($conf->use_javascript_ajax && count($tasksarray) >= getDolGlobalInt('NBLINES_TO_DUPLICATE_TOTAL_TIMESPENT_ON_TOP', 10)) {
|
||||
print '<tr class="liste_total hideonsmartphone">';
|
||||
print '<td class="liste_total" colspan="'.($colspan + $addcolspan).'">';
|
||||
print $langs->trans("Total");
|
||||
|
|
@ -804,13 +804,15 @@ if (count($tasksarray) > 0) {
|
|||
print '<td class="liste_total"></td>';
|
||||
print '<td class="liste_total"></td>';
|
||||
}
|
||||
$j = 0;
|
||||
for ($idw = 0; $idw < 7; $idw++) {
|
||||
$j++;
|
||||
$cssweekend = '';
|
||||
if ((($idw + 1) < $numstartworkingday) || (($idw + 1) > $numendworkingday)) { // This is a day is not inside the setup of working days, so we use a week-end css.
|
||||
$cssweekend = 'weekend';
|
||||
}
|
||||
|
||||
print '<td class="center hide'.$idw.' '.($cssweekend ? ' '.$cssweekend : '').'">';
|
||||
print '<td class="center hide'.$idw.' '.($cssweekend ? ' '.$cssweekend : '').($j <= 1 ? ' borderleft' : '').'">';
|
||||
$tmpday = dol_time_plus_duree($firstdaytoshow, $idw, 'd');
|
||||
$timeonothertasks = ($totalforeachday[$tmpday] - $totalforvisibletasks[$tmpday]);
|
||||
if ($timeonothertasks) {
|
||||
|
|
@ -835,7 +837,9 @@ if (count($tasksarray) > 0) {
|
|||
print '<td class="liste_total"></td>';
|
||||
}
|
||||
|
||||
$j = 0;
|
||||
for ($idw = 0; $idw < 7; $idw++) {
|
||||
$j++;
|
||||
$cssweekend = '';
|
||||
if ((($idw + 1) < $numstartworkingday) || (($idw + 1) > $numendworkingday)) { // This is a day is not inside the setup of working days, so we use a week-end css.
|
||||
$cssweekend = 'weekend';
|
||||
|
|
@ -852,7 +856,7 @@ if (count($tasksarray) > 0) {
|
|||
$cssonholiday .= 'onholidayafternoon ';
|
||||
}
|
||||
|
||||
print '<td class="liste_total hide'.$idw.($cssonholiday ? ' '.$cssonholiday : '').($cssweekend ? ' '.$cssweekend : '').'" align="center"><div class="totalDay'.$idw.'"> </div></td>';
|
||||
print '<td class="liste_total center hide'.$idw.($cssonholiday ? ' '.$cssonholiday : '').($cssweekend ? ' '.$cssweekend : '').($j <= 1 ? ' borderleft' : '').'"><div class="totalDay'.$idw.'"> </div></td>';
|
||||
}
|
||||
print '<td class="liste_total center"><div class="totalDayAll"> </div></td>';
|
||||
print '</tr>';
|
||||
|
|
|
|||
|
|
@ -533,11 +533,15 @@ td.onholidayallday:not(.weekend) input {
|
|||
background-color: #f8f7f0;
|
||||
}
|
||||
td.weekend { /* must be after td.onholidayallday */
|
||||
background-color: #eee;
|
||||
background-color: #f8f4f4;
|
||||
}
|
||||
td.weekend input {
|
||||
background-color: #f8f8f8;
|
||||
/* background-color: #f8f8f8; */
|
||||
}
|
||||
tr:hover td.weekend {
|
||||
background: var(--colorbacklinepairhover) !important;
|
||||
}
|
||||
|
||||
/*
|
||||
td.leftborder, td.hide0 {
|
||||
border-left: 1px solid #ccc;
|
||||
|
|
|
|||
|
|
@ -736,7 +736,7 @@ td.weekend { /* must be after td.onholidayallday */
|
|||
background-color: #eee;
|
||||
}
|
||||
td.weekend input {
|
||||
background-color: #f8f8f8;
|
||||
/* background-color: #f8f8f8; */
|
||||
}
|
||||
td.leftborder, td.hide0 {
|
||||
border-left: 1px solid #ccc;
|
||||
|
|
|
|||
Loading…
Reference in a new issue