mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
N°4076 - Revert regression in global search from 344cce9fd
Current query was not visible when reaching the results page
This commit is contained in:
@@ -556,7 +556,7 @@ try
|
||||
$sQueryLabel = $sFullText;
|
||||
}
|
||||
GlobalSearchHelper::AddQueryToHistory($sQuery, $sQueryIconUrl, $sQueryLabel);
|
||||
$oP->AddBlockParam('global_search.query', $sQuery);
|
||||
$oP->SetBlockParam('ibo-global-search.sQuery', $sQuery);
|
||||
|
||||
// Check the needle length
|
||||
$iMinLenth = MetaModel::GetConfig()->Get('full_text_needle_min');
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<div id="{{ oUIBlock.GetId() }}"
|
||||
{# Note: The "ibo-is-opened" class is put there and not through the JS widget to avoid visual glitches #}
|
||||
{# Otherwise it would open only when the DOM is ready and the JS widget instantiated #}
|
||||
class="ibo-global-search"
|
||||
class="ibo-global-search {% if oUIBlock.HasQuery() %}ibo-is-opened{% endif %}"
|
||||
data-role="ibo-global-search">
|
||||
<form action="{{ oUIBlock.GetEndpoint() }}" method="get" class="ibo-global-search--head" data-role="ibo-global-search--head">
|
||||
<a href="#" class="ibo-global-search--icon" data-role="ibo-global-search--icon"
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
$('#{{ oUIBlock.GetId() }}').global_search({
|
||||
init_opened: {{ oUIBlock.HasQuery()|var_export }}
|
||||
});
|
||||
Reference in New Issue
Block a user