-
+
+
-
@@ -639,7 +649,6 @@ js::set('unlink', $lang->story->unlink);
js::set('cancel', $lang->cancel);
js::set('rawModule', $this->app->rawModule);
?>
-
+
diff --git a/module/story/control.php b/module/story/control.php index 050312a13b..a5d4018aab 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -1296,32 +1296,33 @@ class story extends control $position[] = $this->lang->story->common; $position[] = $this->lang->story->view; - $this->view->title = $title; - $this->view->position = $position; - $this->view->product = $product; - $this->view->branches = $product->type == 'normal' ? array() : $this->loadModel('branch')->getPairs($product->id); - $this->view->plan = $plan; - $this->view->bugs = $bugs; - $this->view->fromBug = $fromBug; - $this->view->cases = $cases; - $this->view->story = $story; - $this->view->linkedMRs = $linkedMRs; - $this->view->track = $this->story->getTrackByID($story->id); - $this->view->users = $this->user->getPairs('noletter'); - $this->view->reviewers = $reviewers; - $this->view->relations = $this->story->getStoryRelation($story->id, $story->type); - $this->view->executions = $this->execution->getPairs(0, 'all', 'nocode'); - $this->view->execution = empty($story->execution) ? array() : $this->dao->findById($story->execution)->from(TABLE_EXECUTION)->fetch(); - $this->view->actions = $this->action->getList('story', $storyID); - $this->view->storyModule = $storyModule; - $this->view->modulePath = $modulePath; - $this->view->storyProducts = $storyProducts; - $this->view->version = $version; - $this->view->preAndNext = $this->loadModel('common')->getPreAndNextObject('story', $storyID); - $this->view->from = $from; - $this->view->param = $param; - $this->view->builds = $this->loadModel('build')->getStoryBuilds($storyID); - $this->view->releases = $this->loadModel('release')->getStoryReleases($storyID); + $this->view->title = $title; + $this->view->position = $position; + $this->view->product = $product; + $this->view->branches = $product->type == 'normal' ? array() : $this->loadModel('branch')->getPairs($product->id); + $this->view->siblings = !empty($story->sibling) ? $this->story->getByList($story->sibling) : array(); + $this->view->plan = $plan; + $this->view->bugs = $bugs; + $this->view->fromBug = $fromBug; + $this->view->cases = $cases; + $this->view->story = $story; + $this->view->linkedMRs = $linkedMRs; + $this->view->track = $this->story->getTrackByID($story->id); + $this->view->users = $this->user->getPairs('noletter'); + $this->view->reviewers = $reviewers; + $this->view->relations = $this->story->getStoryRelation($story->id, $story->type); + $this->view->executions = $this->execution->getPairs(0, 'all', 'nocode'); + $this->view->execution = empty($story->execution) ? array() : $this->dao->findById($story->execution)->from(TABLE_EXECUTION)->fetch(); + $this->view->actions = $this->action->getList('story', $storyID); + $this->view->storyModule = $storyModule; + $this->view->modulePath = $modulePath; + $this->view->storyProducts = $storyProducts; + $this->view->version = $version; + $this->view->preAndNext = $this->loadModel('common')->getPreAndNextObject('story', $storyID); + $this->view->from = $from; + $this->view->param = $param; + $this->view->builds = $this->loadModel('build')->getStoryBuilds($storyID); + $this->view->releases = $this->loadModel('release')->getStoryReleases($storyID); $this->display(); } @@ -2741,4 +2742,17 @@ class story extends control return print(html::select('URS[]', $URS, $requirementList, "class='form-control chosen' multiple")); } + + /** + * AJAX: Deleted story sibling. + * + * @access public + * @return void + */ + public function ajaxRelieveSibling() + { + $storyID = !empty($_POST['storyID']) ? $_POST['storyID'] : 0; + $this->dao->update(TABLE_STORY)->set('SIBLING')->eq('')->where('id')->eq($_POST['storyID'])->exec(); + return print('success'); + } } diff --git a/module/story/css/common.css b/module/story/css/common.css index 3baf85cc15..1eb34136d8 100644 --- a/module/story/css/common.css +++ b/module/story/css/common.css @@ -17,3 +17,13 @@ .c-source {width: 130px} .c-note {width: 100px} .c-category {width: 90px} + +.icon-info {color: #ff9800; border-color: #ff9800;} +.text-active {text-decoration: underline;} +.text-cancel {text-decoration: underline;color:#838a9d;margin-left:10px;} +.popover {border:unset;} +.popover.bottom .arrow{border-bottom-color:#ffffff;} +.popover-icon {float:left;} +.popover .content {margin-left:20px;overflow: overlay;} +.hide {display:none !important;} +.sibling {padding:6px;} diff --git a/module/story/js/common.js b/module/story/js/common.js index 5e6525c4eb..9b595ec82b 100644 --- a/module/story/js/common.js +++ b/module/story/js/common.js @@ -86,3 +86,31 @@ function loadURS() $('#URS').chosen(); }); } + +$('.sibling').mouseover(function() { + $(this).find('.unlink').removeClass('hide'); +}); +$('.sibling').mouseout(function() { + $(this).find('.unlink').addClass('hide'); +}); + +$('[data-toggle="popover"]').each(function(item) { + $index = $(this).attr('data-id'); + $(this).popover({ + placement: 'bottom', + html: true, + content: '