From 89238f05eaf1ee86ac45f8feeafa16ae374fc0be Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 13 Oct 2022 18:32:40 +0200 Subject: [PATCH] Add log --- htdocs/core/lib/ajax.lib.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/ajax.lib.php b/htdocs/core/lib/ajax.lib.php index b6ec08da434..850ccd34c1c 100644 --- a/htdocs/core/lib/ajax.lib.php +++ b/htdocs/core/lib/ajax.lib.php @@ -193,6 +193,8 @@ function ajax_autocompleter($selected, $htmlname, $url, $urloption = '', $minLen $script .= ' $("#'.$htmlnamejquery.'").val(ui.item.id).trigger("change"); // Select new value + // Complementary actions + // Disable an element if (options.option_disabled) { console.log("Make action option_disabled on #"+options.option_disabled+" with disabled="+ui.item.disabled) @@ -224,7 +226,7 @@ function ajax_autocompleter($selected, $htmlname, $url, $urloption = '', $minLen // Update an input if (ui.item.update) { - console.log("Make action update on each ui.item.update") + console.log("Make action update on each ui.item.update (if there is)") // loop on each "update" fields $.each(ui.item.update, function(key, value) { console.log("Set value "+value+" into #"+key); @@ -232,7 +234,7 @@ function ajax_autocompleter($selected, $htmlname, $url, $urloption = '', $minLen }); } if (ui.item.textarea) { - console.log("Make action textarea on each ui.item.textarea") + console.log("Make action textarea on each ui.item.textarea (if there is)") $.each(ui.item.textarea, function(key, value) { if (typeof CKEDITOR == "object" && typeof CKEDITOR.instances != "undefined" && CKEDITOR.instances[key] != "undefined") { CKEDITOR.instances[key].setData(value);