summaryrefslogtreecommitdiffstats
path: root/js/controller
diff options
context:
space:
mode:
Diffstat (limited to 'js/controller')
-rw-r--r--js/controller/AppController.js3
-rw-r--r--js/controller/ContentController.js15
-rw-r--r--js/controller/ExploreController.js2
-rw-r--r--js/controller/NavigationController.js8
4 files changed, 25 insertions, 3 deletions
diff --git a/js/controller/AppController.js b/js/controller/AppController.js
index 184cf6fc5..31a288540 100644
--- a/js/controller/AppController.js
+++ b/js/controller/AppController.js
@@ -17,4 +17,7 @@ function (Loading, FeedResource, FolderResource) {
return FeedResource.size() === 0 && FolderResource.size() === 0;
};
+ this.play = function (item) {
+ this.playingItem = item;
+ };
}); \ No newline at end of file
diff --git a/js/controller/ContentController.js b/js/controller/ContentController.js
index c5af2c6a5..dfee837d5 100644
--- a/js/controller/ContentController.js
+++ b/js/controller/ContentController.js
@@ -9,7 +9,7 @@
*/
app.controller('ContentController',
function (Publisher, FeedResource, ItemResource, SettingsResource, data,
- $route, $routeParams, FEED_TYPE, ITEM_AUTO_PAGE_SIZE, Loading) {
+ $route, $routeParams, $location, FEED_TYPE, ITEM_AUTO_PAGE_SIZE, Loading) {
'use strict';
ItemResource.clear();
@@ -152,10 +152,11 @@ function (Publisher, FeedResource, ItemResource, SettingsResource, data,
var oldestFirst = getOrdering();
var showAll = SettingsResource.get('showAll');
var self = this;
+ var search = $location.search().search;
Loading.setLoading('autopaging', true);
- ItemResource.autoPage(type, id, oldestFirst, showAll)
+ ItemResource.autoPage(type, id, oldestFirst, showAll, search)
.success(function (data) {
Publisher.publishAll(data);
@@ -190,4 +191,14 @@ function (Publisher, FeedResource, ItemResource, SettingsResource, data,
$route.reload();
};
+ this.getMediaType = function (type) {
+ if (type && type.indexOf('audio') === 0) {
+ return 'audio';
+ } else if (type && type.indexOf('video') === 0) {
+ return 'video';
+ } else {
+ return undefined;
+ }
+ };
+
}); \ No newline at end of file
diff --git a/js/controller/ExploreController.js b/js/controller/ExploreController.js
index f385d277a..4bc3a6d3e 100644
--- a/js/controller/ExploreController.js
+++ b/js/controller/ExploreController.js
@@ -13,7 +13,7 @@ app.controller('ExploreController', function (sites, $rootScope, FeedResource) {
this.sites = sites;
this.feedExists = function (location) {
- return FeedResource.getByLocation(location) !== undefined;
+ return FeedResource.getByLocation(location) !== undefined;
};
this.subscribeTo = function (location) {
diff --git a/js/controller/NavigationController.js b/js/controller/NavigationController.js
index af2e3ac76..3821be6c0 100644
--- a/js/controller/NavigationController.js
+++ b/js/controller/NavigationController.js
@@ -286,6 +286,14 @@ function ($route, FEED_TYPE, FeedResource, FolderResource, ItemResource,
$route.reload();
};
+ this.search = function (value) {
+ if (value === '') {
+ $location.search('search', null);
+ } else {
+ $location.search('search', value);
+ }
+ };
+
var self = this;
$rootScope.$on('moveFeedToFolder', function (scope, data) {