summaryrefslogtreecommitdiffstats
path: root/js/build/app.js
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-09-12 22:05:17 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2014-09-12 22:05:17 +0200
commitf7feeecf398fc9a7ba62596f784bf9ec28677940 (patch)
tree1fe6e883e45869e858fc12e46e5049e67c0f8cc5 /js/build/app.js
parent2343a847953eaab6e487bcd4dad18e3731966742 (diff)
rename feed
Diffstat (limited to 'js/build/app.js')
-rw-r--r--js/build/app.js13
1 files changed, 5 insertions, 8 deletions
diff --git a/js/build/app.js b/js/build/app.js
index 50c712e16..9c1eed55d 100644
--- a/js/build/app.js
+++ b/js/build/app.js
@@ -529,16 +529,16 @@ app.controller('NavigationController',
}
};
- // TBD
this.renameFeed = function (feed) {
+ FeedResource.rename(feed.id, feed.title);
feed.editing = false;
- // todo remote stuff
};
this.renameFolder = function (folder) {
console.log(folder);
};
+ // TBD
this.deleteFeed = function (feed) {
feed.deleted = true;
// todo remote stuff
@@ -770,15 +770,12 @@ app.factory('FeedResource', ["Resource", "$http", "BASE_URL", "$q", function (Re
};
- FeedResource.prototype.rename = function (url, name) {
- var feed = this.get(url);
- feed.title = name;
-
+ FeedResource.prototype.rename = function (id, title) {
return this.http({
method: 'POST',
- url: this.BASE_URL + '/feeds/' + feed.id + '/rename',
+ url: this.BASE_URL + '/feeds/' + id + '/rename',
data: {
- feedTitle: name
+ feedTitle: title
}
});
};