From 6684f4a8178a05af6218800cf6808343d5ba4b8f Mon Sep 17 00:00:00 2001 From: Yagami Date: Wed, 19 Sep 2018 15:57:00 +0800 Subject: [PATCH] * Finish task #4738. --- module/bug/css/create.css | 2 +- module/testcase/css/create.css | 5 +- module/testcase/js/create.js | 8 +++ module/testcase/view/create.html.php | 88 ++++++++++++++-------------- 4 files changed, 58 insertions(+), 45 deletions(-) diff --git a/module/bug/css/create.css b/module/bug/css/create.css index cc207943c9..0656bd6036 100644 --- a/module/bug/css/create.css +++ b/module/bug/css/create.css @@ -43,4 +43,4 @@ .title-group.required > .required:after {display: block; right: 29px; top: 5px;} .title-group .chosen-container {width: 1%!important; min-width: 70px;} .title-group #severity + .chosen-container > .chosen-single {border-radius: 0!important;} -.title-group #pri + .chosen-container > .chosen-single {border-top-left-radius: 0!important; border-bottom-left-radius: 0!important;} \ No newline at end of file +.title-group #pri + .chosen-container > .chosen-single {border-top-left-radius: 0!important; border-bottom-left-radius: 0!important;} diff --git a/module/testcase/css/create.css b/module/testcase/css/create.css index af9bd03773..79198f764d 100644 --- a/module/testcase/css/create.css +++ b/module/testcase/css/create.css @@ -36,4 +36,7 @@ #branch {border-left-width: 0px;} -.input-group-addon.w-80px{min-width:80px;} \ No newline at end of file +.input-group-addon.w-80px{min-width:80px;} + +.title-group.required:after {display: none;} +.title-group.required > .required:after {display: block; right: 29px; top: 5px;} diff --git a/module/testcase/js/create.js b/module/testcase/js/create.js index d465914bfa..0842f98025 100644 --- a/module/testcase/js/create.js +++ b/module/testcase/js/create.js @@ -158,4 +158,12 @@ $(function() }); initSteps(); + + $('#pri').on('change', function() + { + var $select = $(this); + var $selector = $select.closest('.pri-selector'); + var value = $select.val(); + $selector.find('.pri-text').html('' + value + ''); + }); }) diff --git a/module/testcase/view/create.html.php b/module/testcase/view/create.html.php index be05db82cf..b87238cd01 100644 --- a/module/testcase/view/create.html.php +++ b/module/testcase/view/create.html.php @@ -83,53 +83,55 @@ testcase->title;?> -
- -
- - - +
+
+ +
+ + + +
+ + testcase->pri;?> + testcase->priList as $priKey => $priValue) + { + if(!empty($priKey) and (string)$priKey != (string)$priValue) + { + $hasCustomPri = true; + break; + } + } + $priList = $lang->testcase->priList; + if(end($priList)) + { + unset($priList[0]); + $priList[0] = ''; + } + ?> + + + +
+ + +
+ + + testcase->forceNotReview()):?> + testcase->forceNotReview, '', "id='forceNotReview0'");?> +
- testcase->forceNotReview()):?> - - - testcase->forceNotReview, '', "id='forceNotReview0'");?> - - - - - testcase->pri;?> - - testcase->priList as $priKey => $priValue) - { - if(!empty($priKey) and (string)$priKey != (string)$priValue) - { - $hasCustomPri = true; - break; - } - } - $priList = $lang->testcase->priList; - if(end($priList)) - { - unset($priList[0]); - $priList[0] = ''; - } - ?> - - - - - - - - testcase->precondition;?>