diff --git a/src/main/java/com/commafeed/backend/services/FeedSubscriptionService.java b/src/main/java/com/commafeed/backend/services/FeedSubscriptionService.java index 4f542395..da5e2b04 100644 --- a/src/main/java/com/commafeed/backend/services/FeedSubscriptionService.java +++ b/src/main/java/com/commafeed/backend/services/FeedSubscriptionService.java @@ -72,6 +72,7 @@ public class FeedSubscriptionService { newSubscription = true; } sub.setCategory(category); + sub.setPosition(0); sub.setTitle(FeedUtils.truncate(title, 128)); feedSubscriptionDAO.saveOrUpdate(sub); diff --git a/src/main/java/com/commafeed/frontend/rest/resources/CategoryREST.java b/src/main/java/com/commafeed/frontend/rest/resources/CategoryREST.java index 625d0c3a..03645588 100644 --- a/src/main/java/com/commafeed/frontend/rest/resources/CategoryREST.java +++ b/src/main/java/com/commafeed/frontend/rest/resources/CategoryREST.java @@ -201,6 +201,7 @@ public class CategoryREST extends AbstractResourceREST { FeedCategory cat = new FeedCategory(); cat.setName(req.getName()); cat.setUser(getUser()); + cat.setPosition(0); String parentId = req.getParentId(); if (parentId != null && !ALL.equals(parentId)) { FeedCategory parent = new FeedCategory(); diff --git a/src/main/resources/i18n/en.properties b/src/main/resources/i18n/en.properties index d5a819e9..e07bf3e5 100644 --- a/src/main/resources/i18n/en.properties +++ b/src/main/resources/i18n/en.properties @@ -68,6 +68,7 @@ details.feed_details=Feed details details.url=URL details.name=Name details.category=Category +details.position=Position details.last_refresh=Last refresh details.next_refresh=Next refresh details.queued_for_refresh=Queued for refresh diff --git a/src/main/webapp/js/controllers.js b/src/main/webapp/js/controllers.js index 9d16eacc..fc5e7b58 100644 --- a/src/main/webapp/js/controllers.js +++ b/src/main/webapp/js/controllers.js @@ -337,6 +337,7 @@ module.controller('FeedDetailsCtrl', ['$scope', '$state', '$stateParams', 'FeedS FeedService.modify({ id : sub.id, name : sub.name, + position: sub.position, categoryId : sub.categoryId }, function() { CategoryService.init(); @@ -427,6 +428,7 @@ module.controller('CategoryDetailsCtrl', ['$scope', '$state', '$stateParams', 'F CategoryService.modify({ id : cat.id, name : cat.name, + position: cat.position, parentId : cat.parentId }, function() { CategoryService.init(); diff --git a/src/main/webapp/templates/feeds.category_details.html b/src/main/webapp/templates/feeds.category_details.html index 6b1e0bf3..b5df6136 100644 --- a/src/main/webapp/templates/feeds.category_details.html +++ b/src/main/webapp/templates/feeds.category_details.html @@ -20,6 +20,13 @@ ${global.required} + +
+ +
+ +
+
diff --git a/src/main/webapp/templates/feeds.feed_details.html b/src/main/webapp/templates/feeds.feed_details.html index 66da2451..ca3ac81e 100644 --- a/src/main/webapp/templates/feeds.feed_details.html +++ b/src/main/webapp/templates/feeds.feed_details.html @@ -27,6 +27,13 @@
+
+ +
+ +
+
+