diff --git a/views/bootstrap/class.SchedulerTaskMgr.php b/views/bootstrap/class.SchedulerTaskMgr.php index c19521a28..554266025 100644 --- a/views/bootstrap/class.SchedulerTaskMgr.php +++ b/views/bootstrap/class.SchedulerTaskMgr.php @@ -28,6 +28,7 @@ class SeedDMS_View_SchedulerTaskMgr extends SeedDMS_Theme_Style { function js() { /* {{{ */ + $theme = $this->params['theme']; header('Content-Type: application/javascript'); ?> $(document).ready( function() { @@ -53,6 +54,7 @@ $(document).ready( function() { confirmmsg = $(ev.currentTarget).attr('confirmmsg'); msg = $(ev.currentTarget).attr('msg'); formtoken = ''; + bootbox.dialog(confirmmsg, [{ "label" : " ", "class" : "btn-danger", @@ -90,6 +92,51 @@ $(document).ready( function() { "callback": function() { } }]); + + bootbox.confirm({ + "message": confirmmsg, + "buttons": { + "confirm": { + "label" : " ", + "className" : "btn-danger", + }, + "cancel": { + "label" : "", + "className" : "btn-secondary", + } + }, + "callback": function(result) { + if(result) { + $.post('../op/op.SchedulerTaskMgr.php', + { action: 'removetask', taskid: id, formtoken: formtoken }, + function(data) { + if(data.success) { + $('#table-row-task-'+id).hide('slow'); + noty({ + text: msg, + type: 'success', + dismissQueue: true, + layout: 'topRight', + theme: 'defaultTheme', + timeout: 1500, + }); + } else { + noty({ + text: data.message, + type: 'error', + dismissQueue: true, + layout: 'topRight', + theme: 'defaultTheme', + timeout: 3500, + }); + } + }, + 'json' + ); + } + } + }); + }); }); params['extname']; $taskname = $this->params['taskname']; $scheduler = $this->params['scheduler']; - - $this->htmlAddHeader(''."\n", 'js'); $this->htmlStartPage(getMLText("admin_tools")); $this->globalNavigation();