Merge branch '15.0.beta3' of https://gitlab.zcorp.cc/easycorp/zentaopms into 15.0.beta3
This commit is contained in:
@@ -209,7 +209,8 @@ function loadProductModules(productID)
|
||||
{
|
||||
branch = $('#branch').val();
|
||||
if(typeof(branch) == 'undefined') branch = 0;
|
||||
link = createLink('tree', 'ajaxGetOptionMenu', 'productID=' + productID + '&viewtype=bug&branch=' + branch + '&rootModuleID=0&returnType=html&fieldID=&needManage=true');
|
||||
if(typeof(moduleID) == 'undefined') moduleID = 0;
|
||||
link = createLink('tree', 'ajaxGetOptionMenu', 'productID=' + productID + '&viewtype=bug&branch=' + branch + '&rootModuleID=0&returnType=html&fieldID=&needManage=true&extra=¤tModuleID=' + moduleID);
|
||||
$('#moduleIdBox').load(link, function()
|
||||
{
|
||||
$(this).find('select').chosen()
|
||||
|
||||
@@ -25,6 +25,7 @@ js::set('stepsNotEmpty', $lang->bug->stepsNotEmpty);
|
||||
js::set('isStepsTemplate', $isStepsTemplate);
|
||||
js::set('oldProjectID', $projectID);
|
||||
js::set('blockID', $blockID);
|
||||
js::set('moduleID', $moduleID);
|
||||
?>
|
||||
<div id="mainContent" class="main-content fade">
|
||||
<div class="center-block">
|
||||
|
||||
@@ -54,3 +54,4 @@ $lang->cron->notice->mon = '取值范围:1-12';
|
||||
$lang->cron->notice->dow = '取值范围:0-6';
|
||||
$lang->cron->notice->help = '注:如果服务器重启,或者发现计划任务没有正常工作,那么计划任务已经停止工作。需要手动点击【重启】按钮,或者一分钟后刷新页面,来开启计划任务。如果任务列表中第一条记录的最后执行时间改变,说明任务开启成功。';
|
||||
$lang->cron->notice->errorRule = '"%s" 填写的不是合法的值';
|
||||
$lang->cron->notice->errorType = '不能创建操作系统命令类型的计划任务';
|
||||
|
||||
+38
-26
@@ -13,8 +13,8 @@ class cronModel extends model
|
||||
{
|
||||
/**
|
||||
* Get by Id.
|
||||
*
|
||||
* @param int $cronID
|
||||
*
|
||||
* @param int $cronID
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
@@ -25,8 +25,8 @@ class cronModel extends model
|
||||
|
||||
/**
|
||||
* Get crons.
|
||||
*
|
||||
* @param string $params
|
||||
*
|
||||
* @param string $params
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
@@ -40,8 +40,8 @@ class cronModel extends model
|
||||
|
||||
/**
|
||||
* Parse crons.
|
||||
*
|
||||
* @param array $crons
|
||||
*
|
||||
* @param array $crons
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
@@ -64,12 +64,12 @@ class cronModel extends model
|
||||
$parsedCron['cron'] = CronExpression::factory($parsedCron['schema']);
|
||||
$parsedCron['time'] = $parsedCron['cron']->getNextRunDate();
|
||||
$parsedCrons[$cron->id] = $parsedCron;
|
||||
}
|
||||
catch(InvalidArgumentException $e)
|
||||
}
|
||||
catch(InvalidArgumentException $e)
|
||||
{
|
||||
$this->dao->update(TABLE_CRON)->set('status')->eq('stop')->where('id')->eq($cron->id)->exec();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->dao->update(TABLE_CRON)->set('lastTime')->eq(date(DT_DATETIME1))->where('lastTime')->eq('0000-00-00 00:00:00')->andWhere('status')->ne('stop')->exec();
|
||||
@@ -78,10 +78,10 @@ class cronModel extends model
|
||||
|
||||
/**
|
||||
* Change cron status.
|
||||
*
|
||||
* @param int $cronID
|
||||
* @param string $status
|
||||
* @param bool $changeTime
|
||||
*
|
||||
* @param int $cronID
|
||||
* @param string $status
|
||||
* @param bool $changeTime
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
@@ -96,8 +96,8 @@ class cronModel extends model
|
||||
|
||||
/**
|
||||
* Log cron.
|
||||
*
|
||||
* @param string $log
|
||||
*
|
||||
* @param string $log
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -115,7 +115,7 @@ class cronModel extends model
|
||||
|
||||
/**
|
||||
* Get last execed time.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
@@ -127,7 +127,7 @@ class cronModel extends model
|
||||
|
||||
/**
|
||||
* Runable cron.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
@@ -145,7 +145,7 @@ class cronModel extends model
|
||||
|
||||
/**
|
||||
* Check change cron.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
@@ -156,8 +156,8 @@ class cronModel extends model
|
||||
}
|
||||
|
||||
/**
|
||||
* Create cron.
|
||||
*
|
||||
* Create cron.
|
||||
*
|
||||
* @access public
|
||||
* @return int
|
||||
*/
|
||||
@@ -169,6 +169,12 @@ class cronModel extends model
|
||||
->skipSpecial('m,h,dom,mon,dow,command')
|
||||
->get();
|
||||
|
||||
if(!$this->config->features->cronSystemCall and $cron->type == 'system')
|
||||
{
|
||||
dao::$errors[] = $this->lang->cron->notice->errorType;
|
||||
return false;
|
||||
}
|
||||
|
||||
$result = $this->checkRule($cron);
|
||||
if(!empty($result))
|
||||
{
|
||||
@@ -182,9 +188,9 @@ class cronModel extends model
|
||||
}
|
||||
|
||||
/**
|
||||
* Update cron.
|
||||
*
|
||||
* @param int $cronID
|
||||
* Update cron.
|
||||
*
|
||||
* @param int $cronID
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
@@ -195,6 +201,12 @@ class cronModel extends model
|
||||
->skipSpecial('m,h,dom,mon,dow,command')
|
||||
->get();
|
||||
|
||||
if(!$this->config->features->cronSystemCall and $cron->type == 'system')
|
||||
{
|
||||
dao::$errors[] = $this->lang->cron->notice->errorType;
|
||||
return false;
|
||||
}
|
||||
|
||||
$result = $this->checkRule($cron);
|
||||
if(!empty($result))
|
||||
{
|
||||
@@ -208,8 +220,8 @@ class cronModel extends model
|
||||
|
||||
/**
|
||||
* Check cron rule.
|
||||
*
|
||||
* @param object $cron
|
||||
*
|
||||
* @param object $cron
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
@@ -256,7 +268,7 @@ class cronModel extends model
|
||||
|
||||
/**
|
||||
* Get current cron status.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return int
|
||||
*/
|
||||
|
||||
@@ -72,7 +72,6 @@ class executionModel extends model
|
||||
if($execution->type == 'stage')
|
||||
{
|
||||
global $lang;
|
||||
$this->loadModel('execution');
|
||||
$this->app->loadLang('project');
|
||||
$lang->executionCommon = $lang->project->stage;
|
||||
include $this->app->getModulePath('execution') . 'lang/' . $this->app->getClientLang() . '.php';
|
||||
|
||||
@@ -16,3 +16,7 @@ html[lang="en"] .main-header > .input-group {width: 250px;}
|
||||
|
||||
#formSettingBtn {position: absolute; top: 14px; right: 20px; z-index: 1000;}
|
||||
#formSettingBtn .dropdown {margin-right: 0px;}
|
||||
#formSettingBtn #formSetting {padding: 10px 12px;}
|
||||
#formSettingBtn .checkboxes {padding: 10px 3px;}
|
||||
#formSettingBtn .checkbox-primary {width: 50%; float: left; margin: 3px 0;}
|
||||
#formSetting .btn {margin-right: 8px;}
|
||||
|
||||
@@ -419,10 +419,12 @@ class tree extends control
|
||||
* @param string $returnType
|
||||
* @param string $fieldID
|
||||
* @param bool $needManage
|
||||
* @param string $extra
|
||||
* @param int $currentModuleID
|
||||
* @access public
|
||||
* @return string the html select string.
|
||||
*/
|
||||
public function ajaxGetOptionMenu($rootID, $viewType = 'story', $branch = 0, $rootModuleID = 0, $returnType = 'html', $fieldID = '', $needManage = false, $extra = '')
|
||||
public function ajaxGetOptionMenu($rootID, $viewType = 'story', $branch = 0, $rootModuleID = 0, $returnType = 'html', $fieldID = '', $needManage = false, $extra = '', $currentModuleID = 0)
|
||||
{
|
||||
if($viewType == 'task')
|
||||
{
|
||||
@@ -448,7 +450,7 @@ class tree extends control
|
||||
$changeFunc = '';
|
||||
if($viewType == 'task' or $viewType == 'bug' or $viewType == 'case') $changeFunc = "onchange='loadModuleRelated()'";
|
||||
$field = $fieldID ? "modules[$fieldID]" : 'module';
|
||||
$output = html::select("$field", $optionMenu, '', "class='form-control' $changeFunc");
|
||||
$output = html::select("$field", $optionMenu, $currentModuleID, "class='form-control' $changeFunc");
|
||||
if(count($optionMenu) == 1 and $needManage)
|
||||
{
|
||||
$output .= "<span class='input-group-addon'>";
|
||||
|
||||
Reference in New Issue
Block a user