mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-19 16:11:41 +00:00
fix deletion of task when using bootstrap4 theme
This commit is contained in:
parent
c6470efc6f
commit
7ba81f50e3
|
@ -28,6 +28,7 @@
|
||||||
class SeedDMS_View_SchedulerTaskMgr extends SeedDMS_Theme_Style {
|
class SeedDMS_View_SchedulerTaskMgr extends SeedDMS_Theme_Style {
|
||||||
|
|
||||||
function js() { /* {{{ */
|
function js() { /* {{{ */
|
||||||
|
$theme = $this->params['theme'];
|
||||||
header('Content-Type: application/javascript');
|
header('Content-Type: application/javascript');
|
||||||
?>
|
?>
|
||||||
$(document).ready( function() {
|
$(document).ready( function() {
|
||||||
|
@ -53,6 +54,7 @@ $(document).ready( function() {
|
||||||
confirmmsg = $(ev.currentTarget).attr('confirmmsg');
|
confirmmsg = $(ev.currentTarget).attr('confirmmsg');
|
||||||
msg = $(ev.currentTarget).attr('msg');
|
msg = $(ev.currentTarget).attr('msg');
|
||||||
formtoken = '<?= createFormKey('removetask') ?>';
|
formtoken = '<?= createFormKey('removetask') ?>';
|
||||||
|
<?php if($theme == 'bootstrap'): ?>
|
||||||
bootbox.dialog(confirmmsg, [{
|
bootbox.dialog(confirmmsg, [{
|
||||||
"label" : "<i class='fa fa-remove'></i> <?= getMLText("rm_task") ?>",
|
"label" : "<i class='fa fa-remove'></i> <?= getMLText("rm_task") ?>",
|
||||||
"class" : "btn-danger",
|
"class" : "btn-danger",
|
||||||
|
@ -90,6 +92,51 @@ $(document).ready( function() {
|
||||||
"callback": function() {
|
"callback": function() {
|
||||||
}
|
}
|
||||||
}]);
|
}]);
|
||||||
|
<?php else: ?>
|
||||||
|
bootbox.confirm({
|
||||||
|
"message": confirmmsg,
|
||||||
|
"buttons": {
|
||||||
|
"confirm": {
|
||||||
|
"label" : "<i class='fa fa-remove'></i> <?= getMLText("rm_task") ?>",
|
||||||
|
"className" : "btn-danger",
|
||||||
|
},
|
||||||
|
"cancel": {
|
||||||
|
"label" : "<?= getMLText("cancel") ?>",
|
||||||
|
"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'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
<?php endif ?>
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
<?php
|
<?php
|
||||||
|
@ -470,8 +517,6 @@ $(document).ready( function() {
|
||||||
$taskname = $this->params['taskname'];
|
$taskname = $this->params['taskname'];
|
||||||
$scheduler = $this->params['scheduler'];
|
$scheduler = $this->params['scheduler'];
|
||||||
|
|
||||||
$this->htmlAddHeader('<script type="text/javascript" src="../styles/'.$this->theme.'/bootbox/bootbox.min.js"></script>'."\n", 'js');
|
|
||||||
|
|
||||||
$this->htmlStartPage(getMLText("admin_tools"));
|
$this->htmlStartPage(getMLText("admin_tools"));
|
||||||
$this->globalNavigation();
|
$this->globalNavigation();
|
||||||
$this->contentStart();
|
$this->contentStart();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user