diff --git a/module/bug/view/browse.html.php b/module/bug/view/browse.html.php
index 1fe478e3a8..dab1853322 100644
--- a/module/bug/view/browse.html.php
+++ b/module/bug/view/browse.html.php
@@ -68,28 +68,9 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
}
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 '
';
- }
+ $searchBrowseLink = inlink('browse', "productID=$productID&branch=$branch&browseType=bySearch¶m=%s");
+ $isBySearch = $browseType == 'bysearch';
+ include '../../common/view/querymenu.html.php';
}
elseif($menuItem->name == 'more')
{
diff --git a/module/common/view/querymenu.html.php b/module/common/view/querymenu.html.php
new file mode 100644
index 0000000000..cf99b2332a
--- /dev/null
+++ b/module/common/view/querymenu.html.php
@@ -0,0 +1,52 @@
+
+custom->queryList))
+{
+ echo '';
+ $active = '';
+ $current = $menuItem->text;
+ $dropdownHtml = "';
+
+ echo html::a('javascript:;', $current . " ", '', "data-toggle='dropdown' class='btn btn-link $active'");
+ echo $dropdownHtml;
+ echo '
';
+}
+?>
+
diff --git a/module/custom/control.php b/module/custom/control.php
index 57172d786c..04cf38b4f0 100644
--- a/module/custom/control.php
+++ b/module/custom/control.php
@@ -111,6 +111,7 @@ class custom extends control
elseif($module == 'user' and $field == 'contactField')
{
$data = fixer::input('post')->join('contactField', ',')->get();
+ if(!isset($data->contactField)) $data->contactField = '';
$this->loadModel('setting')->setItem('system.user.contactField', $data->contactField);
}
elseif($module == 'user' and $field == 'deleted')
diff --git a/module/product/js/browse.js b/module/product/js/browse.js
index 35df777a3c..f8eaac4fb3 100644
--- a/module/product/js/browse.js
+++ b/module/product/js/browse.js
@@ -1,7 +1,7 @@
$(function()
{
if($('#storyList thead th.c-title').width() < 150) $('#storyList thead th.c-title').width(150);
- setTimeout(function(){fixFeatureBar();}, 500);
+ setTimeout(function(){fixFeatureBar();}, 10);
// Fix state dropdown menu position
$('.c-stage > .dropdown').each(function()
diff --git a/module/product/view/browse.html.php b/module/product/view/browse.html.php
index c1f8459dac..9ec47cf761 100644
--- a/module/product/view/browse.html.php
+++ b/module/product/view/browse.html.php
@@ -59,28 +59,9 @@
}
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 '
';
- }
+ $searchBrowseLink = inlink('browse', "productID=$productID&branch=$branch&browseType=$menuBrowseType¶m=%s");
+ $isBySearch = $this->session->storyBrowseType == 'bysearch';
+ include '../../common/view/querymenu.html.php';
}
else
{
diff --git a/module/project/view/task.html.php b/module/project/view/task.html.php
index 0e665f91bb..b0cab41959 100644
--- a/module/project/view/task.html.php
+++ b/module/project/view/task.html.php
@@ -55,29 +55,9 @@ js::set('browseType', $browseType);
$menuType = $menuItem->name;
if($menuType == 'QUERY')
{
- if(isset($lang->custom->queryList))
- {
- echo "";
- $current = $menuItem->text;
- $active = '';
- $dropdownHtml = "';
-
- echo html::a('javascript:;', $current . " ", '', "data-toggle='dropdown' class='btn btn-link $active'");
- echo $dropdownHtml;
- echo '
';
- }
+ $searchBrowseLink = $this->createLink('project', 'task', "project=$projectID&type=bySearch¶m=%s");
+ $isBySearch = $this->session->taskBrowseType == 'bysearch';
+ include '../../common/view/querymenu.html.php';
}
elseif($menuType != 'status' and $menuType != 'QUERY')
{
diff --git a/module/search/control.php b/module/search/control.php
index b07809e4ae..cedf05a029 100644
--- a/module/search/control.php
+++ b/module/search/control.php
@@ -115,4 +115,16 @@ class search extends control
}
die($html);
}
+
+ /**
+ * Ajax remove from menu.
+ *
+ * @param int $queryID
+ * @access public
+ * @return void
+ */
+ public function ajaxRemoveMenu($queryID)
+ {
+ $this->dao->update(TABLE_USERQUERY)->set('shortcut')->eq(0)->where('id')->eq($queryID)->exec();
+ }
}
diff --git a/module/search/view/buildform.html.php b/module/search/view/buildform.html.php
index 56b98deba1..044192cff4 100644
--- a/module/search/view/buildform.html.php
+++ b/module/search/view/buildform.html.php
@@ -296,9 +296,14 @@ $(function()
if($('#mainMenu .btn-toolbar.pull-left #query').size() == 0)
{
var html = '';
+ html += '';
+ html += "