N°6152 - Search: Criteria & object list loaded twice (#495)

This commit is contained in:
Anne-Catherine
2023-08-31 12:03:31 +02:00
committed by GitHub
parent 351893bbdd
commit b508c0d983
4 changed files with 17 additions and 16 deletions

View File

@@ -178,17 +178,18 @@ class UILinksWidget
$oDisplayBlock = new DisplayBlock($oFilter, 'search', false);
$oBlock->AddSubBlock($oDisplayBlock->GetDisplay($oPage, "SearchFormToAdd_{$sLinkedSetId}",
array(
'menu' => false,
[
'menu' => false,
'result_list_outer_selector' => "SearchResultsToAdd_{$sLinkedSetId}",
'table_id' => "add_{$sLinkedSetId}",
'table_inner_id' => "ResultsToAdd_{$sLinkedSetId}",
'selection_mode' => true,
'json' => $sJson,
'cssCount' => '#count_'.$this->m_sAttCode.$this->m_sNameSuffix,
'query_params' => $oFilter->GetInternalParams(),
'hidden_criteria' => $sAlreadyLinkedExpression,
)));
'table_id' => "add_{$sLinkedSetId}",
'table_inner_id' => "ResultsToAdd_{$sLinkedSetId}",
'selection_mode' => true,
'json' => $sJson,
'cssCount' => '#count_'.$this->m_sAttCode.$this->m_sNameSuffix,
'query_params' => $oFilter->GetInternalParams(),
'hidden_criteria' => $sAlreadyLinkedExpression,
'submit_on_load' => false,
]));
$oBlock->AddForm();
}

View File

@@ -153,16 +153,15 @@ function LinksWidget(id, sClass, sAttCode, iInputId, sSuffix, bDuplicates, oWizH
"dataType": "html"
})
.done(function (data) {
/* N°6152 - Hide during data loading and before open */
$('#dlg_'+me.id).hide();
$('#dlg_'+me.id).html(data);
window[sPromiseId].then(function () {
$('#dlg_'+me.id).dialog('open');
me.UpdateSizes(null, null);
if (me.bDoSearch)
{
if (me.bDoSearch) {
me.SearchObjectsToAdd();
}
else
{
} else {
$('#count_'+me.id).change(function () {
let c = this.value;
me.UpdateButtons(c);

View File

@@ -105,7 +105,7 @@ if ($oFilter != null)
$aExtraParams['action'] = utils::GetAbsoluteUrlAppRoot().'pages/UniversalSearch.php';
$aExtraParams['table_id'] = '1';
$aExtraParams['search_header_force_dropdown'] = $sSearchHeaderForceDropdown;
//$aExtraParams['class'] = $sClassName;
$aExtraParams['submit_on_load'] = false;
$oBlock->Display($oP, 0, $aExtraParams);
// Search results

View File

@@ -109,6 +109,7 @@ try
$aExtraParams['action'] = utils::GetAbsoluteUrlAppRoot().'pages/tagadmin.php';
$aExtraParams['table_id'] = '1';
$aExtraParams['search_header_force_dropdown'] = $sSearchHeaderForceDropdown;
$aExtraParams['submit_on_load'] = false;
$oBlock->Display($oP, 0, $aExtraParams);
// Search results