diff options
Diffstat (limited to 'js/controller/NavigationController.js')
-rw-r--r-- | js/controller/NavigationController.js | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/js/controller/NavigationController.js b/js/controller/NavigationController.js index 4b1cd8616..ba09f630a 100644 --- a/js/controller/NavigationController.js +++ b/js/controller/NavigationController.js @@ -9,7 +9,7 @@ */ app.controller('NavigationController', function ($route, FEED_TYPE, FeedResource, FolderResource, ItemResource, - SettingsResource, Publisher, $rootScope) { + SettingsResource, Publisher, $rootScope, $location) { 'use strict'; this.feedError = ''; @@ -126,6 +126,7 @@ function ($route, FEED_TYPE, FeedResource, FolderResource, ItemResource, FeedResource.create(feed.url, feed.folderId, undefined) .then(function (data) { Publisher.publishAll(data); + $location.path('/items/feeds/' + data.id); }); } else { // create folder first and then the feed @@ -153,7 +154,19 @@ function ($route, FEED_TYPE, FeedResource, FolderResource, ItemResource, }; this.moveFeed = function (feedId, folderId) { + var reload = false; + var feed = FeedResource.getById(feedId); + + if (this.isFolderActive(feed.folderId) || + this.isFolderActive(folderId)) { + reload = true; + } + FeedResource.move(feedId, folderId); + + if (reload) { + $route.reload(); + } }; // TBD |