]> git.wh0rd.org - tt-rss.git/blobdiff - tt-rss.js
cdm tweaks, misc fixes
[tt-rss.git] / tt-rss.js
index 1257f996ba27745756dbe989dce44160ef95ceb6..0e4c15485995af926e5a53860314a91a9c730f57 100644 (file)
--- a/tt-rss.js
+++ b/tt-rss.js
@@ -22,6 +22,10 @@ var init_params = new Object();
 
 var op_history = new Array();
 
+function tagsAreDisplayed() {
+       return display_tags;
+}
+
 function toggleTags() {
        display_tags = !display_tags;
 
@@ -150,7 +154,7 @@ function scheduleFeedUpdate(force) {
                omode = "T";
        } else {
                if (display_tags) {
-                       omode = "t";
+                       omode = "tl";
                } else {
                        omode = "flc";
                }
@@ -186,6 +190,8 @@ function updateFeedList(silent, fetch) {
 //             notify("Loading feed list...");
 //     }
 
+       debug("<b>updateFeedList</b>");
+
        var query_str = "backend.php?op=feeds";
 
        if (display_tags) {
@@ -358,7 +364,9 @@ function init() {
                        debug('debug mode activated');
                }
 
-               xmlhttp.open("GET", "backend.php?op=rpc&subop=sanityCheck", true);
+               var params = "&ua=" + param_escape(navigator.userAgent);
+
+               xmlhttp.open("GET", "backend.php?op=rpc&subop=sanityCheck" + params, true);
                xmlhttp.onreadystatechange=backend_sanity_check_callback;
                xmlhttp.send(null);
 
@@ -574,6 +582,11 @@ function editFeedDlg(feed) {
                return;
        }
 
+       if (feed <= 0 || active_feed_is_cat || tagsAreDisplayed()) {
+               alert("You can't edit this kind of feed.");
+               return;
+       }
+
        if (xmlhttp_ready(xmlhttp)) {
                xmlhttp.open("GET", "backend.php?op=pref-feeds&subop=editfeed&id=" +
                        param_escape(feed), true);