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')) ); }