* adjust for activate task.

This commit is contained in:
wangyidong
2022-08-24 22:20:54 +08:00
parent 676c252581
commit c0467f2b7d
13 changed files with 358 additions and 282 deletions
+4 -43
View File
@@ -6,13 +6,13 @@ $(function()
{
$(this).closest('tr').find('input[id^=teamEstimate]').closest('.input-group').toggleClass('required', $(this).val() != '')
var $source = $(this).siblings('[name^=source]');
if($source.val() == '') return;
var $teamSource = $(this).siblings('[name^=teamSource]');
if($teamSource.val() == '') return;
var $tr = $(this).closest('tr');
var consumed = 0;
var estimate = $tr.attr('data-left');;
if($(this).val() == $source.val())
if($(this).val() == $teamSource.val())
{
consumed = $tr.attr('data-consumed');
estimate = $tr.attr('data-estimate');
@@ -90,44 +90,6 @@ function setPreview(){}
$(document).ready(function()
{
/* Init task team manage dialog */
var $taskTeamEditor = $('#taskTeamEditor').batchActionForm(
{
idStart: 0,
idEnd: newRowCount - 1,
chosen: true,
datetimepicker: false,
colorPicker: false,
});
var taskTeamEditor = $taskTeamEditor.data('zui.batchActionForm');
var adjustButtons = function()
{
var $deleteBtn = $taskTeamEditor.find('.btn-delete');
if ($deleteBtn.length == 1) $deleteBtn.addClass('disabled').attr('disabled', 'disabled');
};
$taskTeamEditor.on('click', '.btn-add', function()
{
var $newRow = taskTeamEditor.createRow(null, $(this).closest('tr'));
$newRow.addClass('highlight');
setTimeout(function()
{
$newRow.removeClass('highlight');
}, 1600);
adjustButtons();
}).on('click', '.btn-delete', function()
{
var $row = $(this).closest('tr');
$row.addClass('highlight').fadeOut(700, function()
{
$row.remove();
adjustButtons();
});
});
adjustButtons();
$('#showAllModule').change(function()
{
var moduleID = $('#moduleIdBox #module').val();
@@ -176,8 +138,7 @@ $('#confirmButton').click(function()
return false;
}
var requiredFieldList = ',' + requiredFields + ',';
if(requiredFieldList.indexOf(',estimate,') >= 0 && (estimate == 0 || isNaN(estimate)))
if(estimate == 0 || isNaN(estimate))
{
$(this).val('').trigger("chosen:updated");
bootbox.alert(estimateNotEmpty);