From 9788d40d1a9d4c6d59b0f3fee396dba14f586897 Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Fri, 11 Oct 2024 14:22:31 +0800 Subject: [PATCH] * [task#129575,doing,0.5h] Code for task #129575. --- module/execution/js/task.ui.js | 4 ++++ module/execution/ui/task.html.php | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/module/execution/js/task.ui.js b/module/execution/js/task.ui.js index 90d61664c1..89ac4b4083 100644 --- a/module/execution/js/task.ui.js +++ b/module/execution/js/task.ui.js @@ -12,6 +12,10 @@ $(document).off('click','.batch-btn').on('click', '.batch-btn', function() { $.ajaxSubmit({url, data: form}); } + else if($(this).hasClass('ajax-cancel-btn')) + { + $.ajaxSubmit({url, data: form}).then(); + } else { postAndLoadPage(url, form); diff --git a/module/execution/ui/task.html.php b/module/execution/ui/task.html.php index f4dc6f57eb..ba81efeab8 100644 --- a/module/execution/ui/task.html.php +++ b/module/execution/ui/task.html.php @@ -155,10 +155,11 @@ if($canBatchAction) { if($canBatchClose || $canBatchCancel) { + $batchCancelClass = $config->edition == 'open' ? 'ajax-btn' : 'ajax-cancel-btn'; $batchItems = array ( array('text' => $lang->close, 'innerClass' => 'batch-btn ajax-btn not-open-url', 'disabled' => !$canBatchClose, 'data-url' => createLink('task', 'batchClose')), - array('text' => $lang->task->cancel, 'innerClass' => 'batch-btn ajax-btn not-open-url', 'disabled' => !$canBatchCancel, 'data-url' => createLink('task', 'batchCancel')) + array('text' => $lang->task->cancel, 'innerClass' => "batch-btn $batchCancelClass not-open-url", 'disabled' => !$canBatchCancel, 'data-url' => createLink('task', 'batchCancel')) ); }