summaryrefslogtreecommitdiffstats
path: root/js/build/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/build/app.js')
-rw-r--r--js/build/app.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/js/build/app.js b/js/build/app.js
index cef96d193..7a12eb56c 100644
--- a/js/build/app.js
+++ b/js/build/app.js
@@ -454,15 +454,25 @@ app.controller('ContentController',
};
}]);
-app.controller('ExploreController', ["sites", "$rootScope", function (sites, $rootScope) {
+app.controller('ExploreController', ["sites", "$rootScope", "FeedResource", function (sites, $rootScope, FeedResource) {
'use strict';
this.sites = sites;
+ this.feedExists = function (url) {
+ return FeedResource.get(url) !== undefined;
+ };
+
this.subscribeTo = function (url) {
$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,