diff --git a/module/my/css/story.css b/module/my/css/story.css new file mode 100644 index 0000000000..3e00457c7b --- /dev/null +++ b/module/my/css/story.css @@ -0,0 +1,11 @@ +.table-children {border-left: 2px solid #cbd0db; border-right: 2px solid #cbd0db;} +.table tbody > tr.table-children.table-child-top {border-top: 2px solid #cbd0db;} +.table tbody > tr.table-children.table-child-bottom {border-bottom: 2px solid #cbd0db;} +.table td.has-child > a:not(.story-toggle) {max-width: 90%; max-width: calc(100% - 30px); display: inline-block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;} +.table td.has-child > .story-toggle {color: #838a9d; position: relative; top: 1px;} +.table td.has-child > .story-toggle:hover {color: #006af1; cursor: pointer;} +.table td.has-child > .story-toggle > .icon {font-size: 16px; display: inline-block; transition: transform .2s; -ms-transform:rotate(-90deg); -moz-transform:rotate(-90deg); -o-transform:rotate(-90deg); -webkit-transform:rotate(-90deg); transform: rotate(-90deg);} +.table td.has-child > .story-toggle > .icon:before {text-align: left;} +.table td.has-child > .story-toggle.collapsed > .icon {-ms-transform:rotate(90deg); -moz-transform:rotate(90deg); -o-transform:rotate(90deg); -webkit-transform:rotate(90deg); transform: rotate(90deg);} +.main-table tbody > tr.table-children > td:first-child::before {width: 3px;} +@-moz-document url-prefix() {.main-table tbody > tr.table-children > td:first-child::before {width: 4px;}} diff --git a/module/my/js/story.js b/module/my/js/story.js new file mode 100644 index 0000000000..65996d23e9 --- /dev/null +++ b/module/my/js/story.js @@ -0,0 +1,20 @@ +$(function() +{ + $('#storyList td.has-child .story-toggle').each(function() + { + var $td = $(this).closest('td'); + var labelWidth = 0; + if($td.find('.label').length > 0) labelWidth = $td.find('.label').width(); + $td.find('a').eq(0).css('max-width', $td.width() - labelWidth - 60); + }); + + $(document).on('click', '.story-toggle', function(e) + { + var $toggle = $(this); + var id = $(this).data('id'); + var isCollapsed = $toggle.toggleClass('collapsed').hasClass('collapsed'); + $toggle.closest('[data-ride="table"]').find('tr.parent-' + id).toggle(!isCollapsed); + e.stopPropagation(); + e.preventDefault(); + }); +}) diff --git a/module/my/view/story.html.php b/module/my/view/story.html.php index 88b31b9b38..dd3dada853 100644 --- a/module/my/view/story.html.php +++ b/module/my/view/story.html.php @@ -29,7 +29,7 @@
- +
pri;?>' title='story->priList, $story->pri, $story->pri);?>'>story->priList, $story->pri, $story->pri);?> - + @@ -94,6 +97,47 @@ ?> + children)):?> + + children as $key => $child):?> + createLink('story', 'view', "id=$child->id", '', '', $child->program);?> + + children)) ? ' table-child-bottom' : '';?> + + + + + + + + + + + + + + + +
program, '');?> productTitle;?>title, null, "style='color: $story->color'");?> + title, null, "style='color: $story->color'");?> + children)) echo '';;?> + planTitle;?> openedBy);?> estimate;?>
+ +
+ + +
+ + id);?> +
pri;?>' title='story->priList, $child->pri, $child->pri);?>'>story->priList, $child->pri, $child->pri);?>program, '');?>productTitle;?> + lang->story->children .'">' . $this->lang->story->childrenAB . ' ' . html::a($storyLink, $child->title, null, "style='color: $child->color'");?> + planTitle;?>openedBy);?>estimate;?> processStatus('story', $child);?>story->stageList, $child->stage);?> + id}"; + common::printIcon('story', 'change', $vars, $child, 'list', 'fork', '', '', '', '', '', $child->program); + common::printIcon('story', 'review', $vars, $child, 'list', 'glasses', '', '', '', '', '', $child->program); + common::printIcon('story', 'close', $vars, $child, 'list', '', '', 'iframe', true, '', '', $child->program); + common::printIcon('story', 'edit', $vars, $child, 'list', '', '', '', '', '', '', $child->program); + common::printIcon('story', 'createCase', "productID=$child->product&branch=$child->branch&module=0&from=¶m=0&$vars", $child, 'list', 'sitemap', '', '', '', '', '', $child->program); + ?> +
diff --git a/module/my/view/testcase.html.php b/module/my/view/testcase.html.php index 9dcaef3658..2f7868edcc 100644 --- a/module/my/view/testcase.html.php +++ b/module/my/view/testcase.html.php @@ -47,7 +47,6 @@ - selectAll}'>";?> idAB);?> priAB);?> @@ -69,7 +68,7 @@ ?> - id => '')) . html::a(helper::createLink('testcase', 'view', "caseID =$case->id"), sprintf('%03d', $case->id)); ?> + id); ?> pri?>' title='testcase->priList, $case->pri, $case->pri);?>'>testcase->priList, $case->pri, $case->pri)?> version";?> @@ -95,23 +94,6 @@
diff --git a/module/user/model.php b/module/user/model.php index 75c087e95c..a5a677b780 100644 --- a/module/user/model.php +++ b/module/user/model.php @@ -1857,7 +1857,7 @@ class userModel extends model $personalData = array(); $personalData['createdTodo'] = $this->dao->select($count)->from(TABLE_TODO)->where('account')->eq($account)->fetch('count'); - $personalData['createdStory'] = $this->dao->select($count)->from(TABLE_STORY)->where('openedBy')->eq($account)->andWhere('deleted')->eq('0')->fetch('count'); + $personalData['createdStory'] = $this->dao->select($count)->from(TABLE_STORY)->where('openedBy')->eq($account)->andWhere('deleted')->eq('0')->andWhere('type')->eq('story')->fetch('count'); $personalData['resolvedBug'] = $this->dao->select($count)->from(TABLE_BUG)->where('resolvedBy')->eq($account)->andWhere('deleted')->eq('0')->fetch('count'); $personalData['createdCase'] = $this->dao->select($count)->from(TABLE_CASE)->where('openedBy')->eq($account)->andWhere('deleted')->eq('0')->andWhere('product')->ne(0)->fetch('count'); $personalData['finishedTask'] = $this->dao->select($count)->from(TABLE_TASK)->where('deleted')->eq('0')