diff options
author | Adam Mathes <adam@trenchant.org> | 2018-04-22 18:43:49 -0700 |
---|---|---|
committer | Adam Mathes <adam@trenchant.org> | 2018-04-22 18:43:49 -0700 |
commit | 0a6d8c78730f1da263a855d1f17c0ff92ac1070a (patch) | |
tree | 5b55c350f99f499c74d2379d33576763f688d994 /static/ui.js | |
parent | b376d197b51f2e67c314e23b8ac484dc2ae8f4a5 (diff) | |
download | neko-0a6d8c78730f1da263a855d1f17c0ff92ac1070a.tar.gz neko-0a6d8c78730f1da263a855d1f17c0ff92ac1070a.tar.bz2 neko-0a6d8c78730f1da263a855d1f17c0ff92ac1070a.zip |
wip category stuff
Diffstat (limited to 'static/ui.js')
-rw-r--r-- | static/ui.js | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/static/ui.js b/static/ui.js index 49f6ad0..6dcb6ab 100644 --- a/static/ui.js +++ b/static/ui.js @@ -465,6 +465,7 @@ var FeedView = Backbone.View.extend({ events: { "click .txt": "filterTo", "click .delete": "del", + "click .edit": "edit", }, initialize: function() { _.bindAll(this, 'render', 'filterTo', "del"); @@ -480,8 +481,15 @@ var FeedView = Backbone.View.extend({ App.filterToFeed(this.model); }, del: function() { - this.model.destroy(); - this.$el.remove(); + if( window.confirm("Unsubscribe from " + this.model.get("url") + "?" ) ) { + this.model.destroy(); + this.$el.remove(); + } + }, + edit: function() { + var cat = window.prompt("Category for this feed?", this.model.get("category")); + this.model.set("category", cat); + this.model.save(); }, }); |