From 421056e959e1ef7d376b58d0d49ee5e514212dd7 Mon Sep 17 00:00:00 2001 From: alejandro-campos Date: Mon, 16 Mar 2020 14:07:54 +0100 Subject: [PATCH] Sort modules alphabetically in module select --- pandora_console/include/functions_ui.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index b503abca63..273fa3b7aa 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -4815,6 +4815,12 @@ function ui_print_agent_autocomplete_input($parameters) url: action="'.$javascript_ajax_page.'", dataType: "json", success: function (data) { + data.sort(function(a, b) { + var textA = a.nombre.toUpperCase(); + var textB = b.nombre.toUpperCase(); + return (textA < textB) ? -1 : (textA > textB) ? 1 : 0; + }); + if ('.((int) $add_none_module).') { $("#'.$selectbox_id.'") .append($("")