summaryrefslogtreecommitdiffstats
path: root/js/public/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/public/app.js')
-rw-r--r--js/public/app.js38
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