mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
[enh] sort services by names
This commit is contained in:
parent
3b3509392e
commit
39e166c8fb
1 changed files with 11 additions and 0 deletions
|
@ -24,6 +24,17 @@
|
|||
v.loaded = y18n.t(v.loaded);
|
||||
data2.services.push(v);
|
||||
});
|
||||
|
||||
data2.services.sort(function (a, b) {
|
||||
if (a.name > b.name) {
|
||||
return 1;
|
||||
}
|
||||
else if (a.name < b.name) {
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
});
|
||||
|
||||
c.view('service/service_list', data2);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue