diff --git a/module/productplan/css/browse.css b/module/productplan/css/browse.css index 2b51775b97..666c20cb85 100644 --- a/module/productplan/css/browse.css +++ b/module/productplan/css/browse.css @@ -39,3 +39,8 @@ td.c-branch {overflow: hidden; text-align: left !important; text-overflow: ellip #productplanList .c-actions .btn+.btn {margin-left: -1px;} #productplanList .c-actions .btn {display: block; float: left;} #productplanList td.c-actions .dividing-line {width: 1px; height: 16px; display: inline-block; vertical-align: middle; background: #F4F5F7; margin: 6px 0 0 0; float: left;} + +.popover.right {left: 40px; top: -5px; white-space: nowrap;} +.popover.right .popover-content {padding: 5px 20px 0px 0px;} +.execution-tip {list-style: none;} +.popover.right .arrow {margin-top: -55px;} diff --git a/module/productplan/js/browse.js b/module/productplan/js/browse.js index f9b4ea064d..6e422368d5 100644 --- a/module/productplan/js/browse.js +++ b/module/productplan/js/browse.js @@ -99,6 +99,27 @@ $(function() { $.zui.ContextMenu.hide(); }); + + $('.execution-popover').on('click', function(e) + { + e.stopPropagation(); + var showPopover = $(this).next().css('display') == 'block'; + $('.popover.right').hide(); + if(!showPopover) $(this).next().show(); + }); + + $('.execution-link').on('click', function() + { + $('.popover.right').hide(); + }); + + /* Hide popover tip. */ + $(document).on('mousedown', function(e) + { + var $target = $(e.target); + var $toggle = $target.closest('.popover, .project-popover'); + if(!$toggle.length) $('.popover.right').hide(); + }); }); /* Define menu creators. */ diff --git a/module/productplan/view/browsebylist.html.php b/module/productplan/view/browsebylist.html.php index 8c9fab7c55..b6b25f912a 100644 --- a/module/productplan/view/browsebylist.html.php +++ b/module/productplan/view/browsebylist.html.php @@ -145,7 +145,31 @@ stories;?> bugs;?> hour;?> - projectID)) echo html::a(helper::createLink('execution', 'task', 'projectID=' . $plan->projectID), '');?> + + projects)) + { + if(count($plan->projects) === 1) + { + $executionID = key($plan->projects); + echo html::a(helper::createLink('execution', 'task', "executionID=$executionID"), '', '', "title='{$plan->projects[$executionID]->name}'"); + } + else + { + $executionHtml = '
'; + $executionHtml .= '
'; + $executionHtml .= '
'; + $executionHtml .= ''; + $executionHtml .= '
'; + $executionHtml .= '
'; + echo ""; + echo $executionHtml; + } + } + ?> + ', '
', '
', '
'), "\n", str_replace(array("\n", "\r"), '', $plan->desc)), ''));?>