From c05cea6d1bfb27b609cbb8f062bcd60dfe07a925 Mon Sep 17 00:00:00 2001 From: wangxuepeng Date: Fri, 13 Oct 2023 05:45:06 +0000 Subject: [PATCH] * Fixed the bug when comment a testsuite. --- module/testsuite/js/view.ui.js | 2 +- module/testsuite/ui/view.html.php | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/module/testsuite/js/view.ui.js b/module/testsuite/js/view.ui.js index 6676529132..a580a6381a 100644 --- a/module/testsuite/js/view.ui.js +++ b/module/testsuite/js/view.ui.js @@ -1,4 +1,4 @@ -$(document).off('click', '.batch-btn').on('click', '.batch-btn', function() +$(document).off('click', '.batch-btn > a, .batch-btn').on('click', '.batch-btn > a, .batch-btn', function() { const dtable = zui.DTable.query($(this).target); const checkedList = dtable.$.getChecks(); diff --git a/module/testsuite/ui/view.html.php b/module/testsuite/ui/view.html.php index 38102eb4bf..8914497e59 100644 --- a/module/testsuite/ui/view.html.php +++ b/module/testsuite/ui/view.html.php @@ -16,7 +16,7 @@ detailHeader ( entityLabel ( - set::entityID(17), + set::entityID($suite->id), set::level(1), set::text($suite->name) ) @@ -57,15 +57,15 @@ $canBatchRun = common::hasPriv('testtask', 'batchRun'); $hasCheckbox = ($canBeChanged && $canBatchEdit && $canBatchUnlink && $canBatchRun); $batchItems = array( - $canBatchUnlink ? array('text' => $lang->testsuite->unlinkCase, 'class' => 'batch-btn ajax-btn not-open-url', 'data-url' => helper::createLink('testsuite', 'batchUnlinkCases', "suiteID={$suite->id}")) : null, - $canBatchRun ? array('text' => $lang->testtask->runCase, 'class' => 'batch-btn ajax-btn not-open-url', 'data-url' => helper::createLink('testtask', 'batchRun', "productID={$productID}&&orderBy={$orderBy}")) : null, + $canBatchUnlink ? array('text' => $lang->testsuite->unlinkCase, 'className' => 'batch-btn ajax-btn not-open-url', 'data-url' => helper::createLink('testsuite', 'batchUnlinkCases', "suiteID={$suite->id}")) : null, + $canBatchRun ? array('text' => $lang->testtask->runCase, 'className' => 'batch-btn not-open-url', 'data-url' => helper::createLink('testtask', 'batchRun', "productID={$productID}&&orderBy={$orderBy}")) : null, ); $footToolbar = array('items' => array( array('type' => 'btn-group', 'items' => array ( - array('text' => $lang->edit, 'class' => 'batch-btn', 'data-url' => createLink('testcase', 'batchEdit', "productID={$productID}")), - array('caret' => 'up', 'class' => 'btn btn-caret size-sm primary not-open-url', 'data-placement' => 'top-start', 'items' => $batchItems), + array('text' => $lang->edit, 'className' => 'batch-btn', 'data-url' => createLink('testcase', 'batchEdit', "productID={$productID}")), + array('caret' => 'up', 'className' => 'btn btn-caret size-sm primary not-open-url', 'data-placement' => 'top-start', 'items' => $batchItems), )), ), 'btnProps' => array('size' => 'sm', 'btnType' => 'primary')); @@ -86,7 +86,7 @@ detailBody set::footPager(usePager('pager', 'short')), ), ), - history(), + history(set::commentUrl(createLink('action', 'comment', array('objectType' => 'testsuite', 'objectID' => $suite->id))),), detailSide ( section