mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-27 07:44:35 +02:00
Sort modules alphabetically in module select
This commit is contained in:
parent
2977766cc7
commit
421056e959
@ -4815,6 +4815,12 @@ function ui_print_agent_autocomplete_input($parameters)
|
|||||||
url: action="'.$javascript_ajax_page.'",
|
url: action="'.$javascript_ajax_page.'",
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function (data) {
|
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).') {
|
if ('.((int) $add_none_module).') {
|
||||||
$("#'.$selectbox_id.'")
|
$("#'.$selectbox_id.'")
|
||||||
.append($("<option></option>")
|
.append($("<option></option>")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user