aboutsummaryrefslogtreecommitdiffstats
path: root/settings/js
diff options
context:
space:
mode:
authorFelix A. Epp <work@felixepp.de>2017-01-21 17:10:08 +0100
committerJan-Christoph Borchardt <hey@jancborchardt.net>2017-04-25 00:22:01 +0200
commit89ac71355df63bbad814d05999cc44d98d75fadf (patch)
tree7a21e5bc75de41d4c00ecadac4774e2dc2946342 /settings/js
parent91a4676fc0034f63bacc36ea2591599b373e5447 (diff)
downloadnextcloud-server-89ac71355df63bbad814d05999cc44d98d75fadf.tar.gz
nextcloud-server-89ac71355df63bbad814d05999cc44d98d75fadf.zip
Add apps category 'all installed'
Signed-off-by: Felix A. Epp <work@felixepp.de>
Diffstat (limited to 'settings/js')
-rw-r--r--settings/js/apps.js17
1 files changed, 11 insertions, 6 deletions
diff --git a/settings/js/apps.js b/settings/js/apps.js
index 3d94a128d3f..bde069e1b27 100644
--- a/settings/js/apps.js
+++ b/settings/js/apps.js
@@ -41,7 +41,8 @@ OC.Settings.Apps = OC.Settings.Apps || {
var categories = [
{displayName: t('settings', 'Enabled'), ident: 'enabled', id: '0'},
- {displayName: t('settings', 'Not enabled'), ident: 'disabled', id: '1'}
+ {displayName: t('settings', 'Not enabled'), ident: 'disabled', id: '1'},
+ {displayName: t('settings', 'All installed'), ident: 'installed', id: '2'}
];
var source = $("#categories-template").html();
@@ -95,7 +96,7 @@ OC.Settings.Apps = OC.Settings.Apps || {
return _.extend({level: 0}, app);
});
var source
- if (categoryId === 'enabled' || categoryId === 'disabled') {
+ if (categoryId === 'enabled' || categoryId === 'disabled' || categoryId === 'installed') {
source = $("#app-template-installed").html();
$('#apps-list').addClass('installed');
} else {
@@ -106,11 +107,15 @@ OC.Settings.Apps = OC.Settings.Apps || {
if (appList.length) {
appList.sort(function(a,b) {
- var levelDiff = b.level - a.level;
- if (levelDiff === 0) {
- return OC.Util.naturalSortCompare(a.name, b.name);
+ 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 levelDiff;
});
var firstExperimental = false;