Debug v19

This commit is contained in:
Laurent Destailleur
2023-12-30 19:50:41 +01:00
parent 5d159e8231
commit 8b51aa507b
4 changed files with 14 additions and 14 deletions

View File

@@ -1702,7 +1702,7 @@ function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsr
$idw = 0; $idw = 0;
$tableCell = ''; $tableCell = '';
$tableCell .= '<span class="timesheetalreadyrecorded" title="texttoreplace"><input type="text" class="center" size="2" disabled id="timespent['.$inc.']['.$idw.']" name="task['.$lines[$i]->id.']['.$idw.']" value="'.$alreadyspent.'"></span>'; $tableCell .= '<span class="timesheetalreadyrecorded" title="texttoreplace"><input type="text" class="center width40" disabled id="timespent['.$inc.']['.$idw.']" name="task['.$lines[$i]->id.']['.$idw.']" value="'.$alreadyspent.'"></span>';
$tableCell .= '<span class="hideonsmartphone"> + </span>'; $tableCell .= '<span class="hideonsmartphone"> + </span>';
//$tableCell.='&nbsp;&nbsp;&nbsp;'; //$tableCell.='&nbsp;&nbsp;&nbsp;';
$tableCell .= $form->select_duration($lines[$i]->id.'duration', '', $disabledtask, 'text', 0, 1); $tableCell .= $form->select_duration($lines[$i]->id.'duration', '', $disabledtask, 'text', 0, 1);
@@ -2103,11 +2103,11 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$
//$tableCell .= 'idw='.$idw.' '.$conf->global->MAIN_START_WEEK.' '.$numstartworkingday.'-'.$numendworkingday; //$tableCell .= 'idw='.$idw.' '.$conf->global->MAIN_START_WEEK.' '.$numstartworkingday.'-'.$numendworkingday;
$placeholder = ''; $placeholder = '';
if ($alreadyspent) { if ($alreadyspent) {
$tableCell .= '<span class="timesheetalreadyrecorded" title="texttoreplace"><input type="text" class="center smallpadd" size="2" disabled id="timespent['.$inc.']['.$idw.']" name="task['.$lines[$i]->id.']['.$idw.']" value="'.$alreadyspent.'"></span>'; $tableCell .= '<span class="timesheetalreadyrecorded" title="texttoreplace"><input type="text" class="center smallpadd width40" disabled id="timespent['.$inc.']['.$idw.']" name="task['.$lines[$i]->id.']['.$idw.']" value="'.$alreadyspent.'"></span>';
//$placeholder=' placeholder="00:00"'; //$placeholder=' placeholder="00:00"';
//$tableCell.='+'; //$tableCell.='+';
} }
$tableCell .= '<input type="text" alt="'.($disabledtaskday ? '' : $alttitle).'" title="'.($disabledtaskday ? '' : $alttitle).'" '.($disabledtaskday ? 'disabled' : $placeholder).' class="center smallpadd" size="2" id="timeadded['.$inc.']['.$idw.']" name="task['.$lines[$i]->id.']['.$idw.']" value="" cols="2" maxlength="5"'; $tableCell .= '<input type="text" alt="'.($disabledtaskday ? '' : $alttitle).'" title="'.($disabledtaskday ? '' : $alttitle).'" '.($disabledtaskday ? 'disabled' : $placeholder).' class="center smallpadd width40" id="timeadded['.$inc.']['.$idw.']" name="task['.$lines[$i]->id.']['.$idw.']" value="" cols="2" maxlength="5"';
$tableCell .= ' onkeypress="return regexEvent(this,event,\'timeChar\')"'; $tableCell .= ' onkeypress="return regexEvent(this,event,\'timeChar\')"';
$tableCell .= ' onkeyup="updateTotal('.$idw.',\''.$modeinput.'\')"'; $tableCell .= ' onkeyup="updateTotal('.$idw.',\''.$modeinput.'\')"';
$tableCell .= ' onblur="regexEvent(this,event,\''.$modeinput.'\'); updateTotal('.$idw.',\''.$modeinput.'\')" />'; $tableCell .= ' onblur="regexEvent(this,event,\''.$modeinput.'\'); updateTotal('.$idw.',\''.$modeinput.'\')" />';
@@ -2387,12 +2387,12 @@ function projectLinesPerMonth(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &
$tableCell = '<td class="center hide weekend">'; $tableCell = '<td class="center hide weekend">';
$placeholder = ''; $placeholder = '';
if ($alreadyspent) { if ($alreadyspent) {
$tableCell .= '<span class="timesheetalreadyrecorded" title="texttoreplace"><input type="text" class="center smallpadd" size="2" disabled id="timespent['.$inc.']['.((int) $weekNb).']" name="task['.$lines[$i]->id.']['.$weekNb.']" value="'.$alreadyspent.'"></span>'; $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>';
//$placeholder=' placeholder="00:00"'; //$placeholder=' placeholder="00:00"';
//$tableCell.='+'; //$tableCell.='+';
} }
$tableCell .= '<input type="text" alt="'.($disabledtaskweek ? '' : $alttitle).'" title="'.($disabledtaskweek ? '' : $alttitle).'" '.($disabledtaskweek ? 'disabled' : $placeholder).' class="center smallpadd" size="2" id="timeadded['.$inc.']['.((int) $weekNb).']" name="task['.$lines[$i]->id.']['.($TFirstDay[$weekNb] - 1).']" value="" cols="2" maxlength="5"'; $tableCell .= '<input type="text" alt="'.($disabledtaskweek ? '' : $alttitle).'" title="'.($disabledtaskweek ? '' : $alttitle).'" '.($disabledtaskweek ? 'disabled' : $placeholder).' class="center smallpadd width40" id="timeadded['.$inc.']['.((int) $weekNb).']" name="task['.$lines[$i]->id.']['.($TFirstDay[$weekNb] - 1).']" value="" cols="2" maxlength="5"';
$tableCell .= ' onkeypress="return regexEvent(this,event,\'timeChar\')"'; $tableCell .= ' onkeypress="return regexEvent(this,event,\'timeChar\')"';
$tableCell .= ' onkeyup="updateTotal('.$weekNb.',\''.$modeinput.'\')"'; $tableCell .= ' onkeyup="updateTotal('.$weekNb.',\''.$modeinput.'\')"';
$tableCell .= ' onblur="regexEvent(this,event,\''.$modeinput.'\'); updateTotal('.$weekNb.',\''.$modeinput.'\')" />'; $tableCell .= ' onblur="regexEvent(this,event,\''.$modeinput.'\'); updateTotal('.$weekNb.',\''.$modeinput.'\')" />';
@@ -2818,7 +2818,7 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks
print '<table width="100%">'; print '<table width="100%">';
print '<tr>'; print '<tr>';
print '<td>'.$langs->trans("Year").'</td>'; print '<td>'.$langs->trans("Year").'</td>';
print '<td class="right"><input type="text" size="4" class="flat" name="project_year_filter" value="'.$project_year_filter.'"/>'; print '<td class="right"><input type="text" size="4" class="flat" name="project_year_filter" value="'.((int) $project_year_filter).'"/>';
print "</tr>\n"; print "</tr>\n";
print '</table></form>'; print '</table></form>';
} }

View File

@@ -753,7 +753,7 @@ if (count($tasksarray) > 0) {
$timeonothertasks = ($totalforeachday[$daytoparse] - $totalforvisibletasks[$daytoparse]); $timeonothertasks = ($totalforeachday[$daytoparse] - $totalforvisibletasks[$daytoparse]);
//if ($timeonothertasks) //if ($timeonothertasks)
//{ //{
print '<span class="timesheetalreadyrecorded" title="texttoreplace"><input type="text" class="center" size="2" disabled="" id="timespent[-1][0]" name="task[-1][0]" value="'; print '<span class="timesheetalreadyrecorded" title="texttoreplace"><input type="text" class="center width40" disabled="" id="timespent[-1][0]" name="task[-1][0]" value="';
if ($timeonothertasks) { if ($timeonothertasks) {
print convertSecondToTime($timeonothertasks, 'allhourmin'); print convertSecondToTime($timeonothertasks, 'allhourmin');
} }
@@ -803,7 +803,7 @@ if (!empty($conf->use_javascript_ajax)) {
print "\n<!-- JS CODE TO ENABLE Tooltips on all object with class classfortooltip -->\n"; print "\n<!-- JS CODE TO ENABLE Tooltips on all object with class classfortooltip -->\n";
print '<script type="text/javascript">'."\n"; print '<script type="text/javascript">'."\n";
print "jQuery(document).ready(function () {\n"; print "jQuery(document).ready(function () {\n";
print " updateTotal(0,'".dol_escape_js($modeinput)."');\n"; print " updateTotal(0, '".dol_escape_js($modeinput)."');\n";
print ' jQuery(".timesheetalreadyrecorded").tooltip({ print ' jQuery(".timesheetalreadyrecorded").tooltip({
show: { collision: "flipfit", effect:\'toggle\', delay:50 }, show: { collision: "flipfit", effect:\'toggle\', delay:50 },
hide: { effect:\'toggle\', delay: 50 }, hide: { effect:\'toggle\', delay: 50 },
@@ -812,7 +812,7 @@ if (!empty($conf->use_javascript_ajax)) {
return \''.dol_escape_js($langs->trans("TimeAlreadyRecorded", $usertoprocess->getFullName($langs))).'\'; return \''.dol_escape_js($langs->trans("TimeAlreadyRecorded", $usertoprocess->getFullName($langs))).'\';
} }
});'."\n"; });'."\n";
print " jQuery('.inputhour, .inputminute').bind('keyup', function(e) { updateTotal(0, '".$modeinput."') });"; print " jQuery('.inputhour, .inputminute').bind('keyup', function(e) { updateTotal(0, '".dol_escape_js($modeinput)."') });";
print "\n});\n"; print "\n});\n";
print '</script>'; print '</script>';
} }

View File

@@ -567,7 +567,7 @@ if (count($tasksarray) > 0) {
$timeonothertasks = ($totalforeachweek[$weekNb] - $totalforvisibletasks[$weekNb]); $timeonothertasks = ($totalforeachweek[$weekNb] - $totalforvisibletasks[$weekNb]);
if ($timeonothertasks) { if ($timeonothertasks) {
print '<span class="timesheetalreadyrecorded" title="texttoreplace"><input type="text" class="center smallpadd" size="2" disabled="" id="timespent[-1]['.$weekNb.']" name="task[-1]['.$weekNb.']" value="'; print '<span class="timesheetalreadyrecorded" title="texttoreplace"><input type="text" class="center smallpadd width40" disabled="" id="timespent[-1]['.$weekNb.']" name="task[-1]['.$weekNb.']" value="';
print convertSecondToTime($timeonothertasks, 'allhourmin'); print convertSecondToTime($timeonothertasks, 'allhourmin');
print '"></span>'; print '"></span>';
} }
@@ -619,7 +619,7 @@ if ($conf->use_javascript_ajax) {
});'."\n"; });'."\n";
foreach ($TWeek as $week_number) { foreach ($TWeek as $week_number) {
print ' updateTotal('.$week_number.',\''.$modeinput.'\');'; print " updateTotal(".((int) $week_number).", '".dol_escape_js($modeinput)."');";
} }
print "\n});\n"; print "\n});\n";
print '</script>'; print '</script>';

View File

@@ -725,7 +725,7 @@ if ($conf->use_javascript_ajax) {
} elseif (!$isavailable[$tmpday]['afternoon']) { } elseif (!$isavailable[$tmpday]['afternoon']) {
$cssonholiday .= 'onholidayafternoon '; $cssonholiday .= 'onholidayafternoon ';
} }
print '<td class="liste_total hide'.$idw.($cssonholiday ? ' '.$cssonholiday : '').($cssweekend ? ' '.$cssweekend : '').'" align="center"><div class="totalDay'.$idw.'">&nbsp;</div></td>'; print '<td class="liste_total center hide'.$idw.($cssonholiday ? ' '.$cssonholiday : '').($cssweekend ? ' '.$cssweekend : '').'"><div class="totalDay'.$idw.'">&nbsp;</div></td>';
} }
print '<td class="liste_total center"><div class="totalDayAll">&nbsp;</div></td>'; print '<td class="liste_total center"><div class="totalDayAll">&nbsp;</div></td>';
print '</tr>'; print '</tr>';
@@ -805,7 +805,7 @@ if (count($tasksarray) > 0) {
$tmpday = dol_time_plus_duree($firstdaytoshow, $idw, 'd'); $tmpday = dol_time_plus_duree($firstdaytoshow, $idw, 'd');
$timeonothertasks = ($totalforeachday[$tmpday] - $totalforvisibletasks[$tmpday]); $timeonothertasks = ($totalforeachday[$tmpday] - $totalforvisibletasks[$tmpday]);
if ($timeonothertasks) { if ($timeonothertasks) {
print '<span class="timesheetalreadyrecorded" title="texttoreplace"><input type="text" class="center smallpadd" size="2" disabled="" id="timespent[-1]['.$idw.']" name="task[-1]['.$idw.']" value="'; print '<span class="timesheetalreadyrecorded" title="texttoreplace"><input type="text" class="center smallpadd width40" disabled="" id="timespent[-1]['.$idw.']" name="task[-1]['.$idw.']" value="';
print convertSecondToTime($timeonothertasks, 'allhourmin'); print convertSecondToTime($timeonothertasks, 'allhourmin');
print '"></span>'; print '"></span>';
} }
@@ -877,7 +877,7 @@ if ($conf->use_javascript_ajax) {
$idw = 0; $idw = 0;
while ($idw < 7) { while ($idw < 7) {
print ' updateTotal('.$idw.',\''.$modeinput.'\');'; print " updateTotal(".((int) $idw).", '".dol_escape_js($modeinput)."');";
$idw++; $idw++;
} }
print "\n});\n"; print "\n});\n";