This commit is contained in:
estellbright
2018-07-13 10:20:46 +08:00
parent 0e0fc2ae84
commit cfa8c0ee0e
2 changed files with 22 additions and 51 deletions
-51
View File
@@ -1,51 +0,0 @@
function adjustSortBtn()
{
$('.btn-move-up:first').addClass('disabled').attr('disabled', 'disabled');
$('.btn-move-down:last').addClass('disabled').attr('disabled', 'disabled');
}
$('.btn-move-up, .btn-move-down').click(function()
{
var $this = $(this);
if($this.hasClass('btn-move-up'))
{
$(this).parents('tr').prev().before($(this).parents('tr'));
}
else
{
$this.parents('tr').next().after($(this).parents('tr'));
}
$('.btn-move-up, .btn-move-down').removeClass('disabled').removeAttr('disabled');
adjustSortBtn();
});
function adjustSortBtn()
{
$('.btn-move-up:first').addClass('disabled').attr('disabled', 'disabled');
$('.btn-move-down:last').addClass('disabled').attr('disabled', 'disabled');
}
$('#modalTeam .btn').click(function()
{
var team = '';
var time = 0;
$('[name*=team]').each(function()
{
if($(this).find('option:selected').text() != '')
{
team += ' ' + $(this).find('option:selected').text();
}
estimate = parseFloat($(this).parents('td').next('td').find('[name*=teamEstimate]').val());
if(!isNaN(estimate))
{
time += estimate;
}
$('#teamMember').val(team);
$('#estimate').val(time);
})
});
//end
+22
View File
@@ -234,3 +234,25 @@ $(document).ready(function()
adjustButtons();
});
$('#modalTeam .btn').click(function()
{
var team = '';
var time = 0;
$('[name*=team]').each(function()
{
if($(this).find('option:selected').text() != '')
{
team += ' ' + $(this).find('option:selected').text();
}
estimate = parseFloat($(this).parents('td').next('td').find('[name*=teamEstimate]').val());
if(!isNaN(estimate))
{
time += estimate;
}
$('#teamMember').val(team);
$('#estimate').val(time);
})
});