]> git.wh0rd.org - tt-rss.git/blobdiff - js/functions.js
prevent absolutely useless 'exploit' (not really) while editing filters (closes ...
[tt-rss.git] / js / functions.js
index ec533faae75fc1477fd0e651249c9ec0534a8dda..e00690c1c2e6130f3372764d37204dd695fbf9d7 100644 (file)
@@ -292,6 +292,10 @@ function gotoPreferences() {
        document.location.href = "prefs.php";
 }
 
+function gotoLogout() {
+       document.location.href = "backend.php?op=logout";
+}
+
 function gotoMain() {
        document.location.href = "index.php";
 }
@@ -347,9 +351,13 @@ function toggleSelectListRow2(sender) {
 }
 
 /* this is for dijit Checkbox */
-function toggleSelectRow2(sender, row) {
+function toggleSelectRow2(sender, row, is_cdm) {
 
-       if (!row) row = sender.domNode.parentNode.parentNode;
+       if (!row)
+               if (!is_cdm)
+                       row = sender.domNode.parentNode.parentNode;
+               else
+                       row = sender.domNode.parentNode.parentNode.parentNode; // oh ffs
 
        if (sender.checked && !row.hasClassName('Selected'))
                row.addClassName('Selected');
@@ -956,6 +964,8 @@ function createNewRuleElement(parentNode, replaceNode) {
        try {
                var form = document.forms["filter_new_rule_form"];
 
+               form.reg_exp.value = form.reg_exp.value.replace(/(<([^>]+)>)/ig,"");
+
                var query = "backend.php?op=pref-filters&method=printrulename&rule="+
                        param_escape(dojo.formToJson(form));
 
@@ -1201,7 +1211,7 @@ function quickAddFilter() {
                        var lh = dojo.connect(dialog, "onLoad", function(){
                                dojo.disconnect(lh);
 
-                               var title = $("PTITLE-FULL-" + active_post_id);
+                               var title = $("PTITLE-FULL-" + getActiveArticleId());
 
                                if (title || getActiveFeedId() || activeFeedIsCat()) {
                                        if (title) title = title.innerHTML;
@@ -1266,6 +1276,8 @@ function unsubscribeFeed(feed_id, title) {
                                        } else {
                                                if (feed_id == getActiveFeedId())
                                                        setTimeout("viewfeed(-5)", 100);
+
+                                               if (feed_id < 0) updateFeedList();
                                        }
 
                                } });