diff --git a/module/search/control.php b/module/search/control.php index 5b97e5e809..b07809e4ae 100644 --- a/module/search/control.php +++ b/module/search/control.php @@ -70,7 +70,9 @@ class search extends control $queryID = $this->search->saveQuery(); if(!$queryID) die(js::error(dao::getError())); - die(js::closeModal('parent.parent', '', "function(){parent.parent.loadQueries($queryID)}")); + $data = fixer::input('post')->get(); + $shortcut = empty($data->onMenuBar) ? 0 : 1; + die(js::closeModal('parent.parent', '', "function(){parent.parent.loadQueries($queryID, $shortcut, '{$data->title}')}")); } $this->view->module = $module; $this->view->onMenuBar = $onMenuBar; @@ -109,7 +111,7 @@ class search extends control foreach($queries as $queryID => $queryName) { if(empty($queryID)) continue; - $html .= html::a("###", $queryName . (common::hasPriv('search', 'deleteQuery') ? '' : ''), '', "class='label user-query' data-query-id='$queryID'"); + $html .= '
  • ' . html::a("javascript:executeQuery({$queryID})", $queryName . (common::hasPriv('search', 'deleteQuery') ? '' : ''), '', "class='label user-query' data-query-id='$queryID'") . '
  • '; } die($html); } diff --git a/module/search/lang/en.php b/module/search/lang/en.php index 7c005f8309..ead6467fbd 100644 --- a/module/search/lang/en.php +++ b/module/search/lang/en.php @@ -24,6 +24,7 @@ $lang->search->select = 'Stories/Tasks Filter'; $lang->search->me = 'Me'; $lang->search->noQuery = 'No query saved!'; $lang->search->onMenuBar = 'Show in Menu'; +$lang->search->custom = 'Custom'; $lang->search->account = 'Account'; $lang->search->module = 'Module'; diff --git a/module/search/lang/zh-cn.php b/module/search/lang/zh-cn.php index cc98ff7208..7a2fc64bb0 100644 --- a/module/search/lang/zh-cn.php +++ b/module/search/lang/zh-cn.php @@ -24,6 +24,7 @@ $lang->search->select = '需求/任务筛选'; $lang->search->me = '自己'; $lang->search->noQuery = '还没有保存查询!'; $lang->search->onMenuBar = '显示在菜单栏'; +$lang->search->custom = '自定义'; $lang->search->account = '用户名'; $lang->search->module = '模块'; diff --git a/module/search/view/buildform.html.php b/module/search/view/buildform.html.php index 6954877b6c..cdb3894e15 100644 --- a/module/search/view/buildform.html.php +++ b/module/search/view/buildform.html.php @@ -217,6 +217,7 @@ foreach($fieldParams as $fieldName => $param) +search->custom);?>