diff --git a/extension/lite/custom/ext/lang/en/lite.php b/extension/lite/custom/ext/lang/en/lite.php
index bfe39b23ad..adc8835faf 100644
--- a/extension/lite/custom/ext/lang/en/lite.php
+++ b/extension/lite/custom/ext/lang/en/lite.php
@@ -6,7 +6,6 @@ $lang->custom->notice->readOnlyOfExecution = "If Change Forbidden, any change on
$lang->custom->moduleName['execution'] = $lang->custom->execution;
$lang->custom->object = array();
-$lang->custom->object['project'] = 'Project';
$lang->custom->object['execution'] = $lang->custom->execution;
$lang->custom->object['story'] = $lang->SRCommon;
$lang->custom->object['task'] = 'Task';
@@ -15,7 +14,8 @@ $lang->custom->object['user'] = 'User';
$lang->custom->object['block'] = 'Block';
$lang->custom->task = new stdClass();
-$lang->custom->task->fields['priList'] = 'Priority';
+$lang->custom->task->fields['priList'] = 'Priority';
+$lang->custom->task->fields['typeList'] = 'Type';
$lang->custom->story = new stdClass();
$lang->custom->story->fields['priList'] = 'Priority';
diff --git a/extension/lite/custom/ext/lang/zh-cn/lite.php b/extension/lite/custom/ext/lang/zh-cn/lite.php
index b7fec903d2..c4a3d1948e 100644
--- a/extension/lite/custom/ext/lang/zh-cn/lite.php
+++ b/extension/lite/custom/ext/lang/zh-cn/lite.php
@@ -6,7 +6,6 @@ $lang->custom->notice->readOnlyOfExecution = "禁止修改后,已关闭{$lang-
$lang->custom->moduleName['execution'] = $lang->custom->execution;
$lang->custom->object = array();
-$lang->custom->object['project'] = '项目';
$lang->custom->object['execution'] = $lang->custom->execution;
$lang->custom->object['story'] = $lang->SRCommon;
$lang->custom->object['task'] = '任务';
diff --git a/lib/pager/pager.class.php b/lib/pager/pager.class.php
index 1dd0dac22a..0d0b016fa9 100644
--- a/lib/pager/pager.class.php
+++ b/lib/pager/pager.class.php
@@ -90,10 +90,11 @@ class pager extends basePager
*
* @param string $align
* @param string $type
+ * @param int $maxRecPerPage
* @access public
* @return void
*/
- public function show($align = 'right', $type = 'full')
+ public function show($align = 'right', $type = 'full', $maxRecPerPage = 0)
{
if($type == 'pagerjs')
{
@@ -110,7 +111,26 @@ class pager extends basePager
}
else
{
- echo "
";
+ $pageSizeOptions = '';
+ if($maxRecPerPage)
+ {
+ /* Set record per page. */
+ for($i = 5; $i <= 50; $i += 5) $options[] = $i;
+ $options = array_merge($options, array(100, 200, 500, 1000, 2000));
+
+ $pageSizeOptions = 'data-page-size-options="';
+ foreach($options as $option)
+ {
+ $pageSizeOptions .= "$option,";
+ if($option >= $maxRecPerPage)
+ {
+ $pageSizeOptions = trim($pageSizeOptions, ',') . '"';
+ break;
+ }
+ }
+ }
+
+ echo "";
}
}
else
diff --git a/module/bug/js/common.js b/module/bug/js/common.js
index 83d599fc68..96afeeee40 100644
--- a/module/bug/js/common.js
+++ b/module/bug/js/common.js
@@ -504,7 +504,9 @@ function setStories(moduleID, productID, storyID)
{
var branch = $('#branch').val();
if(typeof(branch) == 'undefined') branch = 0;
- link = createLink('story', 'ajaxGetProductStories', 'productID=' + productID + '&branch=' + branch + '&moduleID=' + moduleID + '&storyID=' + storyID);
+ var executionID = $('#execution').val();
+ if(typeof(executionID) == 'undefined') executionID = 0;
+ link = createLink('story', 'ajaxGetProductStories', 'productID=' + productID + '&branch=' + branch + '&moduleID=' + moduleID + '&storyID=' + storyID + '&onlyOption=false&status=&limit=0&type=full&hasParent=1&executionID=' + executionID);
$.get(link, function(stories)
{
if(!stories) stories = '';
diff --git a/module/common/model.php b/module/common/model.php
index 8991412729..a7c28e4ec8 100644
--- a/module/common/model.php
+++ b/module/common/model.php
@@ -2279,6 +2279,16 @@ EOD;
$module = strtolower($module);
$method = strtolower($method);
+ /* If the user is doing a tutorial, have all tutorial privs. */
+ if(defined('TUTORIAL'))
+ {
+ $app->loadLang('tutorial');
+ foreach($lang->tutorial->tasks as $task)
+ {
+ if($task['nav']['module'] == $module and $task['nav']['method'] = $method) return true;
+ }
+ }
+
/* Check the parent object is closed. */
if(!empty($method) and strpos('close|batchclose', $method) === false and !commonModel::canBeChanged($module, $object)) return false;
diff --git a/module/custom/control.php b/module/custom/control.php
index dc159ba0c6..60ab69b4a0 100644
--- a/module/custom/control.php
+++ b/module/custom/control.php
@@ -19,6 +19,8 @@ class custom extends control
*/
public function index()
{
+ if($this->config->vision == 'lite') return print(js::locate(inlink('execution')));
+
if(($this->config->systemMode == 'new') and common::hasPriv('custom', 'set'))
{
return print(js::locate(inlink('set', "module=project&field=" . key($this->lang->custom->project->fields))));
diff --git a/module/execution/model.php b/module/execution/model.php
index 703830a1e2..cd6c878de0 100644
--- a/module/execution/model.php
+++ b/module/execution/model.php
@@ -305,14 +305,6 @@ class executionModel extends model
$type = 'sprint';
if($project) $type = zget($this->config->execution->modelList, $project->model, 'sprint');
- /* Judge workdays is legitimate. */
- $workdays = helper::diffDate($_POST['end'], $_POST['begin']) + 1;
- if(isset($_POST['days']) and $_POST['days'] > $workdays)
- {
- dao::$errors['days'] = sprintf($this->lang->project->workdaysExceed, $workdays);
- return false;
- }
-
/* If the execution model is a stage, determine whether the product is linked. */
$products = array_filter($this->post->products);
if(empty($products))
@@ -324,6 +316,14 @@ class executionModel extends model
$this->config->execution->create->requiredFields .= ',project';
}
+ /* Judge workdays is legitimate. */
+ $workdays = helper::diffDate($_POST['end'], $_POST['begin']) + 1;
+ if(isset($_POST['days']) and $_POST['days'] > $workdays)
+ {
+ dao::$errors['days'] = sprintf($this->lang->project->workdaysExceed, $workdays);
+ return false;
+ }
+
/* Get the data from the post. */
$sprint = fixer::input('post')
->setDefault('status', 'wait')
diff --git a/module/execution/view/story.html.php b/module/execution/view/story.html.php
index c67e6f6d21..4da719b838 100644
--- a/module/execution/view/story.html.php
+++ b/module/execution/view/story.html.php
@@ -335,7 +335,7 @@
$actionLink = $this->createLink('story', 'batchEdit', "productID=0&executionID=$execution->id");
echo html::commonButton($lang->edit, "data-form-action='$actionLink' $disabled");
?>
-
+