]> git.wh0rd.org Git - tt-rss.git/commitdiff
browser interface fixes
authorAndrew Dolgov <fox@madoka.spb.ru>
Fri, 30 Dec 2005 05:29:24 +0000 (06:29 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Fri, 30 Dec 2005 05:29:24 +0000 (06:29 +0100)
backend.php
prefs.js

index 7f5dfe3764297338f271f479dbdefea6e43e8a42..596daaced98d8d4fb3025221763cb84409ea4ec5 100644 (file)
                if ($subop == "massSubscribe") {
                        $ids = split(",", db_escape_string($_GET["ids"]));
 
+                       $subscribed = array();
+
                        foreach ($ids as $id) {
                                $result = db_query($link, "SELECT feed_url,title FROM ttrss_feeds
                                        WHERE id = '$id'");
                                        $result = db_query($link,
                                                "INSERT INTO ttrss_feeds (owner_uid,feed_url,title,cat_id) 
                                                VALUES ('".$_SESSION["uid"]."', '$feed_url', '$title', NULL)");
+
+                                       array_push($subscribed, $title);
                                }
                        }
+
+                       if (count($subscribed) > 0) {
+                               print "<div class=\"notice\">";
+                               print "<b>Subscribed to feeds:</b>";
+                               print "<ul class=\"nomarks\">";
+                               foreach ($subscribed as $title) {
+                                       print "<li>$title</li>";
+                               }
+                               print "</ul>";
+                               print "</div>";
+                       }
                }               
 
                if ($subop == "browse") {
index 2a8a42d44c265e1fbdb6eba42a891b5af80583d7..66c0de5dc21c271eb46fcf1c3b96e7dea2820a79 100644 (file)
--- a/prefs.js
+++ b/prefs.js
@@ -45,6 +45,8 @@ function feedlist_callback() {
                try {   
                        var container = document.getElementById('prefContent'); 
                        container.innerHTML=xmlhttp.responseText;
+                       selectTab("feedConfig", true);
+
                        if (active_feed) {
                                var row = document.getElementById("FEEDR-" + active_feed);
                                if (row) {
@@ -1206,25 +1208,30 @@ function updatePrefsList() {
 
 }
 
-function selectTab(id) {
+function selectTab(id, noupdate) {
+
+//     alert(id);
 
        if (!xmlhttp_ready(xmlhttp)) {
                printLockingError();
                return
        }
 
-       if (id == "feedConfig") {
-               updateFeedList();
-       } else if (id == "filterConfig") {
-               updateFilterList();
-       } else if (id == "labelConfig") {
-               updateLabelList();
-       } else if (id == "genConfig") {
-               updatePrefsList();
-       } else if (id == "userConfig") {
-               updateUsersList();
-       } else if (id == "feedBrowser") {
-               updateBigFeedBrowser();
+       if (!noupdate) {
+
+               if (id == "feedConfig") {
+                       updateFeedList();
+               } else if (id == "filterConfig") {
+                       updateFilterList();
+               } else if (id == "labelConfig") {
+                       updateLabelList();
+               } else if (id == "genConfig") {
+                       updatePrefsList();
+               } else if (id == "userConfig") {
+                       updateUsersList();
+               } else if (id == "feedBrowser") {
+                       updateBigFeedBrowser();
+               }
        }
 
        var tab = document.getElementById(active_tab + "Tab");