]> git.wh0rd.org Git - tt-rss.git/commitdiff
fix unsubscribeFeed behaving improperly in preferences
authorAndrew Dolgov <fox@bah.org.ru>
Mon, 15 Feb 2010 12:16:53 +0000 (15:16 +0300)
committerAndrew Dolgov <fox@bah.org.ru>
Mon, 15 Feb 2010 12:16:53 +0000 (15:16 +0300)
functions.js
prefs.js
tt-rss.js

index 3baaffa3aededdf32c762ef6039db8ba237f9196..ff35961e86e76cef96b158dec850170d81af5260 100644 (file)
@@ -2156,3 +2156,33 @@ function quickAddFilter() {
        displayDlg('quickAddFilter', '',
           function () {document.forms['filter_add_form'].reg_exp.focus();});
 }
+
+function unsubscribeFeed(feed_id, title) {
+
+       var msg = __("Unsubscribe from %s?").replace("%s", title);
+
+       if (title == undefined || confirm(msg)) {
+               notify_progress("Removing feed...");
+
+               var query = "?op=pref-feeds&quiet=1&subop=remove&ids=" + feed_id;
+
+               new Ajax.Request("backend.php", {
+                       parameters: query,
+                       onComplete: function(transport) {
+
+                                       closeInfoBox();
+
+                                       if (inPreferences()) {
+                                               updateFeedList();                               
+                                       } else {
+                                               dlg_frefresh_callback(transport, feed_id);
+                                       }
+
+                               } });
+       }
+
+       return false;
+}
+
+
+
index 3212d0066ceb161b08681164101ad23b25740593..ee53cf27aff5879a562621b97ccb694ee14d97ce 100644 (file)
--- a/prefs.js
+++ b/prefs.js
@@ -1845,7 +1845,7 @@ function removeFilter(id, title) {
        return false;
 }
 
-function unsubscribeFeed(id, title) {
+/*function unsubscribeFeed(id, title) {
 
        try {
 
@@ -1874,7 +1874,7 @@ function unsubscribeFeed(id, title) {
 
        return false;
 
-}
+} */
 
 function feedsEditSave() {
        try {
index 233de669a7a4dc3fe44bd56551735b8afa75fa1f..85f335b28ce8492cc8541929eba2dc6ded11b466 100644 (file)
--- a/tt-rss.js
+++ b/tt-rss.js
@@ -626,27 +626,6 @@ function quickMenuGo(opid) {
        }
 }
 
-function unsubscribeFeed(feed_id, title) {
-
-
-       var msg = __("Unsubscribe from %s?").replace("%s", title);
-
-       if (title == undefined || confirm(msg)) {
-               notify_progress("Removing feed...");
-
-               var query = "?op=pref-feeds&quiet=1&subop=remove&ids=" + feed_id;
-
-               new Ajax.Request("backend.php", {
-                       parameters: query,
-                       onComplete: function(transport) {
-                                       dlg_frefresh_callback(transport, feed_id);
-                               } });
-       }
-
-       return false;
-}
-
-
 function updateFeedTitle(t) {
        active_title_text = t;
        updateTitle();