* finish task #2276.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
<?php if($extView = $this->getExtViewFile(__FILE__)){include $extView; return helper::cd();}?>
|
||||
<iframe frameborder='0' name='hiddenwin' id='hiddenwin' scrolling='no' class='debugwin hidden'></iframe>
|
||||
<?php if($this->loadModel('cron')->runable()) js::execute('startCron()');?>
|
||||
<script laguage='Javascript'>
|
||||
<?php if(isset($pageJS)) echo $pageJS;?>
|
||||
</script>
|
||||
|
||||
@@ -40,6 +40,17 @@ class cron extends control
|
||||
die(js::reload('parent'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Open cron process.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function openProcess()
|
||||
{
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create cron.
|
||||
*
|
||||
|
||||
+15
-13
@@ -1,12 +1,13 @@
|
||||
<?php
|
||||
$lang->cron->common = 'Cron';
|
||||
$lang->cron->index = 'Index';
|
||||
$lang->cron->list = 'List';
|
||||
$lang->cron->create = 'Create';
|
||||
$lang->cron->edit = 'Edit';
|
||||
$lang->cron->delete = 'Delete';
|
||||
$lang->cron->toggle = 'Activation/Disable';
|
||||
$lang->cron->turnon = 'Open/Close';
|
||||
$lang->cron->common = 'Cron';
|
||||
$lang->cron->index = 'Index';
|
||||
$lang->cron->list = 'List';
|
||||
$lang->cron->create = 'Create';
|
||||
$lang->cron->edit = 'Edit';
|
||||
$lang->cron->delete = 'Delete';
|
||||
$lang->cron->toggle = 'Activation/Disable';
|
||||
$lang->cron->turnon = 'Open/Close';
|
||||
$lang->cron->openProcess = 'Open process';
|
||||
|
||||
$lang->cron->m = 'Minute';
|
||||
$lang->cron->h = 'Hour';
|
||||
@@ -43,8 +44,9 @@ $lang->cron->confirmOpen = <<<EOD
|
||||
EOD;
|
||||
|
||||
$lang->cron->notice = new stdclass();
|
||||
$lang->cron->notice->m = 'Range : 0-59,"*" express the range of numbers, "/" express "Every", "-" express digital range.';
|
||||
$lang->cron->notice->h = 'Range : 0-23';
|
||||
$lang->cron->notice->dom = 'Range : 1-31';
|
||||
$lang->cron->notice->mon = 'Range : 1-12';
|
||||
$lang->cron->notice->dow = 'Range : 0-6';
|
||||
$lang->cron->notice->m = 'Range : 0-59,"*" express the range of numbers, "/" express "Every", "-" express digital range.';
|
||||
$lang->cron->notice->h = 'Range : 0-23';
|
||||
$lang->cron->notice->dom = 'Range : 1-31';
|
||||
$lang->cron->notice->mon = 'Range : 1-12';
|
||||
$lang->cron->notice->dow = 'Range : 0-6';
|
||||
$lang->cron->notice->help = 'Note: if the server is restarted, or that the timing task is not normal, then the timing task has stopped. You need to click the [Open process] button or refresh page after a minute to open the scheduled tasks. If the last run time of first record is changed in cron list, then the task is turned on.';
|
||||
|
||||
+15
-13
@@ -1,12 +1,13 @@
|
||||
<?php
|
||||
$lang->cron->common = '定时任务';
|
||||
$lang->cron->index = '首页';
|
||||
$lang->cron->list = '任务列表';
|
||||
$lang->cron->create = '添加';
|
||||
$lang->cron->edit = '编辑';
|
||||
$lang->cron->delete = '删除';
|
||||
$lang->cron->toggle = '激活/禁用';
|
||||
$lang->cron->turnon = '打开/关闭';
|
||||
$lang->cron->common = '定时任务';
|
||||
$lang->cron->index = '首页';
|
||||
$lang->cron->list = '任务列表';
|
||||
$lang->cron->create = '添加';
|
||||
$lang->cron->edit = '编辑';
|
||||
$lang->cron->delete = '删除';
|
||||
$lang->cron->toggle = '激活/禁用';
|
||||
$lang->cron->turnon = '打开/关闭';
|
||||
$lang->cron->openProcess = '创建进程';
|
||||
|
||||
$lang->cron->m = '分';
|
||||
$lang->cron->h = '小时';
|
||||
@@ -43,8 +44,9 @@ $lang->cron->confirmOpen = <<<EOD
|
||||
EOD;
|
||||
|
||||
$lang->cron->notice = new stdclass();
|
||||
$lang->cron->notice->m = '取值范围:0-59,"*"代表取值范围内的数字,"/"代表"每", "-"代表数字范围。';
|
||||
$lang->cron->notice->h = '取值范围:0-23';
|
||||
$lang->cron->notice->dom = '取值范围:1-31';
|
||||
$lang->cron->notice->mon = '取值范围:1-12';
|
||||
$lang->cron->notice->dow = '取值范围:0-6';
|
||||
$lang->cron->notice->m = '取值范围:0-59,"*"代表取值范围内的数字,"/"代表"每", "-"代表数字范围。';
|
||||
$lang->cron->notice->h = '取值范围:0-23';
|
||||
$lang->cron->notice->dom = '取值范围:1-31';
|
||||
$lang->cron->notice->mon = '取值范围:1-12';
|
||||
$lang->cron->notice->dow = '取值范围:0-6';
|
||||
$lang->cron->notice->help = '注:如果服务器重启,或者发现定时任务没有正常工作,那么定时任务已经停止工作。需要手动点击【创建进程】按钮,或者一分钟后刷新页面,来开启计划任务。如果任务列表中第一条记录的最后执行时间改变,说明任务开启成功。';
|
||||
|
||||
@@ -20,7 +20,10 @@
|
||||
<div class='panel'>
|
||||
<div class='panel-heading'>
|
||||
<strong><?php echo $lang->cron->list?></strong>
|
||||
<div class='panel-actions pull-right'><?php echo html::a(inlink('create'), $lang->cron->create, '', "class='btn btn-primary btn-sm'")?></div>
|
||||
<div class='panel-actions pull-right'>
|
||||
<?php if(common::hasPriv('cron', 'openProcess')) echo html::a(inlink('openProcess'), $lang->cron->openProcess, 'hiddenwin', "class='btn btn-sm'")?>
|
||||
<?php if(common::hasPriv('cron', 'create')) echo html::a(inlink('create'), $lang->cron->create, '', "class='btn btn-primary btn-sm'")?>
|
||||
</div>
|
||||
</div>
|
||||
<table class='table table-condensed table-bordered active-disabled table-fixed'>
|
||||
<thead>
|
||||
@@ -61,6 +64,7 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class='alert alert-info'><?php echo $lang->cron->notice->help?></div>
|
||||
<?php else:?>
|
||||
<div class='container mw-700px'>
|
||||
<div class='panel-body'>
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
/**
|
||||
* The openprocess view file of cron module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv11.html)
|
||||
* @author Yidong Wang <yidong@cnezsoft.com>
|
||||
* @package cron
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
startCron();
|
||||
setTimeout(function(){parent.location.href = parent.location.href}, 300);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -856,6 +856,7 @@ $lang->resource->cron->create = 'create';
|
||||
$lang->resource->cron->edit = 'edit';
|
||||
$lang->resource->cron->toggle = 'toggle';
|
||||
$lang->resource->cron->delete = 'delete';
|
||||
$lang->resource->cron->openProcess = 'openProcess';
|
||||
|
||||
$lang->cron->methodOrder[5] = 'index';
|
||||
$lang->cron->methodOrder[10] = 'turnon';
|
||||
@@ -863,6 +864,7 @@ $lang->cron->methodOrder[15] = 'create';
|
||||
$lang->cron->methodOrder[20] = 'edit';
|
||||
$lang->cron->methodOrder[25] = 'toggle';
|
||||
$lang->cron->methodOrder[30] = 'delete';
|
||||
$lang->cron->methodOrder[35] = 'openProcess';
|
||||
|
||||
$lang->resource->dev = new stdclass();
|
||||
$lang->resource->dev->api = 'api';
|
||||
@@ -1085,3 +1087,4 @@ $lang->changelog['7.2'][] = 'project-updateOrder';
|
||||
$lang->changelog['7.3'][] = 'project-fixFirst';
|
||||
$lang->changelog['7.3'][] = 'productplan-batchEdit';
|
||||
$lang->changelog['7.3'][] = 'admin-sso';
|
||||
$lang->changelog['7.3'][] = 'cron-openProcess';
|
||||
|
||||
+2
-2
@@ -40,7 +40,7 @@ function createLink(moduleName, methodName, vars, viewType, isOnlyBody)
|
||||
}
|
||||
|
||||
/* if page has onlybody param then add this param in all link. the param hide header and footer. */
|
||||
if(onlybody == 'yes' || isOnlyBody)
|
||||
if((typeof(onlybody) != 'undefined' && onlybody == 'yes') || isOnlyBody)
|
||||
{
|
||||
var onlybody = config.requestType == 'PATH_INFO' ? "?onlybody=yes" : '&onlybody=yes';
|
||||
link = link + onlybody;
|
||||
@@ -1340,7 +1340,7 @@ needPing = true;
|
||||
/* When body's ready, execute these. */
|
||||
$(document).ready(function()
|
||||
{
|
||||
if(onlybody == 'yes') checkOnlybodyPage();
|
||||
if(typeof(onlybody) != 'undefined' && onlybody == 'yes') checkOnlybodyPage();
|
||||
$('body').addClass('m-{currentModule}-{currentMethod}'.format(config));
|
||||
|
||||
setModal();
|
||||
|
||||
Reference in New Issue
Block a user