* finish task #4501 and fix bug #1980.

This commit is contained in:
Catouse
2018-07-09 17:30:02 +08:00
parent 03f4199ba9
commit eddd9caf61
2 changed files with 33 additions and 10 deletions
+19 -3
View File
@@ -1,7 +1,23 @@
$(function()
{
$('.popoverStage').mouseover(function(){$(this).popover('show')});
$('.popoverStage').mouseout(function(){$(this).popover('hide')});
if($('#storyList thead th.c-title').width() < 150) $('#storyList thead th.c-title').width(150);
// Fix state dropdown menu position
$('.c-stage > .dropdown').each(function()
{
var $this = $(this);
var menuHeight = $(this).find('.dropdown-menu').outerHeight();
var $tr = $this.closest('tr');
var height = 0;
while(height < menuHeight)
{
var $next = $tr.next('tr');
if(!$next.length) break;
height += $next.outerHeight;
}
if(height < menuHeight)
{
$this.addClass('dropup');
}
});
});
+14 -7
View File
@@ -2362,15 +2362,22 @@ class storyModel extends model
echo $story->estimate;
break;
case 'stage':
echo "<div" . (isset($storyStages[$story->id]) ? " class='popoverStage' data-toggle='popover' data-placement='bottom' data-target='\$next'" : '') . ">";
echo $this->lang->story->stageList[$story->stage];
if(isset($storyStages[$story->id])) echo "<span><i class='icon icon-caret-down'></i></span>";
echo '</div>';
if(isset($storyStages[$story->id]))
{
echo "<div class='popover'>";
foreach($storyStages[$story->id] as $storyBranch => $storyStage) echo $branches[$storyBranch] . ": " . $this->lang->story->stageList[$storyStage->stage] . '<br />';
echo "</div>";
echo "<div class='dropdown dropdown-hover'>";
echo $this->lang->story->stageList[$story->stage];
echo "<span class='caret'></span>";
echo "<ul class='dropdown-menu pull-right'>";
foreach($storyStages[$story->id] as $storyBranch => $storyStage)
{
echo '<li class="text-ellipsis">' . $branches[$storyBranch] . ": " . $this->lang->story->stageList[$storyStage->stage] . '</li>';
}
echo "</ul>";
echo '</div>';
}
else
{
echo $this->lang->story->stageList[$story->stage];
}
break;
case 'taskCount':