diff --git a/module/bug/js/browse.js b/module/bug/js/browse.js index b49f8fa698..bb978db530 100644 --- a/module/bug/js/browse.js +++ b/module/bug/js/browse.js @@ -22,12 +22,35 @@ $(document).ready(function() if(flow == 'onlyTest') { - $('#modulemenu > .nav').append($('#featurebar').html()); + $('#modulemenu > .nav').append($('#featurebar > .submenu').html()); toggleSearch(); $(".export").modalTrigger({width:650, type:'iframe'}); $('#modulemenu > .nav > li').removeClass('active'); $('#modulemenu > .nav > li[data-id=' + browseType + ']').addClass('active'); + + var navWidth = $('#modulemenu > .nav').width(); + var leftWidth = 0; + var rightWidth = 0; + $('#modulemenu > .nav > li.right').each(function(){rightWidth += $(this).width();}) + + var maxWidth = navWidth - $('#modulemenu > .nav > #bysearchTab').width() - rightWidth - 80; + + $('#modulemenu > .nav > li:not(.right)').each(function() + { + if(leftWidth > maxWidth) + { + if($(this).attr('id') != 'moreMenus' && $(this).attr('id') != 'bysearchTab') + { + $('#moreMenus').removeClass('hidden'); + $('#moreMenus > ul').append($(this)[0]); + } + } + else + { + leftWidth += $(this).width(); + } + }) } }); diff --git a/module/bug/view/browse.html.php b/module/bug/view/browse.html.php index 06fb753284..3850353c15 100644 --- a/module/bug/view/browse.html.php +++ b/module/bug/view/browse.html.php @@ -19,31 +19,39 @@ js::set('bugBrowseType', ($browseType == 'bymodule' and $this->session->bugBrows js::set('flow', $this->config->global->flow); ?> config->global->flow == 'onlyTest'):?> - @@ -304,4 +313,10 @@ if($shortcut.size() > 0) $(function(){$('#modulemenu .nav li:last').after("
  • homepage?>
  • ")}); +global->flow == 'onlyTest'):?> + + diff --git a/module/testcase/js/browse.js b/module/testcase/js/browse.js index 0bb5a59a8c..2ef7983880 100644 --- a/module/testcase/js/browse.js +++ b/module/testcase/js/browse.js @@ -47,7 +47,8 @@ $(document).ready(function() if(flow == 'onlyTest') { - $('#modulemenu > .nav').append($('#featurebar').html()); + $('#modulemenu > .nav').append($('#featurebar > .submenu').html()); + toggleSearch(); $('.export').modalTrigger({width:650, type:'iframe'}); diff --git a/module/testcase/view/caseheader.html.php b/module/testcase/view/caseheader.html.php index d46f742a64..e5fc029109 100644 --- a/module/testcase/view/caseheader.html.php +++ b/module/testcase/view/caseheader.html.php @@ -1,68 +1,74 @@ config->global->flow);?> config->global->flow == 'onlyTest'):?> - @@ -258,7 +264,7 @@ $('#module' + moduleID).addClass('active'); $('#session->libBrowseType?>Tab').addClass('active'); if(flow == 'onlyTest') { - $('#modulemenu > .nav > li.right').before($('#featurebar').html()); + $('#modulemenu > .nav > li.right').before($('#featurebar .submenu').html()); toggleSearch(); $('#modulemenu > .nav > li').removeClass('active');