diff options
author | Bernhard Posselt <Raydiation@users.noreply.github.com> | 2013-12-19 04:32:34 -0800 |
---|---|---|
committer | Bernhard Posselt <Raydiation@users.noreply.github.com> | 2013-12-19 04:32:34 -0800 |
commit | 43f86e58d2976d4c56f1921b272380b66758ae67 (patch) | |
tree | 7ec302037c8f436635387ce145b0436bfb29dd32 /js/public/app.js | |
parent | 98d3328c5ea97b91faa184206799f4e7e7ccfd57 (diff) | |
parent | fd6137741f6331da70432e063a576a63f5588466 (diff) |
Merge pull request #411 from sub/issue242
Make feed title editable (FIX #242)
Diffstat (limited to 'js/public/app.js')
-rw-r--r-- | js/public/app.js | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/js/public/app.js b/js/public/app.js index db3ccd5c7..30a8a6506 100644 --- a/js/public/app.js +++ b/js/public/app.js @@ -813,6 +813,18 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. this._autoPaging = true; this._$scope.itemBusinessLayer = this._itemBusinessLayer; this._$scope.feedBusinessLayer = this._feedBusinessLayer; + this._$scope.edit = function(feedId) { + var feed; + feed = _this._feedModel.getById(feedId); + feed.editing = true; + return feed.originalValue = feed.title; + }; + this._$scope.cancel = function(feedId) { + var feed; + feed = _this._feedModel.getById(feedId); + feed.editing = false; + return feed.title = feed.originalValue; + }; this._$scope.isLoading = function() { return _this._feedLoading.isLoading(); }; @@ -1113,6 +1125,15 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. return this._persistence.deleteFeed(feedId); }; + FeedBusinessLayer.prototype.renameFeed = function(feedId, feedTitle) { + var feed; + feed = this._feedModel.getById(feedId); + feed.editing = false; + if (angular.isDefined(feed) && feedTitle !== "") { + return this._persistence.renameFeed(feedId, feedTitle); + } + }; + FeedBusinessLayer.prototype.markRead = function(feedId) { var feed, item, newestItemId, _i, _len, _ref; feed = this._feedModel.getById(feedId); @@ -2900,6 +2921,23 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. return this._request.post('news_feeds_move', params); }; + Persistence.prototype.renameFeed = function(feedId, feedTitle) { + /* + rename a feed + */ + + var params; + params = { + routeParams: { + feedId: feedId + }, + data: { + feedTitle: feedTitle + } + }; + return this._request.post('news_feeds_rename', params); + }; + Persistence.prototype.setFeedRead = function(feedId, highestItemId) { /* sets all items of a feed as read |