diff options
author | Davide Saurino <davide.saurino@alcacoop.it> | 2013-11-12 10:46:31 +0100 |
---|---|---|
committer | Davide Saurino <davide.saurino@alcacoop.it> | 2013-11-12 10:46:31 +0100 |
commit | be253cdc1ba255cecb0dba910e1fc7b08b7707eb (patch) | |
tree | 303460a33d239874c341e02f89584c0ace9e2462 /js/app/services | |
parent | d6fdba30fba1e7f905be23478831a091b71ddbde (diff) |
Make feed title editable (FIX #242)
Diffstat (limited to 'js/app/services')
-rw-r--r-- | js/app/services/businesslayer/feedbusinesslayer.coffee | 8 | ||||
-rw-r--r-- | js/app/services/persistence.coffee | 13 |
2 files changed, 21 insertions, 0 deletions
diff --git a/js/app/services/businesslayer/feedbusinesslayer.coffee b/js/app/services/businesslayer/feedbusinesslayer.coffee index fd92209ab..4905014eb 100644 --- a/js/app/services/businesslayer/feedbusinesslayer.coffee +++ b/js/app/services/businesslayer/feedbusinesslayer.coffee @@ -66,6 +66,14 @@ FeedModel, NewLoading, _ExistsError, Utils, $rootScope, NewestItem)-> @_persistence.deleteFeed(feedId) + renameFeed: (feedId, feedTitle) -> + feed = @_feedModel.getById(feedId) + feed.editing = false + + if angular.isDefined(feed) and feedTitle !== "" + @_persistence.renameFeed(feedId, feedTitle) + + markRead: (feedId) -> feed = @_feedModel.getById(feedId) newestItemId = @_newestItem.getId() diff --git a/js/app/services/persistence.coffee b/js/app/services/persistence.coffee index d51c7acb1..bfca4ccaa 100644 --- a/js/app/services/persistence.coffee +++ b/js/app/services/persistence.coffee @@ -243,6 +243,19 @@ $rootScope, $q) -> @_request.post 'news_feeds_move', params + renameFeed: (feedId, feedTitle) -> + ### + rename a feed + ### + params = + routeParams: + feedId: feedId + data: + feedTitle: feedTitle + + @_request.post 'news_feeds_rename', params + + setFeedRead: (feedId, highestItemId) -> ### sets all items of a feed as read |