From 831b9b586cc488b1edfa741cddc25cf016e29f20 Mon Sep 17 00:00:00 2001 From: tianshujie98 Date: Thu, 5 Aug 2021 09:46:10 +0800 Subject: [PATCH] * Fix the problem of selecting all when merging by product. --- module/upgrade/js/mergeprogram.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/module/upgrade/js/mergeprogram.js b/module/upgrade/js/mergeprogram.js index 7ec141c5d3..f84d05390b 100644 --- a/module/upgrade/js/mergeprogram.js +++ b/module/upgrade/js/mergeprogram.js @@ -158,6 +158,7 @@ $(function() /* Select all product events. */ $('#checkAllProducts').click(function() { + var lineID = $('li.currentPage').attr('lineid'); var checked = true; if($(this).is(':checked')) @@ -189,6 +190,18 @@ $(function() { $('[name^=products]').prop('checked', checked); $('[name^=sprints]').prop('checked', checked); + + if(checked) + { + $('[name^=products]').each(function() + { + if($(this).prop('checked')) + { + setProgramByProduct($(this)); + return false; + } + }) + } } var checkAllLines = isSelectAll(0, 'line'); @@ -225,6 +238,18 @@ $(function() { $('[name^=products]').prop('checked', checked); $('[name^=sprints]').prop('checked', checked); + + if(checked) + { + $('[name^=products]').each(function() + { + if($(this).prop('checked')) + { + setProgramByProduct($(this)); + return false; + } + }) + } } var checkAllLines = isSelectAll(0, 'line');