mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 00:34:46 +02:00
Fix ordenation with subservices
This commit is contained in:
parent
df30df4637
commit
0860b6e647
@ -1058,7 +1058,6 @@ var TreeController = {
|
|||||||
$node.addClass("children-loaded");
|
$node.addClass("children-loaded");
|
||||||
},
|
},
|
||||||
success: function(data, textStatus, xhr) {
|
success: function(data, textStatus, xhr) {
|
||||||
console.log(data);
|
|
||||||
if (data.success) {
|
if (data.success) {
|
||||||
var $group = $node.children("ul.tree-group");
|
var $group = $node.children("ul.tree-group");
|
||||||
if (
|
if (
|
||||||
@ -1078,8 +1077,8 @@ var TreeController = {
|
|||||||
var rawTree = Object.values(data.tree);
|
var rawTree = Object.values(data.tree);
|
||||||
// Sorting tree by description (services.treeview_services.php).
|
// Sorting tree by description (services.treeview_services.php).
|
||||||
rawTree.sort(function(a, b) {
|
rawTree.sort(function(a, b) {
|
||||||
var x = a.description.toLowerCase();
|
var x = a.elementDescription.toLowerCase();
|
||||||
var y = b.description.toLowerCase();
|
var y = b.elementDescription.toLowerCase();
|
||||||
if (x < y) {
|
if (x < y) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -1128,7 +1127,7 @@ var TreeController = {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//console.log($node);
|
|
||||||
return $node;
|
return $node;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user