Merge branch dev/bug-66436 of zentao/zentaopms (#12279)

This commit is contained in:
刘刚
2025-11-11 17:34:31 +08:00
committed by Gitfox
3 changed files with 7 additions and 10 deletions
+5 -1
View File
@@ -140,7 +140,11 @@ class cron extends control
session_write_close();
$execId = mt_rand();
if($restart) $this->cron->restartCron($execId);
if($restart)
{
$this->cron->restartCron($execId);
return $this->sendSuccess(array('load' => true));
}
while(true)
{
-7
View File
@@ -1,7 +0,0 @@
window.refreshURL = function(obj)
{
$this = $(obj);
$.get($this.data('href'));
loadPage($.createLink('cron', 'index'));
return false;
}
+2 -2
View File
@@ -17,7 +17,7 @@ foreach($crons as $cron)
{
$toggleLink = inlink('toggle', "id={$cron->id}&status=" . ($cron->status == 'stop' ? 'normal' : 'stop'));
$toggleName = $cron->status == 'stop' ? $lang->cron->toggleList['start'] : $lang->cron->toggleList['stop'];
$actionsHtml .= html::a('###', $toggleName, '', "class='primary-500 ajaxRefresh' data-href='{$toggleLink}' onclick='refreshURL(this)'");
$actionsHtml .= html::a($toggleLink, $toggleName, '', "class='primary-500 ajax-submit'");
}
if(!empty($cron->command) and common::hasPriv('cron', 'edit')) $actionsHtml .= html::a(inlink('edit', "id={$cron->id}"), $lang->edit, '', "class='primary-500' data-toggle='modal'");
if($cron->buildin == 0 and common::hasPriv('cron', 'delete')) $actionsHtml .= html::a(inlink('delete', "id={$cron->id}"), $lang->delete, '', "class='primary-500 ajax-submit' data-confirm={$lang->cron->confirmDelete}");
@@ -34,7 +34,7 @@ panel
!empty($config->global->cron) ? set::bodyClass('p-0') : null,
!empty($config->global->cron) ? set::headingActions(array
(
array('class' => 'mr-3 ajaxRefresh', 'data-href' => inlink('ajaxExec', 'restart=1'), 'text' => $lang->cron->openProcess, 'onclick' => 'refreshURL(this)'),
array('class' => 'mr-3 ajax-submit', 'url' => inlink('ajaxExec', 'restart=1'), 'text' => $lang->cron->openProcess),
array('class' => 'mr-3 ajaxTurnon ajax-submit', 'url' => inlink('turnon'), 'text' => $lang->cron->turnonList[0], 'data-confirm' => $this->lang->cron->confirmTurnon),
array('class' => 'mr-3 primary', 'data-toggle' => 'modal', 'url' => inlink('create'), 'text' => $lang->cron->create)
)) : null,