FIX avoid unnecessary multiple calculation (#22637)
This commit is contained in:
parent
69ca6c02d7
commit
765e619cee
@ -1226,13 +1226,14 @@ function projectLinesPerAction(&$inc, $parent, $fuser, $lines, &$level, &$projec
|
||||
|
||||
print convertSecondToTime($lines[$i]->timespent_duration, 'allhourmin');
|
||||
|
||||
$modeinput = 'hours';
|
||||
// Comment for avoid unnecessary multiple calculation
|
||||
/*$modeinput = 'hours';
|
||||
|
||||
print '<script type="text/javascript">';
|
||||
print "jQuery(document).ready(function () {\n";
|
||||
print " jQuery('.inputhour, .inputminute').bind('keyup', function(e) { updateTotal(0, '".$modeinput."') });";
|
||||
print "})\n";
|
||||
print '</script>';
|
||||
print '</script>';*/
|
||||
|
||||
print '</td>';
|
||||
|
||||
@ -1613,13 +1614,14 @@ function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsr
|
||||
//$tableCell.=' <input type="submit" class="button"'.($disabledtask?' disabled':'').' value="'.$langs->trans("Add").'">';
|
||||
print $tableCell;
|
||||
|
||||
$modeinput = 'hours';
|
||||
// Comment for avoid unnecessary multiple calculation
|
||||
/*$modeinput = 'hours';
|
||||
|
||||
print '<script type="text/javascript">';
|
||||
print "jQuery(document).ready(function () {\n";
|
||||
print " jQuery('.inputhour, .inputminute').bind('keyup', function(e) { updateTotal(0, '".$modeinput."') });";
|
||||
print "})\n";
|
||||
print '</script>';
|
||||
print '</script>';*/
|
||||
|
||||
print '</td>';
|
||||
|
||||
|
||||
@ -795,12 +795,12 @@ print '</div>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
$modeinput = 'hours';
|
||||
|
||||
if ($conf->use_javascript_ajax) {
|
||||
if (!empty($conf->use_javascript_ajax)) {
|
||||
$modeinput = 'hours';
|
||||
print "\n<!-- JS CODE TO ENABLE Tooltips on all object with class classfortooltip -->\n";
|
||||
print '<script type="text/javascript">'."\n";
|
||||
print "jQuery(document).ready(function () {\n";
|
||||
print " updateTotal(0,\''.$modeinput.'\');\n";
|
||||
print ' jQuery(".timesheetalreadyrecorded").tooltip({
|
||||
show: { collision: "flipfit", effect:\'toggle\', delay:50 },
|
||||
hide: { effect:\'toggle\', delay: 50 },
|
||||
@ -809,8 +809,7 @@ if ($conf->use_javascript_ajax) {
|
||||
return \''.dol_escape_js($langs->trans("TimeAlreadyRecorded", $usertoprocess->getFullName($langs))).'\';
|
||||
}
|
||||
});'."\n";
|
||||
|
||||
print ' updateTotal(0,\''.$modeinput.'\');';
|
||||
print " jQuery('.inputhour, .inputminute').bind('keyup', function(e) { updateTotal(0, '".$modeinput."') });";
|
||||
print "\n});\n";
|
||||
print '</script>';
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user