diff --git a/application/menunode.class.inc.php b/application/menunode.class.inc.php
index 19890597a..b924a198c 100644
--- a/application/menunode.class.inc.php
+++ b/application/menunode.class.inc.php
@@ -1133,7 +1133,6 @@ class OQLMenuNode extends MenuNode
$oBlock->Display($oPage, 0);
}
- //$oPage->add("
");
$oPage->add("");
$oTitle = TitleUIBlockFactory::MakeForPage($sTitle);
$oPage->AddUiBlock($oTitle);
@@ -1209,9 +1208,36 @@ class SearchMenuNode extends MenuNode
$oPage->SetBreadCrumbEntry("menu-".$this->sMenuId, $this->GetTitle(), '', '', 'fas fa-search', iTopWebPage::ENUM_BREADCRUMB_ENTRY_ICON_TYPE_CSS_CLASSES);
$oSearch = new DBObjectSearch($this->sClass);
- $aParams = array_merge(array('table_id' => 'Menu_'.utils::GetSafeId($this->GetMenuId())), $aExtraParams);
+ $sUsageId = 'Menu_'.utils::GetSafeId($this->GetMenuId());
+ $aParams = array_merge(array('table_id' =>$sUsageId), $aExtraParams);
$oBlock = new DisplayBlock($oSearch, 'search', false /* Asynchronous */, $aParams);
$oBlock->Display($oPage, 0);
+
+ $bAutoSubmit = true;
+ $mSubmitParam = utils::GetConfig()->Get('search_manual_submit');
+ if ($mSubmitParam !== false)
+ {
+ $bAutoSubmit = false;
+ }
+ else
+ {
+ $mSubmitParam = utils::GetConfig()->Get('high_cardinality_classes');
+ if (is_array($mSubmitParam)) {
+ if (in_array( $oSearch->GetClass(), $mSubmitParam)) {
+ $bAutoSubmit = false;
+ }
+ }
+ }
+ if($bAutoSubmit) {
+ $oPage->add("
");
+
+ $aParams = array_merge(array('table_id' =>$sUsageId), $aExtraParams);
+ $oBlock = new DisplayBlock($oSearch, 'list', false /* Asynchronous */, $aParams);
+ $oBlock->Display($oPage, $sUsageId);
+
+ $oPage->add("
");
+ }
+
}
}
diff --git a/js/search/search_form_handler.js b/js/search/search_form_handler.js
index b6cf7a595..a6d897fa6 100644
--- a/js/search/search_form_handler.js
+++ b/js/search/search_form_handler.js
@@ -127,10 +127,10 @@ $(function()
});
// If auto submit is enabled, also submit on first display
- if(this.options.auto_submit === true)
+ /*if(this.options.auto_submit === true)
{
this._submit();
- }
+ }*/
},
// called when created, and later when changing options