aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2017-09-11 22:17:21 +0200
committerGitHub <noreply@github.com>2017-09-11 22:17:21 +0200
commit038ae39f13ff3ff775953010eac6b78ff241ee78 (patch)
tree1af0310ca5662799aab71534098bac3d3f38e560
parent88731848c609a454aa90a533e7361bca5f4e66b8 (diff)
parentd5cfb38449e94e48f572003a9f19dd47cd57aeaa (diff)
downloadnextcloud-server-038ae39f13ff3ff775953010eac6b78ff241ee78.tar.gz
nextcloud-server-038ae39f13ff3ff775953010eac6b78ff241ee78.zip
Merge pull request #6439 from nextcloud/fix-5960-sort-apps-ignore-level
Sort apps by enabled/disabled but not by official/in-appstore in App Management
-rw-r--r--settings/js/apps.js6
-rw-r--r--settings/tests/js/appsSpec.js4
2 files changed, 3 insertions, 7 deletions
diff --git a/settings/js/apps.js b/settings/js/apps.js
index 278c307b1f3..258b0f4adcc 100644
--- a/settings/js/apps.js
+++ b/settings/js/apps.js
@@ -114,11 +114,7 @@ OC.Settings.Apps = OC.Settings.Apps || {
if (a.active !== b.active) {
return (a.active ? -1 : 1)
} else {
- var levelDiff = b.level - a.level;
- if (levelDiff === 0) {
- return OC.Util.naturalSortCompare(a.name, b.name);
- }
- return levelDiff;
+ return OC.Util.naturalSortCompare(a.name, b.name);
}
});
}
diff --git a/settings/tests/js/appsSpec.js b/settings/tests/js/appsSpec.js
index 4b917b425c1..bc4681e2b8d 100644
--- a/settings/tests/js/appsSpec.js
+++ b/settings/tests/js/appsSpec.js
@@ -172,7 +172,7 @@ describe('OC.Settings.Apps tests', function() {
return results;
}
- it('sorts all applications using the level', function() {
+ it('does not sort applications using the level', function() {
Apps.loadCategory('TestId');
suite.server.requests[0].respond(
@@ -223,7 +223,7 @@ describe('OC.Settings.Apps tests', function() {
var results = getResultsFromDom();
expect(results.length).toEqual(5);
- expect(results).toEqual(['alpha', 'delta', 'zork', 'foo', 'nolevel']);
+ expect(results).toEqual(['alpha', 'foo', 'delta', 'nolevel', 'zork']);
expect(OC.Settings.Apps.State.apps).toEqual({
'foo': {
id: 'foo',