* [refac bug #62306] Adjust checkBatchEstStartedAndDeadline for child.
This commit is contained in:
@@ -196,7 +196,14 @@ function checkBatchEstStartedAndDeadline(event)
|
||||
$estStartedTd.find('.date-tip').remove();
|
||||
|
||||
const $childrenEstStarted = $(event.target).closest('tbody').find('tr[data-parent="' + taskID + '"]').find('[name^=estStarted]');
|
||||
$childrenEstStarted.each(function(){$(this).zui('datePicker').render({disabled: estStarted.length == 0});});
|
||||
$childrenEstStarted.each(function()
|
||||
{
|
||||
let $childDatePicker = $(this).zui('datePicker');
|
||||
$childDatePicker.render({disabled: estStarted.length == 0});
|
||||
if(estStarted.length == 0) $childDatePicker.$.setValue('');
|
||||
|
||||
checkBatchEstStartedAndDeadline({target: this});
|
||||
});
|
||||
if(estStarted.length > 0)
|
||||
{
|
||||
let $datetip = $('<div class="date-tip"></div>');
|
||||
@@ -223,7 +230,14 @@ function checkBatchEstStartedAndDeadline(event)
|
||||
$deadlineTd.find('.date-tip').remove();
|
||||
|
||||
const $childrenDeadline = $(event.target).closest('tbody').find('tr[data-parent="' + taskID + '"]').find('[name^=deadline]');
|
||||
$childrenDeadline.each(function(){$(this).zui('datePicker').render({disabled: deadline.length == 0});});
|
||||
$childrenDeadline.each(function()
|
||||
{
|
||||
let $childDatePicker = $(this).zui('datePicker');
|
||||
$childDatePicker.render({disabled: deadline.length == 0});
|
||||
if(deadline.length == 0) $childDatePicker.$.setValue('');
|
||||
|
||||
checkBatchEstStartedAndDeadline({target: this});
|
||||
});
|
||||
if(deadline.length > 0)
|
||||
{
|
||||
let $datetip = $('<div class="date-tip"></div>');
|
||||
|
||||
Reference in New Issue
Block a user