From cfa8c0ee0e54e5dd91d42cb5ea7a83c513bcf0ce Mon Sep 17 00:00:00 2001 From: estellbright <1457749147@qq.com> Date: Fri, 13 Jul 2018 10:20:46 +0800 Subject: [PATCH] *Fix bug #2015. --- module/task/js/common.js | 51 ---------------------------------------- module/task/js/create.js | 22 +++++++++++++++++ 2 files changed, 22 insertions(+), 51 deletions(-) diff --git a/module/task/js/common.js b/module/task/js/common.js index 4fb3b9b7b7..e69de29bb2 100644 --- a/module/task/js/common.js +++ b/module/task/js/common.js @@ -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 diff --git a/module/task/js/create.js b/module/task/js/create.js index d39bdacca8..99dc9bb969 100644 --- a/module/task/js/create.js +++ b/module/task/js/create.js @@ -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); + }) +});