From 2a637c8378f8896f00e307ecf0614957afe95b64 Mon Sep 17 00:00:00 2001 From: Guillaume Heurtier <guillaume.heurtier@maarch.org> Date: Mon, 9 Dec 2019 17:42:29 +0100 Subject: [PATCH] FEAT #12510 TIME 0:15fixed search on contacts --- apps/maarch_entreprise/indexing_searching/search_adv.php | 9 --------- .../indexing_searching/search_adv_result.php | 8 +------- apps/maarch_entreprise/js/indexing.js | 6 +----- 3 files changed, 2 insertions(+), 21 deletions(-) diff --git a/apps/maarch_entreprise/indexing_searching/search_adv.php b/apps/maarch_entreprise/indexing_searching/search_adv.php index 5fc3dacb3a9..8d6c132af24 100755 --- a/apps/maarch_entreprise/indexing_searching/search_adv.php +++ b/apps/maarch_entreprise/indexing_searching/search_adv.php @@ -364,15 +364,6 @@ $param['signatory_group'] = $arr_tmp2; $arr_tmp2 = array('label' => _VISA_USER_SEARCH_MIN, 'type' => 'input_text', 'param' => array('field_label' => _VISA_USER_SEARCH_MIN, 'other' => $size, 'autocompletion' => true)); $param['visa_user'] = $arr_tmp2; -//contact_type -//$stmt = $conn->query('SELECT id, label FROM contact_types order by label asc', array()); -//$arr_tmp = array(); -//while ($res = $stmt->fetchObject()) { -// array_push($arr_tmp, array('VALUE' => $res->id, 'LABEL' => functions::show_string($res->label))); -//} -//$arr_tmp2 = array('label' => _CONTACT_TYPE, 'type' => 'select_simple', 'param' => array('field_label' => _CONTACT_TYPE, 'label_title' => _CONTACT_TYPE, 'id' => 'contact_type', 'options' => $arr_tmp)); -//$param['contact_type'] = $arr_tmp2; - // Sorts the param array function cmp($a, $b) { diff --git a/apps/maarch_entreprise/indexing_searching/search_adv_result.php b/apps/maarch_entreprise/indexing_searching/search_adv_result.php index b9848c52f4d..cc0dcb932e7 100755 --- a/apps/maarch_entreprise/indexing_searching/search_adv_result.php +++ b/apps/maarch_entreprise/indexing_searching/search_adv_result.php @@ -220,13 +220,7 @@ if (count($_REQUEST['meta']) > 0) { $where_request .= " res_id in(select identifier from ".$_SESSION['tablename']['not_notes']." where lower(note_text) LIKE lower(:noteText)) and "; $arrayPDO = array_merge($arrayPDO, array(":noteText" => "%".$s_doc_notes."%")); } - // CONTACT TYPE -// elseif ($tab_id_fields[$j] == 'contact_type' && !empty($_REQUEST['contact_type'])) { -// $json_txt .= " 'contact_type' : ['".addslashes(trim($_REQUEST['contact_type']))."'],"; -// $where_request .= " (res_id in (select res_id from contacts_res where contact_id in(select cast (contact_id as varchar) from view_contacts where contact_type = :contactType)) or "; -// $where_request .= " (contact_id in(select contact_id from view_contacts where contact_type = :contactType))) and "; -// $arrayPDO = array_merge($arrayPDO, array(":contactType" => $_REQUEST['contact_type'])); -// } + // Folder elseif ($tab_id_fields[$j] == 'folder' && !empty($_REQUEST['folder'])) { $json_txt .= " 'folder' : ['".addslashes(trim($_REQUEST['folder']))."'],"; $folder = $func->wash($_REQUEST['folder'], "no", _MARKET, "no"); diff --git a/apps/maarch_entreprise/js/indexing.js b/apps/maarch_entreprise/js/indexing.js index 2f18a50a353..a58fc7d8008 100755 --- a/apps/maarch_entreprise/js/indexing.js +++ b/apps/maarch_entreprise/js/indexing.js @@ -74,11 +74,7 @@ function initSenderRecipientAutocomplete(inputId, mode, alternateVersion, cardId }, callback: { onClickAfter: function (node, li, item) { - if (item.type == "entity") { - $j("#" + inputId + "_id").val(item.serialId); - } else { - $j("#" + inputId + "_id").val(item.id); - } + $j("#" + inputId + "_id").val(item.id); $j("#" + inputId + "_type").val(item.type); if (!alternateVersion) { -- GitLab