summaryrefslogtreecommitdiff
path: root/functions.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2011-04-02 14:39:46 +0400
committerAndrew Dolgov <[email protected]>2011-04-02 14:39:46 +0400
commit5de271146be39d7a1d495688b66076b50923a4e7 (patch)
tree9523b92320fb6e25ef27bb26060391aeceb9793b /functions.js
parent7b8931889b89a6a65e019225c913ca34d0194b0e (diff)
add feed editor button to reset pubsub subscription state
Diffstat (limited to 'functions.js')
-rw-r--r--functions.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/functions.js b/functions.js
index 9352984be..b4c085a09 100644
--- a/functions.js
+++ b/functions.js
@@ -1015,6 +1015,27 @@ function quickAddFilter() {
}
}
+function resetPubSub(feed_id, title) {
+
+ var msg = __("Reset subscription? Tiny Tiny RSS will try to subscribe to the notification hub again on next feed update.").replace("%s", title);
+
+ if (title == undefined || confirm(msg)) {
+ notify_progress("Loading, please wait...");
+
+ var query = "?op=pref-feeds&quiet=1&subop=resetPubSub&ids=" + feed_id;
+
+ new Ajax.Request("backend.php", {
+ parameters: query,
+ onComplete: function(transport) {
+ dijit.byId("pubsubReset_Btn").attr('disabled', true);
+ notify_info("Subscription reset.");
+ } });
+ }
+
+ return false;
+}
+
+
function unsubscribeFeed(feed_id, title) {
var msg = __("Unsubscribe from %s?").replace("%s", title);