summaryrefslogtreecommitdiffstats
path: root/js/build/app.js
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-11-21 12:49:26 +0100
committerBernhard Posselt <dev@bernhard-posselt.com>2014-11-21 12:57:03 +0100
commit6d3e829821707095269590f8a880f88d1cf8c980 (patch)
tree4f49c314b4602faed9909daf6e904da64cdd2479 /js/build/app.js
parent1ef00530bd5eab6688b297197b775d3d6289fa6f (diff)
hide categories without elements
Diffstat (limited to 'js/build/app.js')
-rw-r--r--js/build/app.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/js/build/app.js b/js/build/app.js
index ae6075da6..7a12eb56c 100644
--- a/js/build/app.js
+++ b/js/build/app.js
@@ -467,6 +467,12 @@ app.controller('ExploreController', ["sites", "$rootScope", "FeedResource", func
$rootScope.$broadcast('addFeed', url);
};
+ this.isCategoryShown = function (data) {
+ return data.filter(function (element) {
+ return FeedResource.get(element.url) === undefined;
+ }).length > 0;
+ };
+
}]);
app.controller('NavigationController',
["$route", "FEED_TYPE", "FeedResource", "FolderResource", "ItemResource", "SettingsResource", "Publisher", "$rootScope", "$location", "$q", function ($route, FEED_TYPE, FeedResource, FolderResource, ItemResource,