From 15b83b3536ad71ebfffcf9c455248907b925fb04 Mon Sep 17 00:00:00 2001 From: chenfeiCF Date: Tue, 17 Jan 2017 08:40:28 +0800 Subject: [PATCH] * adjust code for task #2869. --- ! | 18 ------------------ module/my/view/story.html.php | 2 +- module/story/control.php | 5 +++++ module/story/lang/en.php | 3 +++ module/story/lang/zh-cn.php | 3 +++ module/story/view/batchclose.html.php | 23 ++++++----------------- 6 files changed, 18 insertions(+), 36 deletions(-) delete mode 100644 ! diff --git a/! b/! deleted file mode 100644 index ef7e673ca3..0000000000 --- a/! +++ /dev/null @@ -1,18 +0,0 @@ - *Adjust minor! -# Please enter the commit message for your changes. Lines starting -# with '#' will be ignored, and an empty message aborts the commit. -# On branch master -# Your branch is up-to-date with 'origin/master'. -# -# Changes to be committed: -# modified: action/lang/en.php -# modified: build/lang/en.php -# modified: common/lang/en.php -# modified: datatable/lang/en.php -# modified: doc/lang/en.php -# modified: install/lang/en.php -# modified: productplan/lang/en.php -# modified: release/lang/en.php -# modified: story/lang/en.php -# modified: tree/lang/en.php -# diff --git a/module/my/view/story.html.php b/module/my/view/story.html.php index ab5c606c40..ae40f7b600 100644 --- a/module/my/view/story.html.php +++ b/module/my/view/story.html.php @@ -89,7 +89,7 @@ createLink('story', 'batchClose'); - $misc = ($canBatchClose and $type != 'closedBy') ? "onclick=\"setFormAction('$actionLink','hiddenwin')\"" : $class; + $misc = ($canBatchClose and $type != 'closedBy') ? "onclick=\"setFormAction('$actionLink')\"" : $class; if($misc) echo "
  • " . html::a('javascript:;', $lang->close, '', $misc) . "
  • "; if(common::hasPriv('story', 'batchReview')) diff --git a/module/story/control.php b/module/story/control.php index 204b75f5af..9f5d9f5032 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -773,6 +773,11 @@ class story extends control /* Get edited stories. */ $stories = $this->dao->select('*')->from(TABLE_STORY)->where('id')->in($storyIDList)->fetchAll('id'); + foreach($stories as $story) + { + if($story->status == 'closed') unset($stories[$story->id]); + } + if(empty($stories)) die(js::alert($this->lang->story->notice->closed) . js::locate($this->session->storyList, 'parent')); /* The stories of a product. */ if($productID) diff --git a/module/story/lang/en.php b/module/story/lang/en.php index a45478264a..e7565b3b70 100644 --- a/module/story/lang/en.php +++ b/module/story/lang/en.php @@ -290,3 +290,6 @@ $lang->story->placeholder->estimate = $lang->story->hour; $lang->story->chosen = new stdClass(); $lang->story->chosen->reviewedBy = 'Choose Reviewer'; + +$lang->story->notice = new stdClass(); +$lang->story->notice->closed = 'Stories you selected have already been closed!'; diff --git a/module/story/lang/zh-cn.php b/module/story/lang/zh-cn.php index 34d82bb1dd..9439b74747 100644 --- a/module/story/lang/zh-cn.php +++ b/module/story/lang/zh-cn.php @@ -290,3 +290,6 @@ $lang->story->placeholder->estimate = $lang->story->hour; $lang->story->chosen = new stdClass(); $lang->story->chosen->reviewedBy = '选择评审人...'; + +$lang->story->notice = new stdClass(); +$lang->story->notice->closed = '您选择的需求已经被关闭了!'; diff --git a/module/story/view/batchclose.html.php b/module/story/view/batchclose.html.php index 57247415e9..41090ee6cd 100755 --- a/module/story/view/batchclose.html.php +++ b/module/story/view/batchclose.html.php @@ -30,39 +30,28 @@ story->comment;?> - + $story):?> - title;?> - story->statusList[$stories[$storyID]->status];?> - - status != 'closed'):?> + title;?> + story->statusList[$story->status];?> - status == 'draft') unset($this->lang->story->reasonList['cancel']);?> + status == 'draft') unset($this->lang->story->reasonList['cancel']);?> - -
    story->reasonList, 'done', "class=form-control onchange=setDuplicateAndChild(this.value,$storyID) style='min-width: 70px'");?> ' closedReason != 'duplicate') echo "style='display:none'";?>> + ' closedReason != 'duplicate') echo "style='display:none'";?>> idAB}' autocomplete='off'");?> ' closedReason != 'subdivided') echo "style='display:none'";?>> + ' closedReason != 'subdivided') echo "style='display:none'";?>> idAB}' autocomplete='off'");?>
    - - -
    - story->reasonList, $stories[$storyID]->closedReason, 'disabled="disabled" class="form-control"');?> -
    - - - -