diff --git a/module/caselib/js/browse.ui.js b/module/caselib/js/browse.ui.js index 6ddecf0b54..adfb78bc20 100644 --- a/module/caselib/js/browse.ui.js +++ b/module/caselib/js/browse.ui.js @@ -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 { diff --git a/module/caselib/ui/browse.html.php b/module/caselib/ui/browse.html.php index 97f7574a12..675ffd1d8c 100644 --- a/module/caselib/ui/browse.html.php +++ b/module/caselib/ui/browse.html.php @@ -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 ); }