* Modify product plan style.
This commit is contained in:
@@ -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;}
|
||||
|
||||
@@ -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. */
|
||||
|
||||
@@ -145,7 +145,31 @@
|
||||
<td class='text-center'><?php echo $plan->stories;?></td>
|
||||
<td class='text-center'><?php echo $plan->bugs;?></td>
|
||||
<td class='text-center'><?php echo $plan->hour;?></td>
|
||||
<td class='text-center'><?php if(!empty($plan->projectID)) echo html::a(helper::createLink('execution', 'task', 'projectID=' . $plan->projectID), '<i class="icon-search"></i>');?></td>
|
||||
<td class='text-center'>
|
||||
<?php
|
||||
if(!empty($plan->projects))
|
||||
{
|
||||
if(count($plan->projects) === 1)
|
||||
{
|
||||
$executionID = key($plan->projects);
|
||||
echo html::a(helper::createLink('execution', 'task', "executionID=$executionID"), '<i class="icon-run text-primary"></i>', '', "title='{$plan->projects[$executionID]->name}'");
|
||||
}
|
||||
else
|
||||
{
|
||||
$executionHtml = '<div class="popover right">';
|
||||
$executionHtml .= '<div class="arrow"></div>';
|
||||
$executionHtml .= '<div class="popover-content">';
|
||||
$executionHtml .= '<ul class="execution-tip">';
|
||||
foreach($plan->projects as $executionID => $execution) $executionHtml .= '<li>' . html::a(helper::createLink('execution', 'task', "executionID=$executionID"), $execution->name, '', "class='execution-link' title='{$execution->name}'") . '</li>';
|
||||
$executionHtml .= '</ul>';
|
||||
$executionHtml .= '</div>';
|
||||
$executionHtml .= '</div>';
|
||||
echo "<i class='icon-run execution-popover text-primary'></i>";
|
||||
echo $executionHtml;
|
||||
}
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td class='text-left content'>
|
||||
<?php $desc = trim(strip_tags(str_replace(array('</p>', '<br />', '<br>', '<br/>'), "\n", str_replace(array("\n", "\r"), '', $plan->desc)), '<img>'));?>
|
||||
<div title='<?php echo $desc;?>'><?php echo nl2br($desc);?></div>
|
||||
|
||||
Reference in New Issue
Block a user