From 2c509e2da56a59a5b105c36f8c0a9e14ef4bc49e Mon Sep 17 00:00:00 2001 From: wangyidong Date: Fri, 21 Jun 2013 03:44:23 +0000 Subject: [PATCH] * finish task #1401. --- module/my/view/m.story.html.php | 2 +- module/story/js/m.close.js | 18 ++++++++ module/story/js/m.review.js | 45 +++++++++++++++++++ module/story/view/m.activate.html.php | 26 +++++++++++ module/story/view/m.close.html.php | 34 +++++++++++++++ module/story/view/m.review.html.php | 50 +++++++++++++++++++++ module/story/view/m.sendmail.html.php | 39 +++++++++++++++++ module/story/view/m.view.html.php | 62 +++++++++++++++++++++++++++ www/js/m.my.full.js | 17 -------- 9 files changed, 275 insertions(+), 18 deletions(-) create mode 100755 module/story/js/m.close.js create mode 100755 module/story/js/m.review.js create mode 100755 module/story/view/m.activate.html.php create mode 100755 module/story/view/m.close.html.php create mode 100755 module/story/view/m.review.html.php create mode 100755 module/story/view/m.sendmail.html.php create mode 100755 module/story/view/m.view.html.php diff --git a/module/my/view/m.story.html.php b/module/my/view/m.story.html.php index f4fa5b1756..290fc77e51 100755 --- a/module/my/view/m.story.html.php +++ b/module/my/view/m.story.html.php @@ -22,7 +22,7 @@

diff --git a/module/story/js/m.close.js b/module/story/js/m.close.js new file mode 100755 index 0000000000..73b0e1988a --- /dev/null +++ b/module/story/js/m.close.js @@ -0,0 +1,18 @@ +function setStory(reason) +{ + if(reason == 'duplicate') + { + $('#duplicateStoryBox').show(); + $('#childStoriesBox').hide(); + } + else if(reason == 'subdivided') + { + $('#duplicateStoryBox').hide(); + $('#childStoriesBox').show(); + } + else + { + $('#duplicateStoryBox').hide(); + $('#childStoriesBox').hide(); + } +} diff --git a/module/story/js/m.review.js b/module/story/js/m.review.js new file mode 100755 index 0000000000..04776e8422 --- /dev/null +++ b/module/story/js/m.review.js @@ -0,0 +1,45 @@ +function switchShow(result) +{ + if(result == 'reject') + { + $('#rejectedReasonBox').show(); + $('#preVersionBox').hide(); + $('#assignedTo').val('closed'); + } + else if(result == 'revert') + { + $('#preVersionBox').show(); + $('#rejectedReasonBox').hide(); + $('#duplicateStoryBox').hide(); + $('#childStoriesBox').hide(); + $('#assignedTo').val(assignedTo); + } + else + { + $('#preVersionBox').hide(); + $('#rejectedReasonBox').hide(); + $('#duplicateStoryBox').hide(); + $('#childStoriesBox').hide(); + $('#rejectedReasonBox').hide(); + $('#assignedTo').val(assignedTo); + } +} + +function setStory(reason) +{ + if(reason == 'duplicate') + { + $('#duplicateStoryBox').show(); + $('#childStoriesBox').hide(); + } + else if(reason == 'subdivided') + { + $('#duplicateStoryBox').hide(); + $('#childStoriesBox').show(); + } + else + { + $('#duplicateStoryBox').hide(); + $('#childStoriesBox').hide(); + } +} diff --git a/module/story/view/m.activate.html.php b/module/story/view/m.activate.html.php new file mode 100755 index 0000000000..f0d2d03ec0 --- /dev/null +++ b/module/story/view/m.activate.html.php @@ -0,0 +1,26 @@ + + * @package story + * @version $Id: activate.html.php 4129 2013-01-18 01:58:14Z wwccss $ + * @link http://www.zentao.net + */ +?> + + +

+

story->activate;?>

+ story->assignedTo;?> + closedBy, 'class="select-3"');?> + story->comment;?> + +

+ + +

+
+ diff --git a/module/story/view/m.close.html.php b/module/story/view/m.close.html.php new file mode 100755 index 0000000000..cf1f489e17 --- /dev/null +++ b/module/story/view/m.close.html.php @@ -0,0 +1,34 @@ + + * @package story + * @version $Id: close.html.php 4129 2013-01-18 01:58:14Z wwccss $ + * @link http://www.zentao.net + */ +?> + + +
+

title;?>

+ story->closedReason;?> + story->reasonList, '', 'onchange="setStory(this.value)"');?> + + + story->comment;?> + +

+ + +

+
+ diff --git a/module/story/view/m.review.html.php b/module/story/view/m.review.html.php new file mode 100755 index 0000000000..96993d0342 --- /dev/null +++ b/module/story/view/m.review.html.php @@ -0,0 +1,50 @@ + + * @package story + * @version $Id: review.html.php 4129 2013-01-18 01:58:14Z wwccss $ + * @link http://www.zentao.net + */ +?> + + +

title?>

+
+ story->reviewedDate;?> + + story->reviewResult;?> + story->reviewResultList, '', 'class=select-3 onchange="switchShow(this.value)"');?> + + + + status == 'changed' or ($story->status == 'draft' and $story->version > 1)):?> + + + story->assignedTo;?> + lastEditedBy ? $story->lastEditedBy : $story->openedBy, 'class=select-3');?> + story->reviewedBy;?> + user->account . ', ', 'class=text-1');?> + story->comment;?> + +

+ + +

+
+ diff --git a/module/story/view/m.sendmail.html.php b/module/story/view/m.sendmail.html.php new file mode 100755 index 0000000000..8ca31250d5 --- /dev/null +++ b/module/story/view/m.sendmail.html.php @@ -0,0 +1,39 @@ + + * @package bug + * @version $Id: sendmail.html.php 4129 2013-01-18 01:58:14Z wwccss $ + * @link http://www.zentao.net + */ +?> + + + + + + + + + + +
+ STORY #id . "=>$story->assignedTo " . html::a(common::getSysURL() . $this->createLink('story', 'view', "storyID=$story->id"), $story->title);?> +
+
+ story->legendSpec;?> +
+ spec, 'src="data/upload')) + { + $story->spec = str_replace('server->http_host . $this->config->webRoot, $story->spec); + $story->spec = str_replace('server->http_host . $this->config->webRoot, $story->spec); + } + echo $story->spec; + ?> +
+
+
diff --git a/module/story/view/m.view.html.php b/module/story/view/m.view.html.php new file mode 100755 index 0000000000..f5edf1d07a --- /dev/null +++ b/module/story/view/m.view.html.php @@ -0,0 +1,62 @@ + + * @package story + * @version $Id: view.html.php 4728 2013-05-03 06:14:34Z chencongzhi520@gmail.com $ + * @link http://www.zentao.net + */ +?> + + +

id $story->title"?>

+
+

story->spec?>

+ spec?> +
+
+

story->verify?>

+ verify?> +
+ +
+
+
    +session->storyList != false ? $app->session->storyList : $this->createLink('product', 'browse', "productID=$story->product&moduleID=$story->module"); + $actionLinks = ''; + ob_start(); + if($this->story->isClickable($story, 'review')) + { + echo "
  • "; + common::printLink('story', 'review', "storyID=$story->id", $lang->story->review); + echo '
  • '; + } + if($this->story->isClickable($story, 'activate')) + { + echo "
  • "; + common::printLink('story', 'activate', "storyID=$story->id", $lang->story->activate); + echo '
  • '; + } + if($this->story->isClickable($story, 'close')) + { + echo "
  • "; + common::printLink('story', 'close', "storyID=$story->id", $lang->story->close); + echo '
  • '; + } + echo "
  • "; + common::printLink('story', 'delete', "storyID=$story->id", $lang->delete, 'hiddenwin'); + echo '
  • '; + echo "
  • " . html::a($browseLink, $lang->goback) . '
  • '; + $actionLinks = ob_get_contents(); + ob_clean(); + echo $actionLinks; +?> +
+
+
+ + diff --git a/www/js/m.my.full.js b/www/js/m.my.full.js index 2a2f399394..58b89a45be 100644 --- a/www/js/m.my.full.js +++ b/www/js/m.my.full.js @@ -61,22 +61,6 @@ function setPing() $('#hiddenwin').attr('src', createLink('misc', 'ping')); } -/** - * Set required fields, add star class to them. - * - * @access public - * @return void - */ -function setRequiredFields() -{ - if(!config.requiredFields) return false; - requiredFields = config.requiredFields.split(','); - for(i = 0; i < requiredFields.length; i++) - { - $('#' + requiredFields[i]).after(' * '); - } -} - /** * Set paceholder * @@ -223,7 +207,6 @@ $(document).ready(function() { setForm(); - setRequiredFields(); setPlaceholder(); toggleSearch();