]> git.wh0rd.org - tt-rss.git/blobdiff - functions.js
use better magic quotes removal fix
[tt-rss.git] / functions.js
index 6ca221acef714163cc27d94da1950f2dd91e1133..7901c00f32ccdc256f2359b381e0aee592ea22a1 100644 (file)
@@ -867,7 +867,7 @@ function selectTableRowsByIdPrefix(content_id, prefix, check_prefix, do_select,
        var content = $(content_id);
 
        if (!content) {
-               alert("[selectTableRows] Element " + content_id + " not found.");
+               debug("[selectTableRows] Element " + content_id + " not found.");
                return;
        }
 
@@ -915,8 +915,8 @@ function getSelectedTableRowIds(content_id, prefix) {
        var content = $(content_id);
 
        if (!content) {
-               alert("[getSelectedTableRowIds] Element " + content_id + " not found.");
-               return;
+               debug("[getSelectedTableRowIds] Element " + content_id + " not found.");
+               return new Array();
        }
 
        var sel_rows = new Array();
@@ -2147,3 +2147,42 @@ function addLabel() {
        }
 }
 
+function quickAddFeed() {
+       displayDlg('quickAddFeed', '',
+          function () {$('feed_url').focus();});
+}
+
+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;
+}
+
+
+