This commit is contained in:
liumengyi
2024-02-28 11:22:21 +08:00
parent 49941498a5
commit db5e7291e1
2 changed files with 11 additions and 2 deletions
+8 -1
View File
@@ -11,7 +11,14 @@ $(document).off('click', '.batch-btn').on('click', '.batch-btn', function()
if($(this).hasClass('ajax-btn'))
{
$.ajaxSubmit({url, data:form});
if($(this).hasClass('batch-delete-btn'))
{
zui.Modal.confirm(confirmBatchDelete).then((res) => {if(res) $.ajaxSubmit({url, data:form});});
}
else
{
$.ajaxSubmit({url, data:form});
}
}
else
{
+3 -1
View File
@@ -10,6 +10,8 @@ declare(strict_types=1);
*/
namespace zin;
jsVar('confirmBatchDelete', $lang->testcase->confirmBatchDelete);
$canView = common::hasPriv('caselib', 'view');
$canExport = common::hasPriv('caselib', 'exportTemplate');
$canImport = common::hasPriv('caselib', 'import');
@@ -130,7 +132,7 @@ if($canBatchReview || $canBatchDelete || $canBatchChangeModule)
$navActions = array
(
$canBatchReview ? array('text' => $lang->testcase->review, 'class' => 'not-hide-menu', 'items' => $reviewItems) : null,
$canBatchDelete ? array('text' => $lang->delete, 'innerClass' => 'batch-btn ajax-btn not-open-url', 'data-url' => helper::createLink('testcase', 'batchDelete', "libID=$libID")) : null,
$canBatchDelete ? array('text' => $lang->delete, 'innerClass' => 'batch-btn ajax-btn not-open-url batch-delete-btn', 'data-url' => helper::createLink('testcase', 'batchDelete', "libID=$libID")) : null,
$canBatchChangeModule ? array('text' => $lang->testcase->module, 'class' => 'not-hide-menu', 'items' => $moduleItems) : null
);
}