diff --git a/module/stage/config.php b/module/stage/config.php index c3195abc6d..39fb35831d 100644 --- a/module/stage/config.php +++ b/module/stage/config.php @@ -18,6 +18,8 @@ $config->stage->actionList['edit']['hint'] = $lang->stage->edit; $config->stage->actionList['edit']['url'] = helper::createLink('stage', 'edit', 'stageID={id}', '', true); $config->stage->actionList['edit']['data-toggle'] = 'modal'; -$config->stage->actionList['delete']['icon'] = 'trash'; -$config->stage->actionList['delete']['hint'] = $lang->stage->delete; -$config->stage->actionList['delete']['url'] = 'javascript:confirmDelete("{id}")'; +$config->stage->actionList['delete']['icon'] = 'trash'; +$config->stage->actionList['delete']['hint'] = $lang->stage->delete; +$config->stage->actionList['delete']['url'] = helper::createLink('stage', 'delete', 'stageID={id}'); +$config->stage->actionList['delete']['class'] = 'ajax-form'; +$config->stage->actionList['delete']['data-confirm'] = $lang->stage->confirmDelete; diff --git a/module/stage/js/browse.ui.js b/module/stage/js/browse.ui.js deleted file mode 100644 index 806a2a557d..0000000000 --- a/module/stage/js/browse.ui.js +++ /dev/null @@ -1,15 +0,0 @@ -/** - * 提示并删除阶段。 - * Delete stage with tips. - * - * @param int stageID - * @access public - * @return void - */ -window.confirmDelete = function(stageID) -{ - zui.Modal.confirm(confirmDelete).then((res) => - { - if(res) $.ajaxSubmit({url: $.createLink('stage', 'delete', 'stageID=' + stageID)}); - }) -} diff --git a/module/stage/ui/browse.html.php b/module/stage/ui/browse.html.php index 7215871e23..02b28af59f 100644 --- a/module/stage/ui/browse.html.php +++ b/module/stage/ui/browse.html.php @@ -9,7 +9,6 @@ declare(strict_types=1); * @link https://www.zentao.net */ namespace zin; -jsVar('confirmDelete', $lang->stage->confirmDelete); featureBar (