diff --git a/module/bug/js/browse.js b/module/bug/js/browse.js
index 07b9ece2ef..157727287f 100644
--- a/module/bug/js/browse.js
+++ b/module/bug/js/browse.js
@@ -1,7 +1,6 @@
$(function()
{
- if(browseType == 'bysearch') ajaxGetSearchForm();
- if($('#bugList thead th.w-title').width() < 150) $('#bugList thead th.w-title').width(150);
+ if($('#bugList thead th.c-title').width() < 150) $('#bugList thead th.c-title').width(150);
if(flow == 'onlyTest')
{
@@ -38,8 +37,3 @@ $(function()
})
}
});
-
-function setQueryBar(queryID, title)
-{
- $('#bysearchTab').before("
" + title + "");
-}
diff --git a/module/bug/view/browse.html.php b/module/bug/view/browse.html.php
index 8ff34d2ca1..a525a529da 100644
--- a/module/bug/view/browse.html.php
+++ b/module/bug/view/browse.html.php
@@ -101,14 +101,13 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
}
foreach($menus as $menuItem)
{
- if(isset($menuItem->hidden)) continue;
+ if(isset($menuItem->hidden) and $menuItem->name != 'QUERY') continue;
if($this->config->global->flow == 'onlyTest' and $menuItem->name == 'needconfirm') continue;
$menuBrowseType = strpos($menuItem->name, 'QUERY') === 0 ? 'bySearch' : $menuItem->name;
- $barParam = strpos($menuItem->name, 'QUERY') === 0 ? (int)substr($menuItem->name, 5) : 0;
- $label = "{$menuItem->text}";
- $label .= $menuBrowseType == $browseType ? "{$pager->recTotal}" : '';
- $active = $menuBrowseType == $browseType ? 'btn-active-text' : '';
+ $label = "{$menuItem->text}";
+ $label .= $menuBrowseType == $browseType ? "{$pager->recTotal}" : '';
+ $active = $menuBrowseType == $browseType ? 'btn-active-text' : '';
if($menuItem->name == 'my')
{
@@ -118,10 +117,35 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
foreach($lang->bug->mySelects as $key => $value)
{
echo '';
- echo html::a($this->createLink('bug', 'browse', "productid=$productID&branch=$branch&browseType=$key¶m=$barParam"), $value);
+ echo html::a($this->createLink('bug', 'browse', "productid=$productID&branch=$branch&browseType=$key"), $value);
}
echo '';
}
+ elseif($menuItem->name == 'QUERY')
+ {
+ if(isset($lang->custom->queryList))
+ {
+ echo '';
+ $active = '';
+ $current = $menuItem->text;
+ $dropdownHtml = "';
+
+ echo html::a('javascript:;', $current . " ", '', "data-toggle='dropdown' class='btn btn-link $active'");
+ echo $dropdownHtml;
+ echo '
';
+ }
+ }
else
{
if(strpos(',unconfirmed,assigntonull,longlifebugs,postponedbugs,overduebugs,needconfirm,', $menuItem->name) !== false)
@@ -131,12 +155,12 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
echo "';
}
else
{
- echo html::a($this->createLink('bug', 'browse', "productid=$productID&branch=$branch&browseType=$menuBrowseType¶m=$barParam"), $label, '', "class='btn btn-link $active'");
+ echo html::a($this->createLink('bug', 'browse', "productid=$productID&branch=$branch&browseType=$menuBrowseType"), $label, '', "class='btn btn-link $active'");
}
}
}
@@ -387,16 +411,9 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
diff --git a/module/testcase/view/caseheader.html.php b/module/testcase/view/caseheader.html.php
index 84e78caf0c..4ec606cc2a 100644
--- a/module/testcase/view/caseheader.html.php
+++ b/module/testcase/view/caseheader.html.php
@@ -85,14 +85,34 @@
?>
hidden)) continue;
+ if(isset($menuItem->hidden) and $menuItem->name != 'QUERY') continue;
$menuType = $menuItem->name;
if(!$config->testcase->needReview and empty($config->testcase->forceReview) and $menuType == 'wait') continue;
if($this->config->global->flow == 'onlyTest' and (strpos(',needconfirm,group,zerocase,', ',' . $menuType . ',') !== false)) continue;
- if($hasBrowsePriv and strpos($menuType, 'QUERY') === 0)
+ if($hasBrowsePriv and $menuType == 'QUERY')
{
- $queryID = (int)substr($menuType, 5);
- echo html::a($this->createLink('testcase', 'browse', "productid=$productID&branch=$branch&browseType=bySearch¶m=$queryID"), "{$menuItem->text}", '', "class='btn btn-link' id='{$menuType}Tab'");
+ if(isset($lang->custom->queryList))
+ {
+ echo '';
+ $active = '';
+ $current = $menuItem->text;
+ $dropdownHtml = "';
+
+ echo html::a('javascript:;', $current . " ", '', "data-toggle='dropdown' class='btn btn-link $active'");
+ echo $dropdownHtml;
+ echo '
';
+ }
}
elseif($hasBrowsePriv and ($menuType == 'all' or $menuType == 'needconfirm' or $menuType == 'wait'))
{