This commit is contained in:
王怡栋
2021-09-08 13:26:28 +08:00
3 changed files with 26 additions and 11 deletions

View File

@@ -30,6 +30,13 @@ js::set('manualUrl', ((!empty($config->isINT)) ? $config->manualUrl['int'] :
#upgradeContent {top: -272px; height: 262px;}
#latestVersionList {height: 200px;}
<?php endif;?>
<?php if(commonModel::isTutorialMode()):?>
#menuMoreNav > li.dropdown:hover + .tooltip {display: none!important;}
#menuMoreList > li.active {position: relative;}
#menuMoreList > li.active:before {content: ' '; display: block; position: absolute; left: 100%; border-width: 5px 5px 5px 0; border-style: solid; border-color: transparent; border-right-color: #ff9800; width: 0; height: 0; top: 12px}
#menuMoreList > li.active:after {content: attr(data-tip); display: block; position: absolute; left: 100%; background-color: #f1a325; color: #fff; top: 3px; white-space: nowrap; line-height: 16px; padding: 8px 10px; margin-left: 5px; border-radius: 4px;}
<?php endif;?>
</style>
<div id='menu'>
<nav id='menuNav'>

View File

@@ -2572,8 +2572,8 @@ class storyModel extends model
->beginIF($type == 'bybranch' and strpos($branchID, ',') !== false)->andWhere('t2.branch')->eq($branchParam)->fi()
->beginIF(strpos('changed|closed', $type) !== false)->andWhere('t2.status')->eq($type)->fi()
->beginIF($type == 'unclosed')->andWhere('t2.status')->in(array_keys($unclosedStatus))->fi()
->beginIF($type == 'linkedexecution')->andWhere('t2.id')->in(array_keys($storyIdList))->fi()
->beginIF($type == 'unlinkedexecution')->andWhere('t2.id')->notIn(array_keys($storyIdList))->fi()
->beginIF($type == 'linkedexecution')->andWhere('t2.id')->in($storyIdList)->fi()
->beginIF($type == 'unlinkedexecution')->andWhere('t2.id')->notIn($storyIdList)->fi()
->fi()
->beginIF($execution->type != 'project')
->beginIF(!empty($productParam))->andWhere('t1.product')->eq($productParam)->fi()
@@ -2631,8 +2631,8 @@ class storyModel extends model
->beginIF($status == 'unclosed')->andWhere('t2.status')->ne('closed')->fi()
->orderBy('t1.`order` desc')
->fetchAll();
if(empty($stories)) return array();
return $this->formatStories($stories, $type);
return empty($stories) ? array() : $this->formatStories($stories, $type);
}
/**

View File

@@ -81,8 +81,7 @@ $(function()
var clearTips = function()
{
appsWindow.$('#menuMainNav > li.hl-tutorial').removeClass('hl-tutorial hl-in').tooltip('destroy');
var $menuMainNav = appsWindow.$('#menuMainNav');
var $menuMainNav = appsWindow.$('#menuNav');
$menuMainNav.find('.hl-tutorial').removeClass('hl-tutorial hl-in');
$menuMainNav.find('.tooltip-tutorial').tooltip('destroy').removeClass('tooltip-tutorial');
var appWindow = getAppWindow();
@@ -178,16 +177,25 @@ $(function()
html: true
}, options);
$e = $e.first();
if($e.css('display') == 'none')
{
$e.parent().addClass('tooltip-tutorial').after("<div id='typeLabel' class='text-danger help-text'>" + options.title + "</div>");
}
else
if($e.css('display') !== 'none')
{
if(!$e.data('zui.tooltip')) $e.addClass('tooltip-tutorial').attr('data-toggle', 'tooltip').tooltip(options);
$e.tooltip('show');
if($e[0].getBoundingClientRect().top > $(window).height() || $e[0].getBoundingClientRect().top < 0) $e[0].scrollIntoView();
}
else if($e.parent().is('#menuMainNav'))
{
var $menuMoreItem = appsWindow.$('#menuMoreNav>li.dropdown');
highlight($menuMoreItem);
showToolTip($menuMoreItem, text, $.extend({}, options, {tipClass: 'tooltip-warning tooltip-max tooltip-menu-more text-nowrap', container: false}));
var appCode = $e.data('app');
appsWindow.$('#menuMoreList>li').removeClass('active').attr('data-tip', '');
appsWindow.$('#menuMoreList>li[data-app="' + appCode + '"]').addClass('active hl-tutorial hl-in').attr('data-tip', text);
}
else
{
$e.parent().addClass('tooltip-tutorial').after("<div id='typeLabel' class='text-danger help-text'>" + options.title + "</div>");
}
};
var tryCheckTask = function()