diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php index 8ab4a363ce..2293baa619 100755 --- a/module/common/lang/zh-cn.php +++ b/module/common/lang/zh-cn.php @@ -549,7 +549,6 @@ $lang->menugroup->branch = 'product'; $lang->menugroup->productplan = 'product'; $lang->menugroup->task = 'project'; $lang->menugroup->build = 'project'; -$lang->menugroup->product = 'projectstory'; $lang->menugroup->convert = 'admin'; $lang->menugroup->upgrade = 'admin'; $lang->menugroup->user = 'company'; diff --git a/module/issue/control.php b/module/issue/control.php index 5a663800d3..4384512d62 100644 --- a/module/issue/control.php +++ b/module/issue/control.php @@ -363,7 +363,7 @@ class issue extends control $this->loadModel('task'); $this->loadModel('tree'); $this->loadModel('project')->getLimitedExecution(); - $projects = $this->project->getExecutionPairs($this->session->PRJ); + $projects = $this->project->getExecutionsByProject($this->session->PRJ, 'all', 0, true); $projectID = $this->session->project; $projectID = isset($projects[$projectID]) ? $projectID : key($projects); diff --git a/module/program/js/common.js b/module/program/js/common.js index ee9f05be02..9c2b61b283 100644 --- a/module/program/js/common.js +++ b/module/program/js/common.js @@ -1,9 +1,10 @@ -function setProgramType(type) -{ - $.cookie('programType', type, {expires:config.cookieLife, path:config.webRoot}); - location.href = location.href; -} - +/** + * Access rights are equal to private, and the white list settings are displayed. + * + * @param string acl + * @access public + * @return void + */ function setWhite(acl) { acl != 'open' ? $('#whitelistBox').removeClass('hidden') : $('#whitelistBox').addClass('hidden'); @@ -12,7 +13,7 @@ function setWhite(acl) /** * Convert a date string like 2011-11-11 to date object in js. * - * @param string $date + * @param string dateString * @access public * @return date */ @@ -25,8 +26,8 @@ function convertStringToDate(dateString) /** * Compute delta of two days. * - * @param string $date1 - * @param string $date1 + * @param string date1 + * @param string date2 * @access public * @return int */ @@ -50,6 +51,7 @@ function computeDaysDelta(date1, date2) /** * Compute work days. * + * @param string currentID * @access public * @return void */ @@ -124,12 +126,15 @@ function computeEndDate(delta) /** * Load branches. * - * @param int $product + * @param object product * @access public * @return void */ function loadBranches(product) { + /* When selecting a product, delete a plan that is empty by default. */ + $("#planDefault").remove(); + $('#productsBox select').each(function() { var $product = $(product); @@ -196,7 +201,12 @@ function loadPlans(product, branchID) } } - +/** + * Adjust the layout of product selection. + * + * @access public + * @return void + */ function adjustProductBoxMargin() { var productRows = Math.ceil($('#productsBox > .row > .col-sm-4').length / 3); @@ -209,6 +219,12 @@ function adjustProductBoxMargin() } } +/** + * Adjust the layout of the plan selection. + * + * @access public + * @return void + */ function adjustPlanBoxMargin() { var planRows = Math.ceil($('#plansBox > .row > .col-sm-4').length / 3); @@ -221,6 +237,12 @@ function adjustPlanBoxMargin() } } +/** + * Initialization operation. + * + * @access public + * @return void + */ $(function() { $('#privList > tbody > tr > th input[type=checkbox]').change(function() diff --git a/module/program/view/prjedit.html.php b/module/program/view/prjedit.html.php index 7446aa4449..6649ed9801 100644 --- a/module/program/view/prjedit.html.php +++ b/module/program/view/prjedit.html.php @@ -63,7 +63,7 @@ -
'> +
'>
@@ -78,10 +78,11 @@
- id, array(0 => ''));?> -
id . "]", $plans, $product->plan, "class='form-control chosen'");?>
- + id, array(0 => ''));?> +
id . "]", $plans, $product->plan, "class='form-control chosen'");?>
+ +
diff --git a/module/projectstory/config.php b/module/projectstory/config.php deleted file mode 100644 index a4abe2dafc..0000000000 --- a/module/projectstory/config.php +++ /dev/null @@ -1,2 +0,0 @@ -session->set('storyList', $this->app->getURI(true)); if(empty($productID)) $productID = key($this->products); + $this->lang->menugroup->product = 'projectstory'; + $this->lang->projectstory->menu->requirement['subModule'] = 'product'; + $this->projectstory->setMenu($this->products, $productID, $branch); + + $this->lang->story->title = str_replace($this->lang->productSRCommon, $this->lang->projectSRCommon, $this->lang->story->title); $this->lang->story->createRequirement = str_replace($this->lang->productURCommon, $this->lang->projectURCommon, $this->lang->story->createRequirement); $this->lang->story->createStory = str_replace($this->lang->productSRCommon, $this->lang->projectSRCommon, $this->lang->story->createStory); $this->lang->story->noStory = str_replace($this->lang->productSRCommon, $this->lang->projectSRCommon, $this->lang->story->noStory); - $this->lang->projectstory->menu->requirement['subModule'] = 'product'; - $this->projectstory->setMenu($this->products, $productID, $branch); echo $this->fetch('product', 'browse', "productID=$productID&branch=$branch&browseType=$browseType¶m=$param&storyType=$storyType&orderBy=$orderBy&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID"); } @@ -71,12 +74,14 @@ class projectStory extends control */ public function story($productID = 0, $branch = '', $browseType = '', $param = 0, $storyType = 'story', $orderBy = '', $recTotal = 0, $recPerPage = 20, $pageID = 1) { - $this->session->set('storyList', $this->app->getURI(true)); + $this->session->set('storyList',$this->app->getURI(true)); if(empty($productID)) $productID = key($this->products); + $this->lang->menugroup->product = 'projectstory'; $this->lang->projectstory->menu->story['subModule'] = 'product'; $this->projectstory->setMenu($this->products, $productID, $branch); + $this->lang->story->title = str_replace($this->lang->productSRCommon, $this->lang->projectSRCommon, $this->lang->story->title); $this->lang->story->createRequirement = str_replace($this->lang->productURCommon, $this->lang->projectURCommon, $this->lang->story->createRequirement); $this->lang->story->createStory = str_replace($this->lang->productSRCommon, $this->lang->projectSRCommon, $this->lang->story->createStory); $this->lang->story->noStory = str_replace($this->lang->productSRCommon, $this->lang->projectSRCommon, $this->lang->story->noStory); @@ -98,11 +103,13 @@ class projectStory extends control public function track($productID = 0, $branch = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1) { if(empty($productID)) $productID = key($this->products); + $this->lang->menugroup->story = 'projectstory'; $this->lang->projectstory->menu->track['subModule'] = 'story'; $this->projectstory->setMenu($this->products, $productID, $branch); $this->lang->story->requirement = str_replace($this->lang->productURCommon, $this->lang->projectURCommon, $this->lang->story->requirement); $this->lang->story->story = str_replace($this->lang->productSRCommon, $this->lang->projectSRCommon, $this->lang->story->story); + echo $this->fetch('story', 'track', "productID=$productID&branch=$branch&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID"); } } diff --git a/module/projectstory/lang/zh-cn.php b/module/projectstory/lang/zh-cn.php index 1dab22b92a..976dd55c36 100644 --- a/module/projectstory/lang/zh-cn.php +++ b/module/projectstory/lang/zh-cn.php @@ -1,6 +1,6 @@ projectstory->common = '项目需求'; +$lang->projectstory->common = '项目列表'; $lang->projectstory->index = '需求主页'; -$lang->projectstory->requirement = '用户需求'; -$lang->projectstory->story = '软件需求'; +$lang->projectstory->requirement = $lang->generalUR; +$lang->projectstory->story = $lang->generalSR; $lang->projectstory->track = '跟踪矩阵'; diff --git a/module/story/control.php b/module/story/control.php index adff27195c..161157a261 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -722,7 +722,8 @@ class story extends control $changes = $this->story->change($storyID); if(dao::isError()) die(js::error(dao::getError())); $version = $this->dao->findById($storyID)->from(TABLE_STORY)->fetch('version'); - $files = $this->loadModel('file')->saveUpload('story', $storyID, $version); + $files = $this->loadModel('file')->saveUpload('story', $storyID, $version); + if($this->post->comment != '' or !empty($changes) or !empty($files)) { $action = (!empty($changes) or !empty($files)) ? 'Changed' : 'Commented';