From 13e8ae5728fe76505e453bf921702c207cef419f Mon Sep 17 00:00:00 2001 From: wangyidong Date: Fri, 23 Dec 2022 08:11:36 +0800 Subject: [PATCH] * adjust code. --- module/project/js/build.js | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/module/project/js/build.js b/module/project/js/build.js index f075e8130b..a97168ac97 100644 --- a/module/project/js/build.js +++ b/module/project/js/build.js @@ -13,16 +13,13 @@ function changeProduct(productID) $(function() { - $('td .execution').each(function() + $('td .execution .label-danger').each(function() { - $deleted = $(this).find('.label-danger'); - if($deleted.length > 0) + $execution = $(this).closest('.execution'); + $td = $(this).closest('td'); + if($td.width() < $execution.width()) { - $td = $(this).closest('td'); - if($td.width() < $(this).width()) - { - $(this).find('.executionName').css('display', 'inline-block').css('width', $td.width() - $deleted.width()).css('overflow', 'hidden').css('float', 'left'); - } + $execution.find('.executionName').css('display', 'inline-block').css('width', $td.width() - $(this).width()).css('overflow', 'hidden').css('float', 'left'); } }) })